Class: ShopifyAPI::FulfillmentOrder
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::FulfillmentOrder
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb,
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
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.
-
#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.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .find(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
Instance Method Summary collapse
- #cancel(body: nil, **kwargs) ⇒ Object
- #close(message: nil, body: nil, **kwargs) ⇒ Object
- #hold(reason: nil, reason_notes: nil, notify_merchant: nil, body: nil, **kwargs) ⇒ Object
-
#initialize(session: ShopifyAPI::Context.active_session) ⇒ FulfillmentOrder
constructor
A new instance of FulfillmentOrder.
- #move(new_location_id: nil, body: nil, **kwargs) ⇒ Object
- #open(body: nil, **kwargs) ⇒ Object
- #release_hold(body: nil, **kwargs) ⇒ Object
- #reschedule(body: nil, **kwargs) ⇒ Object
- #set_fulfillment_orders_deadline(fulfillment_order_ids: nil, fulfillment_deadline: nil, body: nil, **kwargs) ⇒ Object
Methods inherited from Rest::Base
base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, has_many?, has_one?, json_body_name, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session) ⇒ FulfillmentOrder
Returns a new instance of FulfillmentOrder.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 16 def initialize(session: ShopifyAPI::Context.active_session) super(session: session) @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)) @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])) 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.
51 52 53 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 51 def assigned_location @assigned_location end |
#assigned_location_id ⇒ Object (readonly)
Returns the value of attribute assigned_location_id.
53 54 55 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 53 def assigned_location_id @assigned_location_id end |
#delivery_method ⇒ Object (readonly)
Returns the value of attribute delivery_method.
55 56 57 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 55 def delivery_method @delivery_method end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
57 58 59 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 57 def destination @destination end |
#fulfill_at ⇒ Object (readonly)
Returns the value of attribute fulfill_at.
59 60 61 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 59 def fulfill_at @fulfill_at end |
#fulfill_by ⇒ Object (readonly)
Returns the value of attribute fulfill_by.
62 63 64 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 62 def fulfill_by @fulfill_by end |
#fulfillment_holds ⇒ Object (readonly)
Returns the value of attribute fulfillment_holds.
61 62 63 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 61 def fulfillment_holds @fulfillment_holds end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
63 64 65 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 63 def id @id end |
#international_duties ⇒ Object (readonly)
Returns the value of attribute international_duties.
65 66 67 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 65 def international_duties @international_duties end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
67 68 69 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 67 def line_items @line_items end |
#merchant_requests ⇒ Object (readonly)
Returns the value of attribute merchant_requests.
69 70 71 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 69 def merchant_requests @merchant_requests end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
71 72 73 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 71 def order_id @order_id end |
#request_status ⇒ Object (readonly)
Returns the value of attribute request_status.
73 74 75 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 73 def request_status @request_status end |
#shop_id ⇒ Object (readonly)
Returns the value of attribute shop_id.
75 76 77 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 75 def shop_id @shop_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
77 78 79 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 77 def status @status end |
#supported_actions ⇒ Object (readonly)
Returns the value of attribute supported_actions.
79 80 81 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 79 def supported_actions @supported_actions end |
Class Method Details
.all(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 107 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:, session: ShopifyAPI::Context.active_session) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 88 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
129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 129 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
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 151 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(reason: nil, reason_notes: nil, notify_merchant: nil, body: nil, **kwargs) ⇒ Object
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 176 def hold( reason: nil, reason_notes: nil, notify_merchant: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :hold, session: @session, ids: {id: @id}, params: {reason: reason, reason_notes: reason_notes, notify_merchant: notify_merchant}.merge(kwargs).compact, body: body, entity: self, ) end |
#move(new_location_id: nil, body: nil, **kwargs) ⇒ Object
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 201 def move( new_location_id: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :move, session: @session, ids: {id: @id}, params: {new_location_id: new_location_id}.merge(kwargs).compact, body: body, entity: self, ) end |
#open(body: nil, **kwargs) ⇒ Object
223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 223 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
244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 244 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(body: nil, **kwargs) ⇒ Object
265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb', line 265 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 |