mobly / buscape-sdk
Buscape Seller Integration PHP-SDK
Installs: 10 080
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 21
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- guzzlehttp/guzzle: ~6.0
- psr/log: 1.0.*
Requires (Dev)
- monolog/monolog: ~1.13
- phpunit/phpunit: 3.*
This package is not auto-updated.
Last update: 2024-12-21 19:45:45 UTC
README
Full import
To run a full proccess example.
<?php require "vendor/autoload.php"; use Mobly\Buscape\Sdk\Client; use Mobly\Buscape\Sdk\Collection\ProductCollection; $collection = new ProductCollection(); // Maybe can be have more mandatory fields $products = [ [ 'sku' => 'AAA-123', 'title' => 'Product Title One' ], [ 'sku' => 'AAA-123', 'title' => 'Product Title Two' ] ]; foreach ($products as $product) { $collection->add($product); } $api = new Client([ 'app_token' => 'your_token', 'auth_token' => 'your_auth_token', ]); $response = $api->loadProducts($collection); print_r($response);
Partial import
To run a partial proccess example.
$collection = new InventoryCollection(); foreach ($products as $product) { $buscapeProduct = new Inventory($product->toArray()); $collection->add($buscapeProduct); } $api = new Client([ 'app_token' => 'your_token', 'auth_token' => 'your_auth_token', ]); $response = $api->inventoryUpdate($collection); print_r($response);