Class: ShopifyAPI::TenderTransaction

Inherits:
Rest::Base show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2021_07/tender_transaction.rb,
lib/shopify_api/rest/resources/2021_10/tender_transaction.rb,
lib/shopify_api/rest/resources/2022_01/tender_transaction.rb,
lib/shopify_api/rest/resources/2022_04/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, #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.


12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/shopify_api/rest/resources/2021_07/tender_transaction.rb', line 12

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.


34
35
36
# File 'lib/shopify_api/rest/resources/2021_07/tender_transaction.rb', line 34

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency.


36
37
38
# File 'lib/shopify_api/rest/resources/2021_07/tender_transaction.rb', line 36

def currency
  @currency
end

#idObject (readonly)

Returns the value of attribute id.


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

def id
  @id
end

#order_idObject (readonly)

Returns the value of attribute order_id.


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

def order_id
  @order_id
end

#payment_detailsObject (readonly)

Returns the value of attribute payment_details.


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

def payment_details
  @payment_details
end

#payment_methodObject (readonly)

Returns the value of attribute payment_method.


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

def payment_method
  @payment_method
end

#processed_atObject (readonly)

Returns the value of attribute processed_at.


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

def processed_at
  @processed_at
end

#remote_referenceObject (readonly)

Returns the value of attribute remote_reference.


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

def remote_reference
  @remote_reference
end

#testObject (readonly)

Returns the value of attribute test.


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

def test
  @test
end

#user_idObject (readonly)

Returns the value of attribute user_id.


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

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


67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/shopify_api/rest/resources/2021_07/tender_transaction.rb', line 67

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