class ShopifyAPI::Order
Attributes
app_id[R]
billing_address[R]
browser_ip[R]
buyer_accepts_marketing[R]
cancel_reason[R]
cancelled_at[R]
cart_token[R]
checkout_token[R]
client_details[R]
closed_at[R]
company[R]
confirmation_number[R]
created_at[R]
currency[R]
current_subtotal_price[R]
current_subtotal_price_set[R]
current_total_additional_fees_set[R]
current_total_discounts[R]
current_total_discounts_set[R]
current_total_duties_set[R]
current_total_price[R]
current_total_price_set[R]
current_total_tax[R]
current_total_tax_set[R]
customer[R]
customer_locale[R]
discount_applications[R]
discount_codes[R]
email[R]
estimated_taxes[R]
financial_status[R]
fulfillment_status[R]
fulfillments[R]
gateway[R]
id[R]
landing_site[R]
line_items[R]
location_id[R]
merchant_of_record_app_id[R]
name[R]
note[R]
note_attributes[R]
number[R]
order_number[R]
order_status_url[R]
original_total_additional_fees_set[R]
original_total_duties_set[R]
payment_details[R]
payment_gateway_names[R]
payment_terms[R]
phone[R]
po_number[R]
presentment_currency[R]
processed_at[R]
processing_method[R]
referring_site[R]
refunds[R]
shipping_address[R]
shipping_lines[R]
source_identifier[R]
source_name[R]
source_url[R]
subtotal_price[R]
subtotal_price_set[R]
tax_lines[R]
taxes_included[R]
test[R]
token[R]
total_discounts[R]
total_discounts_set[R]
total_line_items_price[R]
total_line_items_price_set[R]
total_outstanding[R]
total_price[R]
total_price_set[R]
total_shipping_price_set[R]
total_tax[R]
total_tax_set[R]
total_tip_received[R]
total_weight[R]
updated_at[R]
user_id[R]
Public Class Methods
all( ids: nil, limit: nil, since_id: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, processed_at_min: nil, processed_at_max: nil, attribution_app_id: nil, status: nil, financial_status: nil, fulfillment_status: nil, fields: nil, session: ShopifyAPI::Context.active_session, **kwargs )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 337 def all( ids: nil, limit: nil, since_id: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, processed_at_min: nil, processed_at_max: nil, attribution_app_id: nil, status: nil, financial_status: nil, fulfillment_status: nil, fields: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {}, params: {ids: ids, limit: limit, since_id: since_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, processed_at_min: processed_at_min, processed_at_max: processed_at_max, attribution_app_id: attribution_app_id, status: status, financial_status: financial_status, fulfillment_status: fulfillment_status, fields: fields}.merge(kwargs).compact, ) T.cast(response, T::Array[Order]) end
count( created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, status: nil, financial_status: nil, fulfillment_status: nil, session: ShopifyAPI::Context.active_session, **kwargs )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 377 def count( created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, status: nil, financial_status: nil, fulfillment_status: nil, session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :count, session: session, ids: {}, 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, status: status, financial_status: financial_status, fulfillment_status: fulfillment_status}.merge(kwargs).compact, body: {}, entity: nil, ) end
delete( id:, session: ShopifyAPI::Context.active_session )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 304 def delete( id:, session: ShopifyAPI::Context.active_session ) request( http_method: :delete, operation: :delete, session: session, ids: {id: id}, params: {}, ) end
find( id:, fields: nil, session: ShopifyAPI::Context.active_session )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 285 def find( id:, fields: nil, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id}, params: {fields: fields}, ) T.cast(result[0], T.nilable(Order)) end
new(session: ShopifyAPI::Context.active_session, from_hash: nil)
click to toggle source
Calls superclass method
ShopifyAPI::Rest::Base::new
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @line_items = T.let(nil, T.nilable(T::Array[T.untyped])) @app_id = T.let(nil, T.nilable(Integer)) @billing_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @browser_ip = T.let(nil, T.nilable(String)) @buyer_accepts_marketing = T.let(nil, T.nilable(T::Boolean)) @cancel_reason = T.let(nil, T.nilable(String)) @cancelled_at = T.let(nil, T.nilable(String)) @cart_token = T.let(nil, T.nilable(String)) @checkout_token = T.let(nil, T.nilable(String)) @client_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @closed_at = T.let(nil, T.nilable(String)) @created_at = T.let(nil, T.nilable(String)) @currency = T.let(nil, T.nilable(String)) @current_subtotal_price = T.let(nil, T.nilable(String)) @current_subtotal_price_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @current_total_discounts = T.let(nil, T.nilable(String)) @current_total_discounts_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @current_total_duties_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @current_total_price = T.let(nil, T.nilable(String)) @current_total_price_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @current_total_tax = T.let(nil, T.nilable(String)) @current_total_tax_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @customer = T.let(nil, T.nilable(Customer)) @customer_locale = T.let(nil, T.nilable(String)) @discount_applications = T.let(nil, T.nilable(T::Array[T.untyped])) @discount_codes = T.let(nil, T.nilable(T::Array[T.untyped])) @email = T.let(nil, T.nilable(String)) @estimated_taxes = T.let(nil, T.nilable(T::Boolean)) @financial_status = T.let(nil, T.nilable(String)) @fulfillment_status = T.let(nil, T.nilable(String)) @fulfillments = T.let(nil, T.nilable(T::Array[T.untyped])) @gateway = T.let(nil, T.nilable(String)) @id = T.let(nil, T.nilable(Integer)) @landing_site = T.let(nil, T.nilable(String)) @location_id = T.let(nil, T.nilable(Integer)) @name = T.let(nil, T.nilable(String)) @note = T.let(nil, T.nilable(String)) @note_attributes = T.let(nil, T.nilable(T::Array[T.untyped])) @number = T.let(nil, T.nilable(Integer)) @order_number = T.let(nil, T.nilable(Integer)) @order_status_url = T.let(nil, T.nilable(String)) @original_total_duties_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @payment_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @payment_gateway_names = T.let(nil, T.nilable(T::Array[T.untyped])) @payment_terms = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @phone = T.let(nil, T.nilable(String)) @presentment_currency = T.let(nil, T.nilable(String)) @processed_at = T.let(nil, T.nilable(String)) @processing_method = T.let(nil, T.nilable(String)) @referring_site = T.let(nil, T.nilable(String)) @refunds = T.let(nil, T.nilable(T::Array[T.untyped])) @shipping_address = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @shipping_lines = T.let(nil, T.nilable(T::Array[T.untyped])) @source_identifier = T.let(nil, T.nilable(String)) @source_name = T.let(nil, T.nilable(String)) @source_url = T.let(nil, T.nilable(String)) @subtotal_price = T.let(nil, T.nilable(String)) @subtotal_price_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @tags = T.let(nil, T.nilable(String)) @tax_lines = T.let(nil, T.nilable(T::Array[T.untyped])) @taxes_included = T.let(nil, T.nilable(T::Boolean)) @test = T.let(nil, T.nilable(T::Boolean)) @token = T.let(nil, T.nilable(String)) @total_discounts = T.let(nil, T.nilable(String)) @total_discounts_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @total_line_items_price = T.let(nil, T.nilable(String)) @total_line_items_price_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @total_outstanding = T.let(nil, T.nilable(String)) @total_price = T.let(nil, T.nilable(String)) @total_price_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @total_shipping_price_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @total_tax = T.let(nil, T.nilable(T.any(String, Float))) @total_tax_set = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @total_tip_received = T.let(nil, T.nilable(String)) @total_weight = T.let(nil, T.nilable(Integer)) @updated_at = T.let(nil, T.nilable(String)) @user_id = T.let(nil, T.nilable(Integer)) super(session: session, from_hash: from_hash) end
Public Instance Methods
cancel( amount: nil, currency: nil, restock: nil, reason: nil, email: nil, refund: nil, body: nil, **kwargs )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 413 def cancel( amount: nil, currency: nil, restock: nil, reason: nil, email: nil, refund: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :cancel, session: @session, ids: {id: @id}, params: {amount: amount, currency: currency, restock: restock, reason: reason, email: email, refund: refund}.merge(kwargs).compact, body: body, entity: self, ) end
close( body: nil, **kwargs )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 440 def close( body: nil, **kwargs ) self.class.request( http_method: :post, operation: :close, session: @session, ids: {id: @id}, params: {}.merge(kwargs).compact, body: body, entity: self, ) end
open( body: nil, **kwargs )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/order.rb, line 461 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