Skip to content

Commit f2bc4c4

Browse files
committed
NTR - fix examples
1 parent 163b984 commit f2bc4c4

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

examples/sync/delete_product.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use BatteryIncludedSdk\Client\ApiClient;
55
use BatteryIncludedSdk\Client\CurlHttpClient;
6-
use BatteryIncludedSdk\Service\SyncProductService;
6+
use BatteryIncludedSdk\Service\SyncService;
77

88
require_once __DIR__ . '/../../vendor/autoload.php';
99
require_once __DIR__ . '/../credentials.php';
@@ -15,9 +15,9 @@
1515
$apiKey
1616
);
1717

18-
$syncService = new SyncProductService($apiClient);
18+
$syncService = new SyncService($apiClient);
1919

20-
$result = $syncService->deleteProductsByIds('240', '2');
20+
$result = $syncService->deleteElementsByIds('240', '2');
2121

2222
echo '<pre>';
2323
var_dump($result->getBody());

examples/sync/partial_update.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use BatteryIncludedSdk\Client\ApiClient;
55
use BatteryIncludedSdk\Client\CurlHttpClient;
66
use BatteryIncludedSdk\Dto\ProductBaseDto;
7-
use BatteryIncludedSdk\Service\SyncProductService;
7+
use BatteryIncludedSdk\Service\SyncService;
88

99
require_once __DIR__ . '/../../vendor/autoload.php';
1010
require_once __DIR__ . '/../credentials.php';
@@ -16,12 +16,12 @@
1616
$apiKey
1717
);
1818

19-
$syncService = new SyncProductService($apiClient);
19+
$syncService = new SyncService($apiClient);
2020

2121
$product = new ProductBaseDto('239');
2222
$product->setId('239');
2323
$product->setPrice(13337.95);
24-
$result = $syncService->partialUpdateOneOrManyProducts($product);
24+
$result = $syncService->partialUpdateOneOrManyElements($product);
2525

2626
echo '<pre>';
2727
var_dump($result->getBody());

examples/sync/sync_full.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use BatteryIncludedSdk\Client\ApiClient;
55
use BatteryIncludedSdk\Client\CurlHttpClient;
6-
use BatteryIncludedSdk\Service\SyncProductService;
6+
use BatteryIncludedSdk\Service\SyncService;
77
use BatteryIncludedSdkTests\Helper;
88

99
require_once __DIR__ . '/../../vendor/autoload.php';
@@ -18,9 +18,9 @@
1818
$apiKey
1919
);
2020

21-
$syncService = new SyncProductService($apiClient);
21+
$syncService = new SyncService($apiClient);
2222

23-
$result = $syncService->syncFullProducts(...$products);
23+
$result = $syncService->syncFullElements(...$products);
2424

2525
echo '<pre>';
2626
var_dump($result->getBody());

examples/sync/sync_full_batched.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use BatteryIncludedSdk\Client\ApiClient;
55
use BatteryIncludedSdk\Client\CurlHttpClient;
6-
use BatteryIncludedSdk\Service\SyncProductService;
6+
use BatteryIncludedSdk\Service\SyncService;
77
use BatteryIncludedSdkTests\Helper;
88

99
require_once __DIR__ . '/../../vendor/autoload.php';
@@ -19,16 +19,16 @@
1919
);
2020

2121
$transactionId = 'Transaction_' . time();
22-
$syncService = new SyncProductService($apiClient);
22+
$syncService = new SyncService($apiClient);
2323

2424
foreach (array_chunk($products, 10) as $productSlice) {
25-
$result = $syncService->syncFullBatchProducts($transactionId, false, ...$productSlice);
25+
$result = $syncService->syncFullBatchElements($transactionId, false, ...$productSlice);
2626
echo '<pre>';
2727
var_dump($result->getBody());
2828
echo '</pre>';
2929
}
3030

31-
$result = $syncService->syncFullBatchProducts($transactionId, true, ...$productSlice);
31+
$result = $syncService->syncFullBatchElements($transactionId, true, ...$productSlice);
3232
echo '<pre>';
3333
var_dump($result->getBody());
3434
echo '</pre>';

examples/sync/sync_one_or_many_products.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use BatteryIncludedSdk\Client\ApiClient;
55
use BatteryIncludedSdk\Client\CurlHttpClient;
6-
use BatteryIncludedSdk\Service\SyncProductService;
6+
use BatteryIncludedSdk\Service\SyncService;
77
use BatteryIncludedSdkTests\Helper;
88

99
require_once __DIR__ . '/../../vendor/autoload.php';
@@ -18,9 +18,9 @@
1818
$apiKey
1919
);
2020

21-
$syncService = new SyncProductService($apiClient);
21+
$syncService = new SyncService($apiClient);
2222

23-
$result = $syncService->syncOneOrManyProducts(...$products);
23+
$result = $syncService->syncOneOrManyElements(...$products);
2424

2525
echo '<pre>';
2626
var_dump($result->getBody());

0 commit comments

Comments
 (0)