Class: Stripe::Issuing::Transaction
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Issuing::Transaction
- Extended by:
- APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/issuing/transaction.rb
Overview
Any use of an issued card 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
Defined Under Namespace
Classes: AmountDetails, CryptoTransaction, MerchantData, NetworkData, PurchaseDetails, Redaction, SettlementDetails, TestHelpers, Treasury
Constant Summary collapse
- OBJECT_NAME =
"issuing.transaction"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
The transaction amount, which will be reflected in your balance.
-
#amount_details ⇒ Object
readonly
Detailed breakdown of amount components.
-
#authorization ⇒ Object
readonly
The
Authorizationobject that led to this transaction. -
#balance_transaction ⇒ Object
readonly
ID of the balance transaction associated with this transaction.
-
#card ⇒ Object
readonly
The card used to make this transaction.
-
#cardholder ⇒ Object
readonly
The cardholder to whom this transaction belongs.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#crypto_transactions ⇒ Object
readonly
Array of onchain crypto transactions linked to this resource.
-
#currency ⇒ Object
readonly
Three-letter ISO currency code, in lowercase.
-
#dispute ⇒ Object
readonly
If you've disputed the transaction, the ID of the dispute.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#merchant_amount ⇒ Object
readonly
The amount that the merchant will receive, denominated in
merchant_currencyand in the smallest currency unit. -
#merchant_amount_exchange_rate ⇒ Object
readonly
The exchange rate used by the network to convert the
merchant_amounttoamount. -
#merchant_currency ⇒ Object
readonly
The currency with which the merchant is taking payment.
-
#merchant_data ⇒ Object
readonly
Attribute for field merchant_data.
-
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to an object.
-
#network_data ⇒ Object
readonly
Details about the transaction, such as processing dates, set by the card network.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#purchase_details ⇒ Object
readonly
Additional purchase information that is optionally provided by the merchant.
-
#redaction ⇒ Object
readonly
Redaction status of this transaction.
-
#settlement ⇒ Object
readonly
The ID of the settlement to which this transaction belongs.
-
#settlement_details ⇒ Object
readonly
Details about the transaction for settlement reconciliation.
-
#token ⇒ Object
readonly
Token object used for this transaction.
-
#treasury ⇒ Object
readonly
Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts.
-
#type ⇒ Object
readonly
The nature of the transaction.
-
#wallet ⇒ Object
readonly
The digital wallet used for this transaction.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_encodings ⇒ Object
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Transaction objects.
- .object_name ⇒ Object
-
.update(transaction, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Transaction object by setting the values of the parameters passed.
Instance Method Summary collapse
Methods included from APIOperations::List
Methods included from APIOperations::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
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, 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
#amount ⇒ Object (readonly)
The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit.
649 650 651 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 649 def amount @amount end |
#amount_details ⇒ Object (readonly)
Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
651 652 653 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 651 def amount_details @amount_details end |
#authorization ⇒ Object (readonly)
The Authorization object that led to this transaction.
653 654 655 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 653 def @authorization end |
#balance_transaction ⇒ Object (readonly)
ID of the balance transaction associated with this transaction.
655 656 657 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 655 def balance_transaction @balance_transaction end |
#card ⇒ Object (readonly)
The card used to make this transaction.
657 658 659 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 657 def card @card end |
#cardholder ⇒ Object (readonly)
The cardholder to whom this transaction belongs.
659 660 661 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 659 def cardholder @cardholder end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
661 662 663 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 661 def created @created end |
#crypto_transactions ⇒ Object (readonly)
Array of onchain crypto transactions linked to this resource.
663 664 665 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 663 def crypto_transactions @crypto_transactions end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
665 666 667 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 665 def currency @currency end |
#dispute ⇒ Object (readonly)
If you've disputed the transaction, the ID of the dispute.
667 668 669 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 667 def dispute @dispute end |
#id ⇒ Object (readonly)
Unique identifier for the object.
669 670 671 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 669 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
671 672 673 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 671 def livemode @livemode end |
#merchant_amount ⇒ Object (readonly)
The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency.
673 674 675 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 673 def merchant_amount @merchant_amount end |
#merchant_amount_exchange_rate ⇒ Object (readonly)
The exchange rate used by the network to convert the merchant_amount to amount. The merchant_amount multiplied with this rate will equal to the amount.
675 676 677 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 675 def merchant_amount_exchange_rate @merchant_amount_exchange_rate end |
#merchant_currency ⇒ Object (readonly)
The currency with which the merchant is taking payment.
677 678 679 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 677 def merchant_currency @merchant_currency end |
#merchant_data ⇒ Object (readonly)
Attribute for field merchant_data
679 680 681 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 679 def merchant_data @merchant_data end |
#metadata ⇒ Object (readonly)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
681 682 683 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 681 def @metadata end |
#network_data ⇒ Object (readonly)
Details about the transaction, such as processing dates, set by the card network.
683 684 685 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 683 def network_data @network_data end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
685 686 687 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 685 def object @object end |
#purchase_details ⇒ Object (readonly)
Additional purchase information that is optionally provided by the merchant.
687 688 689 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 687 def purchase_details @purchase_details end |
#redaction ⇒ Object (readonly)
Redaction status of this transaction. If the transaction is not redacted, this field will be null.
689 690 691 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 689 def redaction @redaction end |
#settlement ⇒ Object (readonly)
The ID of the settlement to which this transaction belongs.
691 692 693 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 691 def settlement @settlement end |
#settlement_details ⇒ Object (readonly)
Details about the transaction for settlement reconciliation.
693 694 695 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 693 def settlement_details @settlement_details end |
#token ⇒ Object (readonly)
Token object used for this transaction. If a network token was not used for this transaction, this field will be null.
695 696 697 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 695 def token @token end |
#treasury ⇒ Object (readonly)
Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
697 698 699 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 697 def treasury @treasury end |
#type ⇒ Object (readonly)
The nature of the transaction.
699 700 701 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 699 def type @type end |
#wallet ⇒ Object (readonly)
The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay.
701 702 703 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 701 def wallet @wallet end |
Class Method Details
.field_encodings ⇒ Object
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 791 def self.field_encodings @field_encodings = { purchase_details: { kind: :nullable, inner: { kind: :object, fields: { fleet: { kind: :nullable, inner: { kind: :object, fields: { reported_breakdown: { kind: :nullable, inner: { kind: :object, fields: { fuel: { kind: :nullable, inner: { kind: :object, fields: { gross_amount_decimal: { kind: :nullable, inner: :decimal_string }, }, }, }, non_fuel: { kind: :nullable, inner: { kind: :object, fields: { gross_amount_decimal: { kind: :nullable, inner: :decimal_string }, }, }, }, tax: { kind: :nullable, inner: { kind: :object, fields: { local_amount_decimal: { kind: :nullable, inner: :decimal_string }, national_amount_decimal: { kind: :nullable, inner: :decimal_string, }, }, }, }, }, }, }, }, }, }, fuel: { kind: :nullable, inner: { kind: :object, fields: { quantity_decimal: { kind: :nullable, inner: :decimal_string }, unit_cost_decimal: :decimal_string, }, }, }, }, }, }, } end |
.field_remappings ⇒ Object
787 788 789 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 787 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 774 def self.inner_class_types @inner_class_types = { amount_details: AmountDetails, crypto_transactions: CryptoTransaction, merchant_data: MerchantData, network_data: NetworkData, purchase_details: PurchaseDetails, redaction: Redaction, settlement_details: SettlementDetails, treasury: Treasury, } end |
.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.
704 705 706 707 708 709 710 711 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 704 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/transactions", params: params, opts: opts ) end |
.object_name ⇒ Object
16 17 18 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 16 def self.object_name "issuing.transaction" end |
.update(transaction, 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.
714 715 716 717 718 719 720 721 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 714 def self.update(transaction, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/transactions/%<transaction>s", { transaction: CGI.escape(transaction) }), params: params, opts: opts ) end |
Instance Method Details
#test_helpers ⇒ Object
723 724 725 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 723 def test_helpers TestHelpers.new(self) end |