Class: ShopifyAPI::Fulfillment
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::Fulfillment
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_07/fulfillment.rb,
lib/shopify_api/rest/resources/2022_10/fulfillment.rb,
lib/shopify_api/rest/resources/2023_01/fulfillment.rb,
lib/shopify_api/rest/resources/2023_04/fulfillment.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#line_items ⇒ Object
readonly
Returns the value of attribute line_items.
-
#location_id ⇒ Object
readonly
Returns the value of attribute location_id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#notify_customer ⇒ Object
readonly
Returns the value of attribute notify_customer.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#origin_address ⇒ Object
readonly
Returns the value of attribute origin_address.
-
#receipt ⇒ Object
readonly
Returns the value of attribute receipt.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#shipment_status ⇒ Object
readonly
Returns the value of attribute shipment_status.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tracking_company ⇒ Object
readonly
Returns the value of attribute tracking_company.
-
#tracking_numbers ⇒ Object
readonly
Returns the value of attribute tracking_numbers.
-
#tracking_urls ⇒ Object
readonly
Returns the value of attribute tracking_urls.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#variant_inventory_management ⇒ Object
readonly
Returns the value of attribute variant_inventory_management.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(fulfillment_order_id: nil, order_id: nil, created_at_max: nil, created_at_min: nil, fields: nil, limit: nil, since_id: nil, updated_at_max: nil, updated_at_min: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .count(order_id: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .find(id:, order_id: nil, fields: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
Instance Method Summary collapse
- #cancel(body: nil, **kwargs) ⇒ Object
-
#initialize(session: ShopifyAPI::Context.active_session) ⇒ Fulfillment
constructor
A new instance of Fulfillment.
- #update_tracking(notify_customer: nil, tracking_info: 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_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) ⇒ Fulfillment
Returns a new instance of Fulfillment.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 16 def initialize(session: ShopifyAPI::Context.active_session) super(session: session) @created_at = T.let(nil, T.nilable(String)) @id = T.let(nil, T.nilable(Integer)) @line_items = T.let(nil, T.nilable(T::Array[T.untyped])) @location_id = T.let(nil, T.nilable(Integer)) @name = T.let(nil, T.nilable(String)) @notify_customer = T.let(nil, T.nilable(T::Boolean)) @order_id = T.let(nil, T.nilable(Integer)) @origin_address = T.let(nil, T.nilable(T::Array[T.untyped])) @receipt = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @service = T.let(nil, T.nilable(String)) @shipment_status = T.let(nil, T.nilable(String)) @status = T.let(nil, T.nilable(String)) @tracking_company = T.let(nil, T.nilable(String)) @tracking_numbers = T.let(nil, T.nilable(T::Array[T.untyped])) @tracking_urls = T.let(nil, T.nilable(T::Array[T.untyped])) @updated_at = T.let(nil, T.nilable(String)) @variant_inventory_management = T.let(nil, T.nilable(String)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
51 52 53 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 51 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
53 54 55 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 53 def id @id end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
55 56 57 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 55 def line_items @line_items end |
#location_id ⇒ Object (readonly)
Returns the value of attribute location_id.
57 58 59 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 57 def location_id @location_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
59 60 61 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 59 def name @name end |
#notify_customer ⇒ Object (readonly)
Returns the value of attribute notify_customer.
61 62 63 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 61 def notify_customer @notify_customer end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
63 64 65 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 63 def order_id @order_id end |
#origin_address ⇒ Object (readonly)
Returns the value of attribute origin_address.
65 66 67 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 65 def origin_address @origin_address end |
#receipt ⇒ Object (readonly)
Returns the value of attribute receipt.
67 68 69 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 67 def receipt @receipt end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
69 70 71 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 69 def service @service end |
#shipment_status ⇒ Object (readonly)
Returns the value of attribute shipment_status.
71 72 73 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 71 def shipment_status @shipment_status end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
73 74 75 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 73 def status @status end |
#tracking_company ⇒ Object (readonly)
Returns the value of attribute tracking_company.
75 76 77 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 75 def tracking_company @tracking_company end |
#tracking_numbers ⇒ Object (readonly)
Returns the value of attribute tracking_numbers.
77 78 79 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 77 def tracking_numbers @tracking_numbers end |
#tracking_urls ⇒ Object (readonly)
Returns the value of attribute tracking_urls.
79 80 81 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 79 def tracking_urls @tracking_urls end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
81 82 83 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 81 def updated_at @updated_at end |
#variant_inventory_management ⇒ Object (readonly)
Returns the value of attribute variant_inventory_management.
83 84 85 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 83 def variant_inventory_management @variant_inventory_management end |
Class Method Details
.all(fulfillment_order_id: nil, order_id: nil, created_at_max: nil, created_at_min: nil, fields: nil, limit: nil, since_id: nil, updated_at_max: nil, updated_at_min: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 123 def all( fulfillment_order_id: nil, order_id: nil, created_at_max: nil, created_at_min: nil, fields: nil, limit: nil, since_id: nil, updated_at_max: nil, updated_at_min: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {fulfillment_order_id: fulfillment_order_id, order_id: order_id}, params: {created_at_max: created_at_max, created_at_min: created_at_min, fields: fields, limit: limit, since_id: since_id, updated_at_max: updated_at_max, updated_at_min: updated_at_min}.merge(kwargs).compact, ) T.cast(response, T::Array[Fulfillment]) end |
.count(order_id: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 156 def count( order_id: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :count, session: session, ids: {order_id: order_id}, params: {created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max}.merge(kwargs).compact, body: {}, entity: nil, ) end |
.find(id:, order_id: nil, fields: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 94 def find( id:, order_id: nil, fields: nil, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id, order_id: order_id}, params: {fields: fields}, ) T.cast(result[0], T.nilable(Fulfillment)) end |
Instance Method Details
#cancel(body: nil, **kwargs) ⇒ Object
184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 184 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 |
#update_tracking(notify_customer: nil, tracking_info: nil, body: nil, **kwargs) ⇒ Object
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/shopify_api/rest/resources/2022_07/fulfillment.rb', line 207 def update_tracking( notify_customer: nil, tracking_info: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :update_tracking, session: @session, ids: {id: @id}, params: {notify_customer: notify_customer, tracking_info: tracking_info}.merge(kwargs).compact, body: body, entity: self, ) end |