Class: ShopifyAPI::FulfillmentOrder
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::FulfillmentOrder
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb,
lib/shopify_api/rest/resources/2021_10/fulfillment_order.rb,
lib/shopify_api/rest/resources/2022_01/fulfillment_order.rb,
lib/shopify_api/rest/resources/2022_04/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.
-
#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
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.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 12 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)) @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.
44 45 46 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 44 def assigned_location @assigned_location end |
#assigned_location_id ⇒ Object (readonly)
Returns the value of attribute assigned_location_id.
46 47 48 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 46 def assigned_location_id @assigned_location_id end |
#delivery_method ⇒ Object (readonly)
Returns the value of attribute delivery_method.
48 49 50 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 48 def delivery_method @delivery_method end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
50 51 52 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 50 def destination @destination end |
#fulfill_at ⇒ Object (readonly)
Returns the value of attribute fulfill_at.
52 53 54 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 52 def fulfill_at @fulfill_at end |
#fulfillment_holds ⇒ Object (readonly)
Returns the value of attribute fulfillment_holds.
57 58 59 |
# File 'lib/shopify_api/rest/resources/2021_10/fulfillment_order.rb', line 57 def fulfillment_holds @fulfillment_holds end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
54 55 56 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 54 def id @id end |
#international_duties ⇒ Object (readonly)
Returns the value of attribute international_duties.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 56 def international_duties @international_duties end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
58 59 60 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 58 def line_items @line_items end |
#merchant_requests ⇒ Object (readonly)
Returns the value of attribute merchant_requests.
60 61 62 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 60 def merchant_requests @merchant_requests end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
62 63 64 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 62 def order_id @order_id end |
#request_status ⇒ Object (readonly)
Returns the value of attribute request_status.
64 65 66 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 64 def request_status @request_status end |
#shop_id ⇒ Object (readonly)
Returns the value of attribute shop_id.
66 67 68 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 66 def shop_id @shop_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
68 69 70 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 68 def status @status end |
#supported_actions ⇒ Object (readonly)
Returns the value of attribute supported_actions.
70 71 72 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 70 def supported_actions @supported_actions end |
Class Method Details
.all(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 98 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
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 79 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
120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 120 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
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 142 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
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/shopify_api/rest/resources/2021_10/fulfillment_order.rb', line 172 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
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 165 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
187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 187 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
240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/shopify_api/rest/resources/2021_10/fulfillment_order.rb', line 240 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
208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment_order.rb', line 208 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 |