Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/InSales/API/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class ApiClient
const API_URL_VARIANT_FIELD_VALUE = '/admin/products/{slug}/variant_field_values';
const API_URL_WEBHOOK = '/admin/webhooks';
const PAYMENT_URL_NOTIFY = '/payments/external/server';
const API_URL_VARIANTS_GROUP_UPDATE = '/admin/products/variants_group_update';

/** @var HttpClient */
private $client;
Expand Down
13 changes: 13 additions & 0 deletions src/InSales/API/Traits/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,17 @@ public function createVariant(int $productId, array $data) : ApiResponse
$data
);
}

/**
* Массовое обновление вариантов товаров
* @param array $data
* @return ApiResponse
*/
public function updateGroupVariants(array $data) : ApiResponse
{
return $this->client->executeUpdateRequest(
$this->generateUrl(self::API_URL_VARIANTS_GROUP_UPDATE),
$data
);
}
}