clsystems / tt-api-client
TradeTracker API client
v1.0.0
2020-04-24 07:13 UTC
Requires
- php: >=7.2
- ext-soap: *
Requires (Dev)
- phpunit/phpunit: ^7.2
This package is auto-updated.
Last update: 2024-10-25 16:29:35 UTC
README
A TradeTracker API client to communicate with the webservice and map results to real model objects.
Installation
You can install the package via composer:
$ composer require clsystems/tt-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
- getMaterialItems
- 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.