Class: ShopifyAPI::TenderTransaction

Inherits:
Rest::Base show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2022_04/tender_transaction.rb,
lib/shopify_api/rest/resources/2022_07/tender_transaction.rb,
lib/shopify_api/rest/resources/2022_10/tender_transaction.rb,
lib/shopify_api/rest/resources/2023_01/tender_transaction.rb,
lib/shopify_api/rest/resources/2023_04/tender_transaction.rb,
lib/shopify_api/rest/resources/2023_07/tender_transaction.rb,
lib/shopify_api/rest/resources/2023_10/tender_transaction.rb,
lib/shopify_api/rest/resources/2024_01/tender_transaction.rb,
lib/shopify_api/rest/resources/2024_04/tender_transaction.rb,
lib/shopify_api/rest/resources/2024_07/tender_transaction.rb,
lib/shopify_api/rest/resources/2024_10/tender_transaction.rb

Instance Attribute Summary collapse

Attributes inherited from Rest::Base

#errors, #original_state

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rest::Base

api_call_limit, base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, get_path_ids, has_many?, has_one?, inherited, 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?, retry_request_after, #save, #save!, #to_hash

Constructor Details

#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ TenderTransaction

Returns a new instance of TenderTransaction.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 19

def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)

  @amount = T.let(nil, T.nilable(String))
  @currency = T.let(nil, T.nilable(String))
  @id = T.let(nil, T.nilable(Integer))
  @order_id = T.let(nil, T.nilable(Integer))
  @payment_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
  @payment_method = T.let(nil, T.nilable(String))
  @processed_at = T.let(nil, T.nilable(String))
  @remote_reference = T.let(nil, T.nilable(String))
  @test = T.let(nil, T.nilable(T::Boolean))
  @user_id = T.let(nil, T.nilable(Integer))

  super(session: session, from_hash: from_hash)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



42
43
44
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 42

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency.



44
45
46
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 44

def currency
  @currency
end

#idObject (readonly)

Returns the value of attribute id.



46
47
48
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 46

def id
  @id
end

#order_idObject (readonly)

Returns the value of attribute order_id.



48
49
50
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 48

def order_id
  @order_id
end

#payment_detailsObject (readonly)

Returns the value of attribute payment_details.



50
51
52
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 50

def payment_details
  @payment_details
end

#payment_methodObject (readonly)

Returns the value of attribute payment_method.



52
53
54
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 52

def payment_method
  @payment_method
end

#processed_atObject (readonly)

Returns the value of attribute processed_at.



54
55
56
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 54

def processed_at
  @processed_at
end

#remote_referenceObject (readonly)

Returns the value of attribute remote_reference.



56
57
58
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 56

def remote_reference
  @remote_reference
end

#testObject (readonly)

Returns the value of attribute test.



58
59
60
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 58

def test
  @test
end

#user_idObject (readonly)

Returns the value of attribute user_id.



60
61
62
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 60

def user_id
  @user_id
end

Class Method Details

.all(limit: nil, since_id: nil, processed_at_min: nil, processed_at_max: nil, processed_at: nil, order: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 75

def all(
  limit: nil,
  since_id: nil,
  processed_at_min: nil,
  processed_at_max: nil,
  processed_at: nil,
  order: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  response = base_find(
    session: session,
    ids: {},
    params: {limit: limit, since_id: since_id, processed_at_min: processed_at_min, processed_at_max: processed_at_max, processed_at: processed_at, order: order}.merge(kwargs).compact,
  )

  T.cast(response, T::Array[TenderTransaction])
end