<?php
 declare(strict_types=1); namespace Shopify\Rest\Admin2023_10; use Shopify\Auth\Session; use Shopify\Rest\Base; class FulfillmentOrder extends Base { public static string $API_VERSION = "2023-10"; protected static array $HAS_ONE = []; protected static array $HAS_MANY = []; protected static array $PATHS = [ ["http_method" => "get", "operation" => "get", "ids" => ["id"], "path" => "fulfillment_orders/<id>.json"], ["http_method" => "get", "operation" => "get", "ids" => ["order_id"], "path" => "orders/<order_id>/fulfillment_orders.json"], ["http_method" => "post", "operation" => "cancel", "ids" => ["id"], "path" => "fulfillment_orders/<id>/cancel.json"], ["http_method" => "post", "operation" => "close", "ids" => ["id"], "path" => "fulfillment_orders/<id>/close.json"], ["http_method" => "post", "operation" => "hold", "ids" => ["id"], "path" => "fulfillment_orders/<id>/hold.json"], ["http_method" => "post", "operation" => "move", "ids" => ["id"], "path" => "fulfillment_orders/<id>/move.json"], ["http_method" => "post", "operation" => "open", "ids" => ["id"], "path" => "fulfillment_orders/<id>/open.json"], ["http_method" => "post", "operation" => "release_hold", "ids" => ["id"], "path" => "fulfillment_orders/<id>/release_hold.json"], ["http_method" => "post", "operation" => "reschedule", "ids" => ["id"], "path" => "fulfillment_orders/<id>/reschedule.json"], ["http_method" => "post", "operation" => "set_fulfillment_orders_deadline", "ids" => [], "path" => "fulfillment_orders/set_fulfillment_orders_deadline.json"] ]; public static function find( Session $session, $id, array $urlIds = [], array $params = [] ): ?FulfillmentOrder { $result = parent::baseFind( $session, array_merge(["id" => $id], $urlIds), $params, ); return !empty($result) ? $result[0] : null; } public static function all( Session $session, array $urlIds = [], array $params = [] ): array { return parent::baseFind( $session, $urlIds, $params, ); } public function cancel( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "cancel", $this->session, ["id" => $this->id], $params, $body, $this, ); return $response->getDecodedBody(); } public function close( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "close", $this->session, ["id" => $this->id], $params, $body, $this, ); return $response->getDecodedBody(); } public function hold( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "hold", $this->session, ["id" => $this->id], $params, $body, $this, ); return $response->getDecodedBody(); } public function move( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "move", $this->session, ["id" => $this->id], $params, $body, $this, ); return $response->getDecodedBody(); } public function open( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "open", $this->session, ["id" => $this->id], $params, $body, $this, ); return $response->getDecodedBody(); } public function release_hold( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "release_hold", $this->session, ["id" => $this->id], $params, $body, $this, ); return $response->getDecodedBody(); } public function reschedule( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "reschedule", $this->session, ["id" => $this->id], $params, $body, $this, ); return $response->getDecodedBody(); } public function set_fulfillment_orders_deadline( array $params = [], $body = [] ): ?array { $response = parent::request( "post", "set_fulfillment_orders_deadline", $this->session, [], $params, $body, $this, ); return $response->getDecodedBody(); } } 