Skip to content

Commit c271e5b

Browse files
committed
Make Content-Type JSON for all requests
1 parent 0ba8316 commit c271e5b

50 files changed

Lines changed: 242 additions & 688 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/Apis/MP/CA/InternationalShippingApi.md

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ All URIs are relative to https://marketplace.walmartapis.com, except if the oper
1616
## `createConsolidation()`
1717

1818
```php
19-
createConsolidation($contentType, $consolidationRequest): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseConsolidationResponse
19+
createConsolidation($consolidationRequest): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseConsolidationResponse
2020
```
2121
Create consolidation
2222

@@ -42,11 +42,10 @@ $config = new Walmart\Configuration([
4242

4343
$api = Walmart::marketplace($config)->internationalShipping();
4444

45-
$contentType = application/json; // string | Content-Type Header
4645
$consolidationRequest = {"domesticCarrierId":1000,"domesticTrackingNo":"20128590000367","shipmentIds":["875F143972000000CA8020EA"]}; // \Walmart\Models\MP\CA\InternationalShipping\ConsolidationRequest | Consolidation Request
4746

4847
try {
49-
$result = $api->createConsolidation($contentType, $consolidationRequest);
48+
$result = $api->createConsolidation($consolidationRequest);
5049
print_r($result);
5150
} catch (Exception $e) {
5251
echo "Exception when calling InternationalShippingApi->createConsolidation: {$e->getMessage()}\n";
@@ -56,7 +55,6 @@ try {
5655
### Parameters
5756
| Name | Type | Description | Notes |
5857
| ------------- | ------------- | ------------- | ------------- |
59-
| **contentType** | **string**| Content-Type Header | |
6058
| **consolidationRequest** | [**\Walmart\Models\MP\CA\InternationalShipping\ConsolidationRequest**](../../../Models/MP/CA/InternationalShipping/ConsolidationRequest.md)| Consolidation Request | |
6159

6260

@@ -82,7 +80,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
8280
## `createLabel()`
8381

8482
```php
85-
createLabel($contentType, $labelGenerationRequestCa, $wMTESTMODE): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseLabelGenerationResponseCa
83+
createLabel($labelGenerationRequestCa, $wMTESTMODE): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseLabelGenerationResponseCa
8684
```
8785
Create label
8886

@@ -108,12 +106,11 @@ $config = new Walmart\Configuration([
108106

109107
$api = Walmart::marketplace($config)->internationalShipping();
110108

111-
$contentType = application/json; // string | Content-Type Header
112109
$labelGenerationRequestCa = {"packageType":"CUSTOM_PACKAGE","boxDimensions":{"boxDimensionUnit":"IN","boxWeightUnit":"LB","boxWeight":1,"boxLength":100,"boxWidth":1,"boxHeight":1},"boxItems":[{"sku":"SKU_28072021","quantity":1}],"fromAddress":{"contactName":"Test","companyName":"Walmart","addressLine1":"Add1","addressLine2":"Add2","city":"Anchorage","state":"AK","postalCode":"99501","country":"US","phone":"12253","email":"test@walmart.com"},"purchaseOrderId":"P100569013","carrierName":"FedEx","carrierServiceType":"FEDEX_INTERNATIONAL_ECONOMY","labelSize":"A6"}; // \Walmart\Models\MP\CA\InternationalShipping\LabelGenerationRequestCa | Label fields
113110
$wMTESTMODE = false; // bool | For sellers/clients who are in the process of on boarding or already on boarded to IMD platforms, this feature allows them to test the API integration to SWW international label generation API. Sellers get a response which maps their request attributes with some additional static information like tracking and label. The label returned is corresponding to the carrier configured for each seller, in case if the configuration is still in progress a sample Fedex Express label is returned.
114111

115112
try {
116-
$result = $api->createLabel($contentType, $labelGenerationRequestCa, $wMTESTMODE);
113+
$result = $api->createLabel($labelGenerationRequestCa, $wMTESTMODE);
117114
print_r($result);
118115
} catch (Exception $e) {
119116
echo "Exception when calling InternationalShippingApi->createLabel: {$e->getMessage()}\n";
@@ -123,7 +120,6 @@ try {
123120
### Parameters
124121
| Name | Type | Description | Notes |
125122
| ------------- | ------------- | ------------- | ------------- |
126-
| **contentType** | **string**| Content-Type Header | |
127123
| **labelGenerationRequestCa** | [**\Walmart\Models\MP\CA\InternationalShipping\LabelGenerationRequestCa**](../../../Models/MP/CA/InternationalShipping/LabelGenerationRequestCa.md)| Label fields | |
128124
| **wMTESTMODE** | **bool**| For sellers/clients who are in the process of on boarding or already on boarded to IMD platforms, this feature allows them to test the API integration to SWW international label generation API. Sellers get a response which maps their request attributes with some additional static information like tracking and label. The label returned is corresponding to the carrier configured for each seller, in case if the configuration is still in progress a sample Fedex Express label is returned. | [optional] [default to false] |
129125

@@ -150,7 +146,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
150146
## `discardLabel()`
151147

152148
```php
153-
discardLabel($carrierShortName, $trackingNo, $contentType): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseLabelGenerationResponseCa
149+
discardLabel($carrierShortName, $trackingNo): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseLabelGenerationResponseCa
154150
```
155151
Discard label
156152

@@ -178,10 +174,9 @@ $api = Walmart::marketplace($config)->internationalShipping();
178174

179175
$carrierShortName = 'carrierShortName_example'; // string | carrierShortName from getCarriers API
180176
$trackingNo = 'trackingNo_example'; // string | trackingNo
181-
$contentType = application/json; // string | Content-Type Header
182177

183178
try {
184-
$result = $api->discardLabel($carrierShortName, $trackingNo, $contentType);
179+
$result = $api->discardLabel($carrierShortName, $trackingNo);
185180
print_r($result);
186181
} catch (Exception $e) {
187182
echo "Exception when calling InternationalShippingApi->discardLabel: {$e->getMessage()}\n";
@@ -193,7 +188,6 @@ try {
193188
| ------------- | ------------- | ------------- | ------------- |
194189
| **carrierShortName** | **string**| carrierShortName from getCarriers API | |
195190
| **trackingNo** | **string**| trackingNo | |
196-
| **contentType** | **string**| Content-Type Header | |
197191

198192

199193
### Return type
@@ -218,7 +212,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
218212
## `getCarrierPackageTypes()`
219213

220214
```php
221-
getCarrierPackageTypes($carrierShortName, $contentType): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseListCarrierPackageResponse
215+
getCarrierPackageTypes($carrierShortName): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseListCarrierPackageResponse
222216
```
223217
Supported carrier package types
224218

@@ -245,10 +239,9 @@ $config = new Walmart\Configuration([
245239
$api = Walmart::marketplace($config)->internationalShipping();
246240

247241
$carrierShortName = 'carrierShortName_example'; // string | carrierShortName received from getCarrier API or pass 'ALL' to fetch all supported package types of different carriers
248-
$contentType = application/json; // string | Content-Type Header
249242

250243
try {
251-
$result = $api->getCarrierPackageTypes($carrierShortName, $contentType);
244+
$result = $api->getCarrierPackageTypes($carrierShortName);
252245
print_r($result);
253246
} catch (Exception $e) {
254247
echo "Exception when calling InternationalShippingApi->getCarrierPackageTypes: {$e->getMessage()}\n";
@@ -259,7 +252,6 @@ try {
259252
| Name | Type | Description | Notes |
260253
| ------------- | ------------- | ------------- | ------------- |
261254
| **carrierShortName** | **string**| carrierShortName received from getCarrier API or pass 'ALL' to fetch all supported package types of different carriers | |
262-
| **contentType** | **string**| Content-Type Header | |
263255

264256

265257
### Return type
@@ -284,7 +276,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
284276
## `getCarriers()`
285277

286278
```php
287-
getCarriers($contentType): \Walmart\Models\MP\CA\InternationalShipping\CarrierCommonResponseListCarrierResponse
279+
getCarriers(): \Walmart\Models\MP\CA\InternationalShipping\CarrierCommonResponseListCarrierResponse
288280
```
289281
Supported carriers
290282

@@ -310,20 +302,17 @@ $config = new Walmart\Configuration([
310302

311303
$api = Walmart::marketplace($config)->internationalShipping();
312304

313-
$contentType = application/json; // string | Content-Type Header
314305

315306
try {
316-
$result = $api->getCarriers($contentType);
307+
$result = $api->getCarriers();
317308
print_r($result);
318309
} catch (Exception $e) {
319310
echo "Exception when calling InternationalShippingApi->getCarriers: {$e->getMessage()}\n";
320311
}
321312
```
322313

323314
### Parameters
324-
| Name | Type | Description | Notes |
325-
| ------------- | ------------- | ------------- | ------------- |
326-
| **contentType** | **string**| Content-Type Header | |
315+
This endpoint does not need any parameter.
327316

328317

329318
### Return type
@@ -348,7 +337,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
348337
## `getConsolidation()`
349338

350339
```php
351-
getConsolidation($domesticTrackingNo, $domesticCarrierId, $contentType): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseConsolidationResponse
340+
getConsolidation($domesticTrackingNo, $domesticCarrierId): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseConsolidationResponse
352341
```
353342
Get consolidation details
354343

@@ -376,10 +365,9 @@ $api = Walmart::marketplace($config)->internationalShipping();
376365

377366
$domesticTrackingNo = 'domesticTrackingNo_example'; // string | Domestic TrackingNo.
378367
$domesticCarrierId = 56; // int | Domestic CarrierId.
379-
$contentType = application/json; // string | Content-Type Header
380368

381369
try {
382-
$result = $api->getConsolidation($domesticTrackingNo, $domesticCarrierId, $contentType);
370+
$result = $api->getConsolidation($domesticTrackingNo, $domesticCarrierId);
383371
print_r($result);
384372
} catch (Exception $e) {
385373
echo "Exception when calling InternationalShippingApi->getConsolidation: {$e->getMessage()}\n";
@@ -391,7 +379,6 @@ try {
391379
| ------------- | ------------- | ------------- | ------------- |
392380
| **domesticTrackingNo** | **string**| Domestic TrackingNo. | |
393381
| **domesticCarrierId** | **int**| Domestic CarrierId. | |
394-
| **contentType** | **string**| Content-Type Header | |
395382

396383

397384
### Return type
@@ -416,7 +403,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
416403
## `getLabel()`
417404

418405
```php
419-
getLabel($purchaseOrderId, $contentType): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseListLabelGenerationResponseCa
406+
getLabel($purchaseOrderId): \Walmart\Models\MP\CA\InternationalShipping\CommonResponseListLabelGenerationResponseCa
420407
```
421408
Labels by purchase order id
422409

@@ -443,10 +430,9 @@ $config = new Walmart\Configuration([
443430
$api = Walmart::marketplace($config)->internationalShipping();
444431

445432
$purchaseOrderId = 'purchaseOrderId_example'; // string | purchaseOrderId
446-
$contentType = application/json; // string | Content-Type Header
447433

448434
try {
449-
$result = $api->getLabel($purchaseOrderId, $contentType);
435+
$result = $api->getLabel($purchaseOrderId);
450436
print_r($result);
451437
} catch (Exception $e) {
452438
echo "Exception when calling InternationalShippingApi->getLabel: {$e->getMessage()}\n";
@@ -457,7 +443,6 @@ try {
457443
| Name | Type | Description | Notes |
458444
| ------------- | ------------- | ------------- | ------------- |
459445
| **purchaseOrderId** | **string**| purchaseOrderId | |
460-
| **contentType** | **string**| Content-Type Header | |
461446

462447

463448
### Return type
@@ -482,7 +467,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
482467
## `getLabelByTrackingAndCarrier()`
483468

484469
```php
485-
getLabelByTrackingAndCarrier($carrierShortName, $trackingNo, $contentType): \SplFileObject
470+
getLabelByTrackingAndCarrier($carrierShortName, $trackingNo): \SplFileObject
486471
```
487472
Download label
488473

@@ -510,10 +495,9 @@ $api = Walmart::marketplace($config)->internationalShipping();
510495

511496
$carrierShortName = 'carrierShortName_example'; // string | carrierShortName from getCarriers API
512497
$trackingNo = 'trackingNo_example'; // string | trackingNo
513-
$contentType = application/json; // string | Content-Type Header
514498

515499
try {
516-
$result = $api->getLabelByTrackingAndCarrier($carrierShortName, $trackingNo, $contentType);
500+
$result = $api->getLabelByTrackingAndCarrier($carrierShortName, $trackingNo);
517501
print_r($result);
518502
} catch (Exception $e) {
519503
echo "Exception when calling InternationalShippingApi->getLabelByTrackingAndCarrier: {$e->getMessage()}\n";
@@ -525,7 +509,6 @@ try {
525509
| ------------- | ------------- | ------------- | ------------- |
526510
| **carrierShortName** | **string**| carrierShortName from getCarriers API | |
527511
| **trackingNo** | **string**| trackingNo | |
528-
| **contentType** | **string**| Content-Type Header | |
529512

530513

531514
### Return type

docs/Apis/MP/CA/OrdersApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
163163
## `getAllOrders()`
164164

165165
```php
166-
getAllOrders($createdStartDate, $sku, $customerOrderId, $purchaseOrderId, $status, $createdEndDate, $fromExpectedShipDate, $toExpectedShipDate, $limit, $productInfo): \Walmart\Models\MP\CA\Orders\WFSOrdersListType
166+
getAllOrders($createdStartDate, $sku, $customerOrderId, $purchaseOrderId, $status, $createdEndDate, $fromExpectedShipDate, $toExpectedShipDate, $limit, $productInfo): \Walmart\Models\MP\CA\Orders\OrdersListType
167167
```
168168
Get all orders
169169

@@ -225,7 +225,7 @@ try {
225225

226226
### Return type
227227

228-
[**\Walmart\Models\MP\CA\Orders\WFSOrdersListType**](../../../Models/MP/CA/Orders/WFSOrdersListType.md)
228+
[**\Walmart\Models\MP\CA\Orders\OrdersListType**](../../../Models/MP/CA/Orders/OrdersListType.md)
229229

230230
### Authorization
231231

docs/Apis/MP/MX/AuthenticationApi.md

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

1212
```php
13-
getTokenDetail($contentType): \Walmart\Models\MP\MX\Authentication\TokenDetailResponse
13+
getTokenDetail(): \Walmart\Models\MP\MX\Authentication\TokenDetailResponse
1414
```
1515
Token Detail
1616

@@ -34,20 +34,17 @@ $config = new Walmart\Configuration([
3434

3535
$api = Walmart::marketplace($config)->authentication();
3636

37-
$contentType = application/x-www-form-urlencoded; // string | Content type of the request body.
3837

3938
try {
40-
$result = $api->getTokenDetail($contentType);
39+
$result = $api->getTokenDetail();
4140
print_r($result);
4241
} catch (Exception $e) {
4342
echo "Exception when calling AuthenticationApi->getTokenDetail: {$e->getMessage()}\n";
4443
}
4544
```
4645

4746
### Parameters
48-
| Name | Type | Description | Notes |
49-
| ------------- | ------------- | ------------- | ------------- |
50-
| **contentType** | **string**| Content type of the request body. | |
47+
This endpoint does not need any parameter.
5148

5249

5350
### Return type
@@ -70,7 +67,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
7067
## `tokenAPI()`
7168

7269
```php
73-
tokenAPI($contentType, $grantType, $code, $redirectUri, $refreshToken): \Walmart\Models\MP\MX\Authentication\OAuthToken
70+
tokenAPI($grantType, $code, $redirectUri, $refreshToken): \Walmart\Models\MP\MX\Authentication\OAuthToken
7471
```
7572
Token API
7673

@@ -94,14 +91,13 @@ $config = new Walmart\Configuration([
9491

9592
$api = Walmart::marketplace($config)->authentication();
9693

97-
$contentType = application/x-www-form-urlencoded; // string | Content type of the request body.
9894
$grantType = 'client_credentials'; // string | Type of grant requested. <br /> **Available grant types:** authorization_code, refresh_token and client_credentials
9995
$code = '65CA5DA313A549D49D15D3119D9AD85D'; // string | Authorization code obtained by your client app when the seller authorizes your app to access the seller resource. <br /> This field is required when **grant_type: authorization_code**
10096
$redirectUri = 'https://example-client-app.com'; // string | This should be same as one of your client app URIs provided while registering the app. <br /> This field is required when **grant_type: authorization_code**
10197
$refreshToken = 'APXcIoTpKMH9OQN.....'; // string | Refresh token received as response of Authentication API with authorization_code grant type, to be used to refresh the access token. <br /> This field is required when **grant_type: refresh_token**
10298

10399
try {
104-
$result = $api->tokenAPI($contentType, $grantType, $code, $redirectUri, $refreshToken);
100+
$result = $api->tokenAPI($grantType, $code, $redirectUri, $refreshToken);
105101
print_r($result);
106102
} catch (Exception $e) {
107103
echo "Exception when calling AuthenticationApi->tokenAPI: {$e->getMessage()}\n";
@@ -111,7 +107,6 @@ try {
111107
### Parameters
112108
| Name | Type | Description | Notes |
113109
| ------------- | ------------- | ------------- | ------------- |
114-
| **contentType** | **string**| Content type of the request body. | |
115110
| **grantType** | **string**| Type of grant requested. <br /> **Available grant types:** authorization_code, refresh_token and client_credentials | [default to 'client_credentials'] |
116111
| **code** | **string**| Authorization code obtained by your client app when the seller authorizes your app to access the seller resource. <br /> This field is required when **grant_type: authorization_code** | [optional] [default to '65CA5DA313A549D49D15D3119D9AD85D'] |
117112
| **redirectUri** | **string**| This should be same as one of your client app URIs provided while registering the app. <br /> This field is required when **grant_type: authorization_code** | [optional] [default to 'https://example-client-app.com'] |

0 commit comments

Comments
 (0)