-
Notifications
You must be signed in to change notification settings - Fork 181
Expand file tree
/
Copy pathShipment.php
More file actions
38 lines (32 loc) · 853 Bytes
/
Shipment.php
File metadata and controls
38 lines (32 loc) · 853 Bytes
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
37
38
<?php
namespace Bigcommerce\Api\Resources;
use Bigcommerce\Api\Resource;
use Bigcommerce\Api\Client;
class Shipment extends Resource
{
protected $ignoreOnCreate = array(
'id',
'order_id',
'date_created',
'customer_id',
'billing_address',
'shipping_address'
);
protected $ignoreOnUpdate = array(
'id',
'order_id',
'date_created',
'customer_id',
'items',
'billing_address',
'shipping_address'
);
public function create()
{
return Client::createResource('/orders/' . $this->fields->order_id . '/shipments', $this->getCreateFields());
}
public function update()
{
return Client::updateResource('/orders/' . $this->fields->order_id . '/shipments/' . $this->id, $this->getUpdateFields());
}
}