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

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

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

Constructor Details

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

Returns a new instance of TenderTransaction.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 16

def initialize(session: ShopifyAPI::Context.active_session)
  super(session: session)

  @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))
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.



38
39
40
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 38

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#order_idObject (readonly)

Returns the value of attribute order_id.



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

def order_id
  @order_id
end

#payment_detailsObject (readonly)

Returns the value of attribute payment_details.



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

def payment_details
  @payment_details
end

#payment_methodObject (readonly)

Returns the value of attribute payment_method.



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

def payment_method
  @payment_method
end

#processed_atObject (readonly)

Returns the value of attribute processed_at.



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

def processed_at
  @processed_at
end

#remote_referenceObject (readonly)

Returns the value of attribute remote_reference.



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

def remote_reference
  @remote_reference
end

#testObject (readonly)

Returns the value of attribute test.



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

def test
  @test
end

#user_idObject (readonly)

Returns the value of attribute user_id.



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

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



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/shopify_api/rest/resources/2022_04/tender_transaction.rb', line 71

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