Class: Stripe::Issuing::Transaction

Inherits:
APIResource show all
Extended by:
APIOperations::List
Includes:
APIOperations::Save
Defined in:
lib/stripe/resources/issuing/transaction.rb

Overview

Any use of an [issued card](stripe.com/docs/issuing) that results in funds entering or leaving your Stripe account, such as a completed purchase or refund, is represented by an Issuing ‘Transaction` object.

Related guide: [Issued card transactions](stripe.com/docs/issuing/purchases/transactions)

Defined Under Namespace

Classes: AmountDetails, CreateForceCaptureParams, CreateUnlinkedRefundParams, ListParams, MerchantData, NetworkData, PurchaseDetails, RefundParams, RetrieveParams, TestHelpers, Treasury, UpdateParams

Constant Summary collapse

OBJECT_NAME =
"issuing.transaction"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::List

list

Methods included from APIOperations::Save

included, #save

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#amountObject (readonly)

The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).



901
902
903
# File 'lib/stripe/resources/issuing/transaction.rb', line 901

def amount
  @amount
end

#amount_detailsObject (readonly)

Detailed breakdown of amount components. These amounts are denominated in ‘currency` and in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).



903
904
905
# File 'lib/stripe/resources/issuing/transaction.rb', line 903

def amount_details
  @amount_details
end

#authorizationObject (readonly)

The ‘Authorization` object that led to this transaction.



905
906
907
# File 'lib/stripe/resources/issuing/transaction.rb', line 905

def authorization
  @authorization
end

#balance_transactionObject (readonly)

ID of the [balance transaction](stripe.com/docs/api/balance_transactions) associated with this transaction.



907
908
909
# File 'lib/stripe/resources/issuing/transaction.rb', line 907

def balance_transaction
  @balance_transaction
end

#cardObject (readonly)

The card used to make this transaction.



909
910
911
# File 'lib/stripe/resources/issuing/transaction.rb', line 909

def card
  @card
end

#cardholderObject (readonly)

The cardholder to whom this transaction belongs.



911
912
913
# File 'lib/stripe/resources/issuing/transaction.rb', line 911

def cardholder
  @cardholder
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



913
914
915
# File 'lib/stripe/resources/issuing/transaction.rb', line 913

def created
  @created
end

#currencyObject (readonly)

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



915
916
917
# File 'lib/stripe/resources/issuing/transaction.rb', line 915

def currency
  @currency
end

#disputeObject (readonly)

If you’ve disputed the transaction, the ID of the dispute.



917
918
919
# File 'lib/stripe/resources/issuing/transaction.rb', line 917

def dispute
  @dispute
end

#idObject (readonly)

Unique identifier for the object.



919
920
921
# File 'lib/stripe/resources/issuing/transaction.rb', line 919

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



921
922
923
# File 'lib/stripe/resources/issuing/transaction.rb', line 921

def livemode
  @livemode
end

#merchant_amountObject (readonly)

The amount that the merchant will receive, denominated in ‘merchant_currency` and in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.



923
924
925
# File 'lib/stripe/resources/issuing/transaction.rb', line 923

def merchant_amount
  @merchant_amount
end

#merchant_currencyObject (readonly)

The currency with which the merchant is taking payment.



925
926
927
# File 'lib/stripe/resources/issuing/transaction.rb', line 925

def merchant_currency
  @merchant_currency
end

#merchant_dataObject (readonly)

Attribute for field merchant_data



927
928
929
# File 'lib/stripe/resources/issuing/transaction.rb', line 927

def merchant_data
  @merchant_data
end

#metadataObject (readonly)

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



929
930
931
# File 'lib/stripe/resources/issuing/transaction.rb', line 929

def 
  @metadata
end

#network_dataObject (readonly)

Details about the transaction, such as processing dates, set by the card network.



931
932
933
# File 'lib/stripe/resources/issuing/transaction.rb', line 931

def network_data
  @network_data
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



933
934
935
# File 'lib/stripe/resources/issuing/transaction.rb', line 933

def object
  @object
end

#purchase_detailsObject (readonly)

Additional purchase information that is optionally provided by the merchant.



935
936
937
# File 'lib/stripe/resources/issuing/transaction.rb', line 935

def purchase_details
  @purchase_details
end

#settlementObject (readonly)

Attribute for field settlement



937
938
939
# File 'lib/stripe/resources/issuing/transaction.rb', line 937

def settlement
  @settlement
end

#tokenObject (readonly)

[Token](stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.



939
940
941
# File 'lib/stripe/resources/issuing/transaction.rb', line 939

def token
  @token
end

#treasuryObject (readonly)

[Treasury](stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts



941
942
943
# File 'lib/stripe/resources/issuing/transaction.rb', line 941

def treasury
  @treasury
end

#typeObject (readonly)

The nature of the transaction.



943
944
945
# File 'lib/stripe/resources/issuing/transaction.rb', line 943

def type
  @type
end

#walletObject (readonly)

The digital wallet used for this transaction. One of ‘apple_pay`, `google_pay`, or `samsung_pay`.



945
946
947
# File 'lib/stripe/resources/issuing/transaction.rb', line 945

def wallet
  @wallet
end

Class Method Details

.list(params = {}, opts = {}) ⇒ Object

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.



948
949
950
951
952
953
954
955
# File 'lib/stripe/resources/issuing/transaction.rb', line 948

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/issuing/transactions",
    params: params,
    opts: opts
  )
end

.object_nameObject



16
17
18
# File 'lib/stripe/resources/issuing/transaction.rb', line 16

def self.object_name
  "issuing.transaction"
end

.update(id, params = {}, opts = {}) ⇒ Object

Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.



958
959
960
961
962
963
964
965
# File 'lib/stripe/resources/issuing/transaction.rb', line 958

def self.update(id, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/issuing/transactions/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

#test_helpersObject



967
968
969
# File 'lib/stripe/resources/issuing/transaction.rb', line 967

def test_helpers
  TestHelpers.new(self)
end