diff --git a/lib/FulfillmentOrder.php b/lib/FulfillmentOrder.php new file mode 100644 index 0000000..6fb4f0c --- /dev/null +++ b/lib/FulfillmentOrder.php @@ -0,0 +1,46 @@ + + * Created at 5/21/21 11:27 AM UTC+10:00 + * + * @see https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillmentorder Shopify API Reference for Fulfillment Order + */ + +namespace PHPShopify; + + +/** + * -------------------------------------------------------------------------- + * FulfillmentOrder -> Child Resources + * -------------------------------------------------------------------------- + * + * -------------------------------------------------------------------------- + * Fulfillment -> Custom actions + * -------------------------------------------------------------------------- + * @method array cancel() Cancel a fulfillment order + * @method array open() Open a fulfillment order + * @method array close() Close a fulfillment order + * @method array move() Move a fulfilment order to a new location + * @method array reschedule() Reschedule fulfill_at_time of a scheduled fulfillment order + * + */ +class FulfillmentOrder extends ShopifyResource +{ + /** + * @inheritDoc + */ + protected $resourceKey = 'fulfillment_order'; + + + /** + * @inheritDoc + */ + protected $customPostActions = array( + 'close', + 'open', + 'cancel', + 'move', + 'reschedule' + ); +} \ No newline at end of file diff --git a/lib/Order.php b/lib/Order.php index 98efd2a..2a26fab 100644 --- a/lib/Order.php +++ b/lib/Order.php @@ -49,6 +49,7 @@ class Order extends ShopifyResource */ protected $childResource = array ( 'Fulfillment', + 'FulfillmentOrder', 'OrderRisk' => 'Risk', 'Refund', 'Transaction',