Skip to content

Commit 2601bea

Browse files
committed
Add support for WM_PARTNER.ID header via partnerId property in Configuration
1 parent a7644e2 commit 2601bea

27 files changed

Lines changed: 500 additions & 1499 deletions

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ The `Configuration` class is used to configure the client library. It takes a si
125125
- `consumerId`: Your Walmart Consumer ID. Required if you are making requests to endpoints that use signature-based auth (see the [Authorization](#authorization) section)
126126
- `privateKey`: Your Walmart private key. Ditto the requirements for the `consumerId` option.
127127
- `channelType`: The channel type value you received during onboarding. Required in CA.
128+
- `partnerId`: Your Walmart Partner ID. Required when using the Supplier APIs.
128129
- `accessToken`: An instance of `Walmart\AccessToken`, containing an access token and its expiration time. If provided, this will be used instead of the client ID and secret to authenticate API calls, until the token expires. This is useful if you want to reuse an access token that you've already retrieved from Walmart. More details on access token auth [below](#access-token-auth).
129130

130131
If you try to instantiate an instance of an API class that is not supported in the country you've specified, an exception will be thrown.

docs/Apis/Supplier/US/DSVCostApi.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ All URIs are relative to https://marketplace.walmartapis.com, except if the oper
99
## `updateBulkCost()`
1010

1111
```php
12-
updateBulkCost($feedType, $accept, $wMPARTNERID, $dsvCostUpdateRequest): \Walmart\Models\Supplier\US\DSVCost\DsvCostUpdateResponse
12+
updateBulkCost($feedType, $dsvCostUpdateRequest): \Walmart\Models\Supplier\US\DSVCost\DsvCostUpdateResponse
1313
```
1414
This API allows DSV to update cost for items in bulk.
1515

@@ -36,12 +36,10 @@ $config = new Walmart\Configuration([
3636
$api = Walmart::supplier($config)->dSVCost();
3737

3838
$feedType = 'cost'; // string | Includes details of each entity in the feed. Do not set this parameter to true.
39-
$accept = application/json; // string | Specifies the returned data format in the response. Valid values are: application/json multipart/form-data
40-
$wMPARTNERID = 10001126675; // string | Specifies an account identifier for the supplier. This identifier is provided during Walmart account creation. If this is an API submission made by a third-party service provider, then the identifier is required to correctly associate the submission with the supplier.
4139
$dsvCostUpdateRequest = new \Walmart\Models\Supplier\US\DSVCost\DsvCostUpdateRequest(); // \Walmart\Models\Supplier\US\DSVCost\DsvCostUpdateRequest | File fields
4240

4341
try {
44-
$result = $api->updateBulkCost($feedType, $accept, $wMPARTNERID, $dsvCostUpdateRequest);
42+
$result = $api->updateBulkCost($feedType, $dsvCostUpdateRequest);
4543
print_r($result);
4644
} catch (Exception $e) {
4745
echo "Exception when calling DSVCostApi->updateBulkCost: {$e->getMessage()}\n";
@@ -52,8 +50,6 @@ try {
5250
| Name | Type | Description | Notes |
5351
| ------------- | ------------- | ------------- | ------------- |
5452
| **feedType** | **string**| Includes details of each entity in the feed. Do not set this parameter to true. | [default to 'cost'] |
55-
| **accept** | **string**| Specifies the returned data format in the response. Valid values are: application/json multipart/form-data | |
56-
| **wMPARTNERID** | **string**| Specifies an account identifier for the supplier. This identifier is provided during Walmart account creation. If this is an API submission made by a third-party service provider, then the identifier is required to correctly associate the submission with the supplier. | |
5753
| **dsvCostUpdateRequest** | [**\Walmart\Models\Supplier\US\DSVCost\DsvCostUpdateRequest**](../../../Models/Supplier/US/DSVCost/DsvCostUpdateRequest.md)| File fields | |
5854

5955

@@ -66,6 +62,7 @@ try {
6662
This endpoint requires the following authorization methods:
6763

6864
* `signatureScheme`: Request signature authentication. Request signatures are generated using a combination of request info, a timestamp, and your Walmart consumer ID and private key. The signature is passed in the WM_SEC.AUTH_SIGNATURE header. This is always used in tandem with consumer ID authentication (above). When using endpoints that require signature authentication, you must pass the `privateKey` and `consumerId` options to the `Configuration` constructor.
65+
* `partnerScheme`: Header authentication with your Walmart partner ID, which is passed in the WM_PARTNER.ID header. Required by Supplier API endpoints. When using endpoints that require partner ID authentication, you must pass the `partnerId` option to the `Configuration` constructor.
6966
* `consumerIdScheme`: Header authentication with your Walmart consumer ID, which is passed in the WM_CONSUMER.ID header. This is always used in tandem with signature authentication (below). When using endpoints that require consumer ID authentication, you must pass the `consumerId` option to the `Configuration` constructor.
7067
* `accessTokenScheme`: Header authentication with a Walmart access token, which is automatically generated using your Client ID and Client Secret. The token is valid for 15 minutes, and will be passed in the WM_SEC.ACCESS_TOKEN header
7168

0 commit comments

Comments
 (0)