class ShopifyAPI::Transaction

Attributes

amount[R]
authorization[R]
authorization_expires_at[R]
created_at[R]
currency[R]
currency_exchange_adjustment[R]
device_id[R]
error_code[R]
extended_authorization_attributes[R]
gateway[R]
id[R]
kind[R]
location_id[R]
message[R]
order_id[R]
parent_id[R]
payment_details[R]
payments_refund_attributes[R]
processed_at[R]
receipt[R]
source_name[R]
status[R]
test[R]
total_unsettled_set[R]
user_id[R]

Public Class Methods

all( order_id: nil, since_id: nil, fields: nil, in_shop_currency: nil, session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle source
# 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 ) click to toggle source
# 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 ) click to toggle source
# 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
new(session: ShopifyAPI::Context.active_session, from_hash: nil) click to toggle source
Calls superclass method ShopifyAPI::Rest::Base::new
# 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