Class: ShopifyAPI::PaymentTransaction

Inherits:
Rest::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2022_04/payment_transaction.rb,
lib/shopify_api/rest/resources/2022_07/payment_transaction.rb,
lib/shopify_api/rest/resources/2022_10/payment_transaction.rb,
lib/shopify_api/rest/resources/2023_01/payment_transaction.rb,
lib/shopify_api/rest/resources/2023_04/payment_transaction.rb,
lib/shopify_api/rest/resources/2023_07/payment_transaction.rb,
lib/shopify_api/rest/resources/2023_10/payment_transaction.rb,
lib/shopify_api/rest/resources/2024_01/payment_transaction.rb,
lib/shopify_api/rest/resources/2024_04/payment_transaction.rb,
lib/shopify_api/rest/resources/2024_07/payment_transaction.rb,
lib/shopify_api/rest/resources/2024_10/payment_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) ⇒ PaymentTransaction

Returns a new instance of PaymentTransaction.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/shopify_api/rest/resources/2022_04/payment_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(Currency))
  @fee = T.let(nil, T.nilable(String))
  @id = T.let(nil, T.nilable(Integer))
  @net = T.let(nil, T.nilable(String))
  @payout_id = T.let(nil, T.nilable(Integer))
  @payout_status = T.let(nil, T.nilable(String))
  @processed_at = T.let(nil, T.nilable(String))
  @source_id = T.let(nil, T.nilable(Integer))
  @source_order_id = T.let(nil, T.nilable(Integer))
  @source_order_transaction_id = T.let(nil, T.nilable(Integer))
  @source_type = T.let(nil, T.nilable(String))
  @test = T.let(nil, T.nilable(T::Boolean))
  @type = T.let(nil, T.nilable(String))

  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

#adjustment_order_transactionsObject (readonly)

Returns the value of attribute adjustment_order_transactions.



49
50
51
# File 'lib/shopify_api/rest/resources/2023_01/payment_transaction.rb', line 49

def adjustment_order_transactions
  @adjustment_order_transactions
end

#amountObject (readonly)

Returns the value of attribute amount.



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

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#feeObject (readonly)

Returns the value of attribute fee.



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

def fee
  @fee
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#netObject (readonly)

Returns the value of attribute net.



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

def net
  @net
end

#payout_idObject (readonly)

Returns the value of attribute payout_id.



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

def payout_id
  @payout_id
end

#payout_statusObject (readonly)

Returns the value of attribute payout_status.



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

def payout_status
  @payout_status
end

#processed_atObject (readonly)

Returns the value of attribute processed_at.



62
63
64
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 62

def processed_at
  @processed_at
end

#source_idObject (readonly)

Returns the value of attribute source_id.



64
65
66
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 64

def source_id
  @source_id
end

#source_order_idObject (readonly)

Returns the value of attribute source_order_id.



66
67
68
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 66

def source_order_id
  @source_order_id
end

#source_order_transaction_idObject (readonly)

Returns the value of attribute source_order_transaction_id.



68
69
70
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 68

def source_order_transaction_id
  @source_order_transaction_id
end

#source_typeObject (readonly)

Returns the value of attribute source_type.



70
71
72
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 70

def source_type
  @source_type
end

#testObject (readonly)

Returns the value of attribute test.



72
73
74
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 72

def test
  @test
end

#typeObject (readonly)

Returns the value of attribute type.



74
75
76
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 74

def type
  @type
end

Class Method Details

.transactions(since_id: nil, last_id: nil, test: nil, payout_id: nil, payout_status: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 88

def transactions(
  since_id: nil,
  last_id: nil,
  test: nil,
  payout_id: nil,
  payout_status: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  request(
    http_method: :get,
    operation: :transactions,
    session: session,
    ids: {},
    params: {since_id: since_id, last_id: last_id, test: test, payout_id: payout_id, payout_status: payout_status}.merge(kwargs).compact,
    body: {},
    entity: nil,
  )
end