Skip to content

riccardopiras87/brandbank-soap-api-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brandbank SOAP API Client

Latest Stable Version

Please see examples below.

Installation

Install the latest version with

composer require jecksolovyev/brandbank-soap-api-client

Requirements

Component works with PHP 7.1 or above.

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

First thing comes first

require_once __DIR__ . '/vendor/autoload.php';

// initiate the API
$api = new BrandbankSOAPAPIClient\BrandbankSOAPAPIClient(
    new BrandbankSOAPAPIClient\Authenticator\HeaderGuidAuthenticator('XXXX')
);

How to set up your products list

$items = ['3272770099486'];
$coverageReport = new RetailerFeedbackReport(new Message(new DateTime()));

foreach ($items as $item) {
    $coverageReport->addItem(new Item($item));
}

if ($api->callSupplyCoverageReport($coverageReport)->isSuccess()) {
    // everything is good, do something meaningful
}

How to read new/updated product data from API

$response = $api->callGetUnsentProductData();
$message = $response->getUnsentProductDataResult()->getMessage(); // get Message object

Call acknowledge after feed successfully processed

// assuming you've previously called $message = $api->callGetUnsentProductData()->getUnsentProductDataResult()->getMessage()
$api->callAcknowledgeMessage($message->getId());

License

This component is licensed under the MIT License - see the LICENSE file for details

About

Brandbank SOAP API Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%