Class: ShopifyAPI::Transaction
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::Transaction
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/transaction.rb,
lib/shopify_api/rest/resources/2022_07/transaction.rb,
lib/shopify_api/rest/resources/2022_10/transaction.rb,
lib/shopify_api/rest/resources/2023_01/transaction.rb,
lib/shopify_api/rest/resources/2023_04/transaction.rb,
lib/shopify_api/rest/resources/2023_07/transaction.rb,
lib/shopify_api/rest/resources/2023_10/transaction.rb,
lib/shopify_api/rest/resources/2024_01/transaction.rb,
lib/shopify_api/rest/resources/2024_04/transaction.rb,
lib/shopify_api/rest/resources/2024_07/transaction.rb,
lib/shopify_api/rest/resources/2024_10/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#authorization_expires_at ⇒ Object
readonly
Returns the value of attribute authorization_expires_at.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#currency_exchange_adjustment ⇒ Object
readonly
Returns the value of attribute currency_exchange_adjustment.
-
#device_id ⇒ Object
readonly
Returns the value of attribute device_id.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#extended_authorization_attributes ⇒ Object
readonly
Returns the value of attribute extended_authorization_attributes.
-
#gateway ⇒ Object
readonly
Returns the value of attribute gateway.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#location_id ⇒ Object
readonly
Returns the value of attribute location_id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
-
#payment_details ⇒ Object
readonly
Returns the value of attribute payment_details.
-
#payments_refund_attributes ⇒ Object
readonly
Returns the value of attribute payments_refund_attributes.
-
#processed_at ⇒ Object
readonly
Returns the value of attribute processed_at.
-
#receipt ⇒ Object
readonly
Returns the value of attribute receipt.
-
#source_name ⇒ Object
readonly
Returns the value of attribute source_name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
-
#total_unsettled_set ⇒ Object
readonly
Returns the value of attribute total_unsettled_set.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(order_id: nil, since_id: nil, fields: nil, in_shop_currency: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .count(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .find(id:, order_id: nil, fields: nil, in_shop_currency: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
Instance Method Summary collapse
-
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ Transaction
constructor
A new instance of Transaction.
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) ⇒ Transaction
Returns a new instance of Transaction.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @kind = T.let(nil, T.nilable(String)) @amount = T.let(nil, T.nilable(String)) @authorization = T.let(nil, T.nilable(String)) @authorization_expires_at = T.let(nil, T.nilable(String)) @created_at = T.let(nil, T.nilable(String)) @currency = T.let(nil, T.nilable(String)) @currency_exchange_adjustment = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @device_id = T.let(nil, T.nilable(Integer)) @error_code = T.let(nil, T.nilable(String)) @extended_authorization_attributes = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @gateway = T.let(nil, T.nilable(String)) @id = T.let(nil, T.nilable(Integer)) @location_id = T.let(nil, T.nilable(Integer)) @message = T.let(nil, T.nilable(String)) @order_id = T.let(nil, T.nilable(Integer)) @parent_id = T.let(nil, T.nilable(Integer)) @payment_details = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @payments_refund_attributes = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @processed_at = T.let(nil, T.nilable(String)) @receipt = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @source_name = T.let(nil, T.nilable(String)) @status = 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
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
61 62 63 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 61 def amount @amount end |
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
63 64 65 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 63 def @authorization end |
#authorization_expires_at ⇒ Object (readonly)
Returns the value of attribute authorization_expires_at.
65 66 67 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 65 def @authorization_expires_at end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
67 68 69 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 67 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
69 70 71 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 69 def currency @currency end |
#currency_exchange_adjustment ⇒ Object (readonly)
Returns the value of attribute currency_exchange_adjustment.
71 72 73 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 71 def currency_exchange_adjustment @currency_exchange_adjustment end |
#device_id ⇒ Object (readonly)
Returns the value of attribute device_id.
73 74 75 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 73 def device_id @device_id end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
75 76 77 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 75 def error_code @error_code end |
#extended_authorization_attributes ⇒ Object (readonly)
Returns the value of attribute extended_authorization_attributes.
77 78 79 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 77 def @extended_authorization_attributes end |
#gateway ⇒ Object (readonly)
Returns the value of attribute gateway.
79 80 81 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 79 def gateway @gateway end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
81 82 83 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 81 def id @id end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
59 60 61 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 59 def kind @kind end |
#location_id ⇒ Object (readonly)
Returns the value of attribute location_id.
83 84 85 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 83 def location_id @location_id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
85 86 87 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 85 def @message end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
87 88 89 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 87 def order_id @order_id end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
89 90 91 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 89 def parent_id @parent_id end |
#payment_details ⇒ Object (readonly)
Returns the value of attribute payment_details.
91 92 93 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 91 def payment_details @payment_details end |
#payments_refund_attributes ⇒ Object (readonly)
Returns the value of attribute payments_refund_attributes.
93 94 95 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 93 def payments_refund_attributes @payments_refund_attributes end |
#processed_at ⇒ Object (readonly)
Returns the value of attribute processed_at.
95 96 97 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 95 def processed_at @processed_at end |
#receipt ⇒ Object (readonly)
Returns the value of attribute receipt.
97 98 99 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 97 def receipt @receipt end |
#source_name ⇒ Object (readonly)
Returns the value of attribute source_name.
99 100 101 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 99 def source_name @source_name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
101 102 103 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 101 def status @status end |
#test ⇒ Object (readonly)
Returns the value of attribute test.
103 104 105 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 103 def test @test end |
#total_unsettled_set ⇒ Object (readonly)
Returns the value of attribute total_unsettled_set.
106 107 108 |
# File 'lib/shopify_api/rest/resources/2023_04/transaction.rb', line 106 def total_unsettled_set @total_unsettled_set end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
105 106 107 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 105 def user_id @user_id end |
Class Method Details
.all(order_id: nil, since_id: nil, fields: nil, in_shop_currency: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 142 def all( order_id: nil, since_id: nil, fields: nil, in_shop_currency: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {order_id: order_id}, params: {since_id: since_id, fields: fields, in_shop_currency: in_shop_currency}.merge(kwargs).compact, ) T.cast(response, T::Array[Transaction]) end |
.count(order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 166 def count( order_id: nil, session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :count, session: session, ids: {order_id: order_id}, params: {}.merge(kwargs).compact, body: {}, entity: nil, ) end |
.find(id:, order_id: nil, fields: nil, in_shop_currency: nil, session: ShopifyAPI::Context.active_session) ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/shopify_api/rest/resources/2022_04/transaction.rb', line 117 def find( id:, order_id: nil, fields: nil, in_shop_currency: nil, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id, order_id: order_id}, params: {fields: fields, in_shop_currency: in_shop_currency}, ) T.cast(result[0], T.nilable(Transaction)) end |