Class: ShopifyAPI::FulfillmentOrder
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::FulfillmentOrder
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb,
lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb,
lib/shopify_api/rest/resources/2022_10/fulfillment_order.rb,
lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb,
lib/shopify_api/rest/resources/2023_04/fulfillment_order.rb,
lib/shopify_api/rest/resources/2023_07/fulfillment_order.rb,
lib/shopify_api/rest/resources/2023_10/fulfillment_order.rb,
lib/shopify_api/rest/resources/2024_01/fulfillment_order.rb,
lib/shopify_api/rest/resources/2024_04/fulfillment_order.rb,
lib/shopify_api/rest/resources/2024_07/fulfillment_order.rb,
lib/shopify_api/rest/resources/2024_10/fulfillment_order.rb
Instance Attribute Summary collapse
-
#assigned_location ⇒ Object
readonly
Returns the value of attribute assigned_location.
-
#assigned_location_id ⇒ Object
readonly
Returns the value of attribute assigned_location_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#delivery_method ⇒ Object
readonly
Returns the value of attribute delivery_method.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#fulfill_at ⇒ Object
readonly
Returns the value of attribute fulfill_at.
-
#fulfill_by ⇒ Object
readonly
Returns the value of attribute fulfill_by.
-
#fulfillment_holds ⇒ Object
readonly
Returns the value of attribute fulfillment_holds.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#international_duties ⇒ Object
readonly
Returns the value of attribute international_duties.
-
#line_items ⇒ Object
readonly
Returns the value of attribute line_items.
-
#merchant_requests ⇒ Object
readonly
Returns the value of attribute merchant_requests.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#request_status ⇒ Object
readonly
Returns the value of attribute request_status.
-
#shop_id ⇒ Object
readonly
Returns the value of attribute shop_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#supported_actions ⇒ Object
readonly
Returns the value of attribute supported_actions.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(order_id: nil, include_financial_summaries: nil, include_order_reference_fields: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .find(id:, include_financial_summaries: nil, include_order_reference_fields: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
Instance Method Summary collapse
- #cancel(body: nil, **kwargs) ⇒ Object
- #close(message: nil, body: nil, **kwargs) ⇒ Object
- #hold(fulfillment_hold: nil, body: nil, **kwargs) ⇒ Object
-
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ FulfillmentOrder
constructor
A new instance of FulfillmentOrder.
- #move(fulfillment_order: nil, body: nil, **kwargs) ⇒ Object
- #open(body: nil, **kwargs) ⇒ Object
- #release_hold(body: nil, **kwargs) ⇒ Object
- #reschedule(new_fulfill_at: nil, body: nil, **kwargs) ⇒ Object
- #set_fulfillment_orders_deadline(fulfillment_order_ids: nil, fulfillment_deadline: nil, body: nil, **kwargs) ⇒ Object
Methods inherited from Rest::Base
api_call_limit, base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, get_path_ids, has_many?, has_one?, inherited, json_body_name, json_response_body_names, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, retry_request_after, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ FulfillmentOrder
Returns a new instance of FulfillmentOrder.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @assigned_location = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @assigned_location_id = T.let(nil, T.nilable(Integer)) @delivery_method = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @destination = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @fulfill_at = T.let(nil, T.nilable(String)) @fulfill_by = T.let(nil, T.nilable(String)) @fulfillment_holds = T.let(nil, T.nilable(T::Array[T.untyped])) @id = T.let(nil, T.nilable(Integer)) @international_duties = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @line_items = T.let(nil, T.nilable(T::Array[T.untyped])) @merchant_requests = T.let(nil, T.nilable(T::Array[T.untyped])) @order_id = T.let(nil, T.nilable(Integer)) @request_status = T.let(nil, T.nilable(String)) @shop_id = T.let(nil, T.nilable(Integer)) @status = T.let(nil, T.nilable(String)) @supported_actions = T.let(nil, T.nilable(T::Array[T.untyped])) super(session: session, from_hash: from_hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base
Instance Attribute Details
#assigned_location ⇒ Object (readonly)
Returns the value of attribute assigned_location.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 56 def assigned_location @assigned_location end |
#assigned_location_id ⇒ Object (readonly)
Returns the value of attribute assigned_location_id.
58 59 60 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 58 def assigned_location_id @assigned_location_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
63 64 65 |
# File 'lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb', line 63 def created_at @created_at end |
#delivery_method ⇒ Object (readonly)
Returns the value of attribute delivery_method.
60 61 62 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 60 def delivery_method @delivery_method end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
62 63 64 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 62 def destination @destination end |
#fulfill_at ⇒ Object (readonly)
Returns the value of attribute fulfill_at.
64 65 66 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 64 def fulfill_at @fulfill_at end |
#fulfill_by ⇒ Object (readonly)
Returns the value of attribute fulfill_by.
66 67 68 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 66 def fulfill_by @fulfill_by end |
#fulfillment_holds ⇒ Object (readonly)
Returns the value of attribute fulfillment_holds.
68 69 70 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 68 def fulfillment_holds @fulfillment_holds end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
70 71 72 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 70 def id @id end |
#international_duties ⇒ Object (readonly)
Returns the value of attribute international_duties.
72 73 74 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 72 def international_duties @international_duties end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
74 75 76 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 74 def line_items @line_items end |
#merchant_requests ⇒ Object (readonly)
Returns the value of attribute merchant_requests.
76 77 78 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 76 def merchant_requests @merchant_requests end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
78 79 80 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 78 def order_id @order_id end |
#request_status ⇒ Object (readonly)
Returns the value of attribute request_status.
80 81 82 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 80 def request_status @request_status end |
#shop_id ⇒ Object (readonly)
Returns the value of attribute shop_id.
82 83 84 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 82 def shop_id @shop_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
84 85 86 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 84 def status @status end |
#supported_actions ⇒ Object (readonly)
Returns the value of attribute supported_actions.
86 87 88 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 86 def supported_actions @supported_actions end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
93 94 95 |
# File 'lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb', line 93 def updated_at @updated_at end |
Class Method Details
.all(order_id: nil, include_financial_summaries: nil, include_order_reference_fields: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 114 def all( order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {order_id: order_id}, params: {}.merge(kwargs).compact, ) T.cast(response, T::Array[FulfillmentOrder]) end |
.find(id:, include_financial_summaries: nil, include_order_reference_fields: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 95 def find( id:, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id}, params: {}, ) T.cast(result[0], T.nilable(FulfillmentOrder)) end |
Instance Method Details
#cancel(body: nil, **kwargs) ⇒ Object
136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 136 def cancel( body: nil, **kwargs ) self.class.request( http_method: :post, operation: :cancel, session: @session, ids: {id: @id}, params: {}.merge(kwargs).compact, body: body, entity: self, ) end |
#close(message: nil, body: nil, **kwargs) ⇒ Object
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 158 def close( message: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :close, session: @session, ids: {id: @id}, params: {message: }.merge(kwargs).compact, body: body, entity: self, ) end |
#hold(fulfillment_hold: nil, body: nil, **kwargs) ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 181 def hold( fulfillment_hold: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :hold, session: @session, ids: {id: @id}, params: {fulfillment_hold: fulfillment_hold}.merge(kwargs).compact, body: body, entity: self, ) end |
#move(fulfillment_order: nil, body: nil, **kwargs) ⇒ Object
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 204 def move( fulfillment_order: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :move, session: @session, ids: {id: @id}, params: {fulfillment_order: fulfillment_order}.merge(kwargs).compact, body: body, entity: self, ) end |
#open(body: nil, **kwargs) ⇒ Object
226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 226 def open( body: nil, **kwargs ) self.class.request( http_method: :post, operation: :open, session: @session, ids: {id: @id}, params: {}.merge(kwargs).compact, body: body, entity: self, ) end |
#release_hold(body: nil, **kwargs) ⇒ Object
247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 247 def release_hold( body: nil, **kwargs ) self.class.request( http_method: :post, operation: :release_hold, session: @session, ids: {id: @id}, params: {}.merge(kwargs).compact, body: body, entity: self, ) end |
#reschedule(new_fulfill_at: nil, body: nil, **kwargs) ⇒ Object
268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 268 def reschedule( body: nil, **kwargs ) self.class.request( http_method: :post, operation: :reschedule, session: @session, ids: {id: @id}, params: {}.merge(kwargs).compact, body: body, entity: self, ) end |
#set_fulfillment_orders_deadline(fulfillment_order_ids: nil, fulfillment_deadline: nil, body: nil, **kwargs) ⇒ Object
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb', line 292 def set_fulfillment_orders_deadline( fulfillment_order_ids: nil, fulfillment_deadline: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :set_fulfillment_orders_deadline, session: @session, ids: {}, params: {fulfillment_order_ids: fulfillment_order_ids, fulfillment_deadline: fulfillment_deadline}.merge(kwargs).compact, body: body, entity: self, ) end |