1
1
<?php
2
+
2
3
/**
3
4
* SellersApi
4
5
* PHP version 5
@@ -147,7 +148,7 @@ public function getMarketplaceParticipationsWithHttpInfo()
147
148
$ content = $ responseBody ; //stream goes to serializer
148
149
} else {
149
150
$ content = $ responseBody ->getContents ();
150
- if (!in_array ($ returnType , ['string ' ,'integer ' ,'bool ' ])) {
151
+ if (!in_array ($ returnType , ['string ' , 'integer ' , 'bool ' ])) {
151
152
$ content = json_decode ($ content );
152
153
}
153
154
}
@@ -157,7 +158,6 @@ public function getMarketplaceParticipationsWithHttpInfo()
157
158
$ response ->getStatusCode (),
158
159
$ response ->getHeaders ()
159
160
];
160
-
161
161
} catch (ApiException $ e ) {
162
162
switch ($ e ->getCode ()) {
163
163
case 200 :
@@ -359,10 +359,8 @@ protected function getMarketplaceParticipationsRequest()
359
359
}
360
360
// for HTTP post (form)
361
361
$ httpBody = new MultipartStream ($ multipartContents );
362
-
363
362
} elseif ($ headers ['Content-Type ' ] === 'application/json ' ) {
364
363
$ httpBody = \GuzzleHttp \json_encode ($ formParams );
365
-
366
364
} else {
367
365
// for HTTP post (form)
368
366
$ httpBody = \GuzzleHttp \Psr7 \build_query ($ formParams );
@@ -372,16 +370,30 @@ protected function getMarketplaceParticipationsRequest()
372
370
$ query = \GuzzleHttp \Psr7 \build_query ($ queryParams );
373
371
374
372
$ sign = new SignatureSellingPartner ();
375
- $ headersX = $ sign ->calculateSignature ($ this ->config ->getApiKey ("accessKey " ),
376
- $ this ->config ->getApiKey ("secretKey " ), $ this ->config ->getApiKey ("region " ),
377
- $ this ->config ->getAccessToken (), $ this ->config ->getUserAgent (), str_replace ("https:// " , "" , $ this ->config ->getHost ()),
378
- 'GET ' , $ resourcePath , $ query );
373
+ $ headersX = $ sign ->calculateSignature (
374
+ $ this ->config ->getApiKey ("accessKey " ),
375
+ $ this ->config ->getApiKey ("secretKey " ),
376
+ $ this ->config ->getApiKey ("region " ),
377
+ $ this ->config ->getAccessToken (),
378
+ $ this ->config ->getUserAgent (),
379
+ str_replace ("https:// " , "" , $ this ->config ->getHost ()),
380
+ 'GET ' ,
381
+ $ resourcePath ,
382
+ $ query
383
+ );
379
384
380
385
$ headers = array_merge (
381
386
$ headerParams ,
382
387
$ headers ,
383
388
$ headersX
384
389
);
390
+
391
+ return new Request (
392
+ 'GET ' ,
393
+ $ this ->config ->getHost () . $ resourcePath . ($ query ? "? {$ query }" : '' ),
394
+ $ headers ,
395
+ $ httpBody
396
+ );
385
397
}
386
398
387
399
/**
0 commit comments