hypeit/tradetracker-api-client

TradeTracker API client

v0.5.0 2022-11-17 10:51 UTC

This package is not auto-updated.

Last update: 2024-05-03 19:44:50 UTC


README

A TradeTracker API client to communicate with the webservice and map results to real model objects.

Build Status Total Downloads Latest Stable Version

Installation

You can install the package via composer:

$ composer require hypeit/tradetracker-api-client

You must configure authentication in order to use the client.

$authentication = new Authentication(
    12345, // The customer id
    'passphrase', // The passphrase
    true, // Whether to not allow changes (optional)
    'en_GB', // The locale to be used for results. (optional)
    false // Whether to receive demo results. (optional)
);

Then inject the wsdl and the authentication object into the client.

$client = new TradeTrackerClient('http://ws.tradetracker.com/soap/affiliate?wsdl', $authenticate);

Usage

Call a client method to initiate the api call:

$affiliateSites = $client->getAffiliateSites();

Common methods are:

  • getAffiliateSites
  • getCampaigns
  • getClickTransactions
  • getConversionTransactions
  • getTransactions
  • getReportAffiliateSite
  • getReportCampaign
  • getFeeds
  • getFeedProductCategories
  • getFeedProducts

Some method calls can have an optional filter:

$filter = new AffiliateSiteFilter();
$filter->setLimit(5);

$affiliateSites = $client->getAffiliateSites($filter);

Testing

$ composer test

License

The MIT License (MIT). Please see License File for more information.