Skip to content

Commit c36d278

Browse files
authored
Merge pull request #25 from 1415003719/2025-07
fix sign header and change slug_group to string
2 parents 09413fa + 9c280b8 commit c36d278

File tree

5 files changed

+6
-30
lines changed

5 files changed

+6
-30
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Before you begin to integrate:
3838

3939
### API and SDK Version
4040

41-
- SDK Version: 13.0.0
41+
- SDK Version: 14.0.0
4242
- API Version: 2025-07
4343
## Quick Start
4444

src/Model/CreateTrackingRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class CreateTrackingRequest extends Base
141141
public $note;
142142

143143
/**
144-
* @var \Tracking\Model\SlugGroup|null Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. (
144+
* @var string|null Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. (
145145
*/
146146
public $slug_group;
147147

src/Model/DetectCourierRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class DetectCourierRequest extends Base
4646
public $destination_state;
4747

4848
/**
49-
* @var \Tracking\Model\SlugGroup|null Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. (
49+
* @var string|null Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. (
5050
*/
5151
public $slug_group;
5252

src/Model/SlugGroup.php

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/Transport/Http.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Http
2121
private $config;
2222
const CONTENT_TYPE = 'application/json';
2323

24-
const SDK_VERSION = '13.0.0';
24+
const SDK_VERSION = '14.0.0';
2525

2626
public function __construct(Config $config)
2727
{
@@ -47,7 +47,7 @@ public function request($method, $url, $options = []): \Psr\Http\Message\Respons
4747

4848
$urlWithQuery = $this->config->getDomain() . $url;
4949
if (!empty($options['query'])) {
50-
$urlWithQuery .= '?' . http_build_query($options['query']);
50+
$urlWithQuery .= '?' . http_build_query($options['query'], '', '&', PHP_QUERY_RFC3986);
5151
}
5252

5353
$options['headers'] = $this->genHeaders($method, $urlWithQuery, $options['json'] ?? [], $options['headers'] ?? []);
@@ -112,7 +112,7 @@ function ($retries) {
112112

113113
private function genHeaders(string $method, string $urlWithQuery, array $payload, array $customerHeader): array
114114
{
115-
$asClient = 'tracking-sdk-php/13.0.0 (https://www.aftership.com) guzzle/6.5.8';
115+
$asClient = 'tracking-sdk-php/14.0.0 (https://www.aftership.com) guzzle/6.5.8';
116116
$headers = $customerHeader + [
117117
'as-api-key' => $this->config->getApiKey(),
118118
'content-type' => '',

0 commit comments

Comments
 (0)