Skip to content

Commit 3a5161f

Browse files
author
Sander de Vos
committed
parcels/statuses
1 parent b8a52de commit 3a5161f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
Supported endpoints:
66
- `GET` parcels
7+
- `GET` parcels/statuses
78
- `GET` parcels/{id}
89
- `POST` parcels
910
- `POST` parcels/{id}/cancel

src/Contracts/SendcloudContract.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@ public function getParcel(int $id): array;
1818

1919
public function createParcel(ParcelData $parcel, SenderData $sender = null): array;
2020

21+
public function deleteParcel(int $id): array;
22+
23+
public function parcelStatuses(): array;
24+
2125
public function shippingMethods(array $optionalParameters = []): array;
26+
27+
public function download(string $url): string;
2228
}

src/Sendcloud.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ public function deleteParcel(int $id): array
4343
return $this->request('post', $endpoint, [], false);
4444
}
4545

46+
public function parcelStatuses(): array
47+
{
48+
$endpoint = self::PARCELS_ENDPOINT.'/statuses';
49+
50+
return $this->request('get', $endpoint);
51+
}
52+
4653
public function shippingMethods(array $optionalParameters = []): array
4754
{
4855
$query = http_build_query($optionalParameters);

0 commit comments

Comments
 (0)