Skip to content

Commit 6c80502

Browse files
authored
Merge pull request #228 from marxolly/add-get-fulfillment-orders
Adding Fulfillment Order
2 parents cdcd5c4 + ccbe6e7 commit 6c80502

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

lib/FulfillmentOrder.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* @author Mark Solly <mark@solly.com.au>
5+
* Created at 5/21/21 11:27 AM UTC+10:00
6+
*
7+
* @see https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillmentorder Shopify API Reference for Fulfillment Order
8+
*/
9+
10+
namespace PHPShopify;
11+
12+
13+
/**
14+
* --------------------------------------------------------------------------
15+
* FulfillmentOrder -> Child Resources
16+
* --------------------------------------------------------------------------
17+
*
18+
* --------------------------------------------------------------------------
19+
* Fulfillment -> Custom actions
20+
* --------------------------------------------------------------------------
21+
* @method array cancel() Cancel a fulfillment order
22+
* @method array open() Open a fulfillment order
23+
* @method array close() Close a fulfillment order
24+
* @method array move() Move a fulfilment order to a new location
25+
* @method array reschedule() Reschedule fulfill_at_time of a scheduled fulfillment order
26+
*
27+
*/
28+
class FulfillmentOrder extends ShopifyResource
29+
{
30+
/**
31+
* @inheritDoc
32+
*/
33+
protected $resourceKey = 'fulfillment_order';
34+
35+
36+
/**
37+
* @inheritDoc
38+
*/
39+
protected $customPostActions = array(
40+
'close',
41+
'open',
42+
'cancel',
43+
'move',
44+
'reschedule'
45+
);
46+
}

lib/Order.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class Order extends ShopifyResource
4949
*/
5050
protected $childResource = array (
5151
'Fulfillment',
52+
'FulfillmentOrder',
5253
'OrderRisk' => 'Risk',
5354
'Refund',
5455
'Transaction',

0 commit comments

Comments
 (0)