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

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) ⇒ PaymentTransaction

Returns a new instance of PaymentTransaction.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/shopify_api/rest/resources/2022_04/payment_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(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))
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.



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

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#feeObject (readonly)

Returns the value of attribute fee.



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

def fee
  @fee
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#netObject (readonly)

Returns the value of attribute net.



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

def net
  @net
end

#payout_idObject (readonly)

Returns the value of attribute payout_id.



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

def payout_id
  @payout_id
end

#payout_statusObject (readonly)

Returns the value of attribute payout_status.



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

def payout_status
  @payout_status
end

#processed_atObject (readonly)

Returns the value of attribute processed_at.



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

def processed_at
  @processed_at
end

#source_idObject (readonly)

Returns the value of attribute source_id.



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

def source_id
  @source_id
end

#source_order_idObject (readonly)

Returns the value of attribute source_order_id.



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

def source_order_id
  @source_order_id
end

#source_order_transaction_idObject (readonly)

Returns the value of attribute source_order_transaction_id.



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

def source_order_transaction_id
  @source_order_transaction_id
end

#source_typeObject (readonly)

Returns the value of attribute source_type.



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

def source_type
  @source_type
end

#testObject (readonly)

Returns the value of attribute test.



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

def test
  @test
end

#typeObject (readonly)

Returns the value of attribute type.



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

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



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/shopify_api/rest/resources/2022_04/payment_transaction.rb', line 84

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