forked from imper86/php-allegro-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPickupCreateCommands.php
More file actions
36 lines (32 loc) · 1.06 KB
/
PickupCreateCommands.php
File metadata and controls
36 lines (32 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace Imper86\PhpAllegroApi\Resource\ShipmentManagement;
use Imper86\PhpAllegroApi\Resource\AbstractResource;
use Psr\Http\Client\ClientExceptionInterface;
use Psr\Http\Message\ResponseInterface;
class PickupCreateCommands extends AbstractResource
{
/**
* Request shipments pickup
* Use this resource to request a pickup of shipments.
*
* @param array $body
* @return ResponseInterface
* @throws ClientExceptionInterface
*/
public function post(array $body): ResponseInterface
{
return $this->apiPost('/shipment-management/pickups/create-commands', $body);
}
/**
* Create pickup command status
* Use this resource to get pickup request status.
*
* @param string $commandId Unique identifier of shipment pickup request command
* @return ResponseInterface
* @throws ClientExceptionInterface
*/
public function get(string $commandId): ResponseInterface
{
return $this->apiGet(sprintf('/shipment-management/pickups/create-commands/%s', $commandId));
}
}