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
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, 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(fulfillment_hold: nil, body: nil, **kwargs) ⇒ Object
-
#initialize(session: ShopifyAPI::Context.active_session) ⇒ 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(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, 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?, #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 35 |
# File 'lib/shopify_api/rest/resources/2022_04/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)) @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])) 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.
52 53 54 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 52 def assigned_location @assigned_location end |
#assigned_location_id ⇒ Object (readonly)
Returns the value of attribute assigned_location_id.
54 55 56 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 54 def assigned_location_id @assigned_location_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
59 60 61 |
# File 'lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb', line 59 def created_at @created_at end |
#delivery_method ⇒ Object (readonly)
Returns the value of attribute delivery_method.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 56 def delivery_method @delivery_method end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
58 59 60 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 58 def destination @destination end |
#fulfill_at ⇒ Object (readonly)
Returns the value of attribute fulfill_at.
60 61 62 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 60 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.
64 65 66 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 64 def fulfillment_holds @fulfillment_holds end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
66 67 68 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 66 def id @id end |
#international_duties ⇒ Object (readonly)
Returns the value of attribute international_duties.
68 69 70 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 68 def international_duties @international_duties end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
70 71 72 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 70 def line_items @line_items end |
#merchant_requests ⇒ Object (readonly)
Returns the value of attribute merchant_requests.
72 73 74 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 72 def merchant_requests @merchant_requests end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
74 75 76 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 74 def order_id @order_id end |
#request_status ⇒ Object (readonly)
Returns the value of attribute request_status.
76 77 78 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 76 def request_status @request_status end |
#shop_id ⇒ Object (readonly)
Returns the value of attribute shop_id.
78 79 80 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 78 def shop_id @shop_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
80 81 82 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 80 def status @status end |
#supported_actions ⇒ Object (readonly)
Returns the value of attribute supported_actions.
82 83 84 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 82 def supported_actions @supported_actions end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
89 90 91 |
# File 'lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb', line 89 def updated_at @updated_at end |
Class Method Details
.all(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 110 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
91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 91 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
132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 132 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
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 154 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
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 177 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
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 200 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
222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 222 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
243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 243 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
264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb', line 264 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
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb', line 288 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 |