File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1414 * --------------------------------------------------------------------------
1515 * FulfillmentOrder -> Child Resources
1616 * --------------------------------------------------------------------------
17+ * @property-read FulfillmentRequest $FulfillmentRequest
1718 *
1819 * --------------------------------------------------------------------------
1920 * Fulfillment -> Custom actions
@@ -33,6 +34,12 @@ class FulfillmentOrder extends ShopifyResource
3334 */
3435 protected $ resourceKey = 'fulfillment_order ' ;
3536
37+ /**
38+ * @inheritDoc
39+ */
40+ protected $ childResource = array (
41+ 'FulfillmentRequest '
42+ );
3643
3744 /**
3845 * @inheritDoc
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Created by PhpStorm.
4+ * @author Tareq Mahmood <tareqtms@yahoo.com>
5+ * Created at 8/19/16 5:28 PM UTC+06:00
6+ *
7+ * @see https://help.shopify.com/api/reference/fulfillmentservice Shopify API Reference for FulfillmentService
8+ */
9+
10+ namespace PHPShopify ;
11+
12+ /**
13+ * --------------------------------------------------------------------------
14+ * FulfillmentRequest -> Child Resources
15+ * --------------------------------------------------------------------------
16+ *
17+ * --------------------------------------------------------------------------
18+ * FulfillmentRequest -> Custom actions
19+ * --------------------------------------------------------------------------
20+ * @method array accept() Accept a fulfilment order
21+ * @method array reject() Rejects a fulfillment order
22+ */
23+ class FulfillmentRequest extends ShopifyResource
24+ {
25+ /**
26+ * @inheritDoc
27+ */
28+ protected $ resourceKey = 'fulfillment_request ' ;
29+
30+ /**
31+ * @inheritDoc
32+ */
33+ public $ countEnabled = false ;
34+
35+ /**
36+ * @inheritDoc
37+ */
38+ protected $ customPostActions = array (
39+ 'accept ' ,
40+ 'reject '
41+ );
42+
43+ protected function pluralizeKey ()
44+ {
45+ return $ this ->resourceKey ;
46+ }
47+ }
Original file line number Diff line number Diff line change 1515 * --------------------------------------------------------------------------
1616 * Order -> Child Resources
1717 * --------------------------------------------------------------------------
18+ * @property-read FulfillmentOrder $FulfillmentOrder
1819 * @property-read Fulfillment $Fulfillment
1920 * @property-read OrderRisk $Risk
2021 * @property-read Refund $Refund
You can’t perform that action at this time.
0 commit comments