Class: ShopifyAPI::Fulfillment
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::Fulfillment
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2021_07/fulfillment.rb,
lib/shopify_api/rest/resources/2021_10/fulfillment.rb,
lib/shopify_api/rest/resources/2022_01/fulfillment.rb,
lib/shopify_api/rest/resources/2022_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
-
#initialize(session: ShopifyAPI::Context.active_session) ⇒ Fulfillment
constructor
A new instance of Fulfillment.
- #update_tracking(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) ⇒ Fulfillment
Returns a new instance of Fulfillment.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 12 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)) @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.
44 45 46 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 44 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
46 47 48 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 46 def id @id end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
48 49 50 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 48 def line_items @line_items end |
#location_id ⇒ Object (readonly)
Returns the value of attribute location_id.
50 51 52 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 50 def location_id @location_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
52 53 54 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 52 def name @name end |
#notify_customer ⇒ Object (readonly)
Returns the value of attribute notify_customer.
54 55 56 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 54 def notify_customer @notify_customer end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 56 def order_id @order_id end |
#origin_address ⇒ Object (readonly)
Returns the value of attribute origin_address.
59 60 61 |
# File 'lib/shopify_api/rest/resources/2021_10/fulfillment.rb', line 59 def origin_address @origin_address end |
#receipt ⇒ Object (readonly)
Returns the value of attribute receipt.
58 59 60 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 58 def receipt @receipt end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
60 61 62 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 60 def service @service end |
#shipment_status ⇒ Object (readonly)
Returns the value of attribute shipment_status.
62 63 64 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 62 def shipment_status @shipment_status end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
64 65 66 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 64 def status @status end |
#tracking_company ⇒ Object (readonly)
Returns the value of attribute tracking_company.
66 67 68 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 66 def tracking_company @tracking_company end |
#tracking_numbers ⇒ Object (readonly)
Returns the value of attribute tracking_numbers.
68 69 70 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 68 def tracking_numbers @tracking_numbers end |
#tracking_urls ⇒ Object (readonly)
Returns the value of attribute tracking_urls.
70 71 72 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 70 def tracking_urls @tracking_urls end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
72 73 74 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 72 def updated_at @updated_at end |
#variant_inventory_management ⇒ Object (readonly)
Returns the value of attribute variant_inventory_management.
74 75 76 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 74 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
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 114 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
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 147 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
85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 85 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
#update_tracking(body: nil, **kwargs) ⇒ Object
175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/shopify_api/rest/resources/2021_07/fulfillment.rb', line 175 def update_tracking( body: nil, **kwargs ) self.class.request( http_method: :post, operation: :update_tracking, session: @session, ids: {id: @id}, params: {}.merge(kwargs).compact, body: body, entity: self, ) end |