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.
585 586 587 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 585 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.
587 588 589 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 587 def amount_details @amount_details end |
#authorization ⇒ Object (readonly)
The Authorization object that led to this transaction.
589 590 591 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 589 def @authorization end |
#balance_transaction ⇒ Object (readonly)
ID of the balance transaction associated with this transaction.
591 592 593 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 591 def balance_transaction @balance_transaction end |
#card ⇒ Object (readonly)
The card used to make this transaction.
593 594 595 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 593 def card @card end |
#cardholder ⇒ Object (readonly)
The cardholder to whom this transaction belongs.
595 596 597 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 595 def cardholder @cardholder end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
597 598 599 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 597 def created @created end |
#crypto_transactions ⇒ Object (readonly)
Array of onchain crypto transactions linked to this resource.
599 600 601 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 599 def crypto_transactions @crypto_transactions end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
601 602 603 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 601 def currency @currency end |
#dispute ⇒ Object (readonly)
If you've disputed the transaction, the ID of the dispute.
603 604 605 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 603 def dispute @dispute end |
#id ⇒ Object (readonly)
Unique identifier for the object.
605 606 607 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 605 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.
607 608 609 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 607 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.
609 610 611 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 609 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.
611 612 613 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 611 def merchant_amount_exchange_rate @merchant_amount_exchange_rate end |
#merchant_currency ⇒ Object (readonly)
The currency with which the merchant is taking payment.
613 614 615 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 613 def merchant_currency @merchant_currency end |
#merchant_data ⇒ Object (readonly)
Attribute for field merchant_data
615 616 617 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 615 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.
617 618 619 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 617 def @metadata end |
#network_data ⇒ Object (readonly)
Details about the transaction, such as processing dates, set by the card network.
619 620 621 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 619 def network_data @network_data end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
621 622 623 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 621 def object @object end |
#purchase_details ⇒ Object (readonly)
Additional purchase information that is optionally provided by the merchant.
623 624 625 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 623 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.
625 626 627 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 625 def redaction @redaction end |
#settlement ⇒ Object (readonly)
The ID of the settlement to which this transaction belongs.
627 628 629 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 627 def settlement @settlement end |
#settlement_details ⇒ Object (readonly)
Details about the transaction for settlement reconciliation.
629 630 631 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 629 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.
631 632 633 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 631 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
633 634 635 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 633 def treasury @treasury end |
#type ⇒ Object (readonly)
The nature of the transaction.
635 636 637 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 635 def type @type end |
#wallet ⇒ Object (readonly)
The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay.
637 638 639 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 637 def wallet @wallet end |
Class Method Details
.field_encodings ⇒ Object
727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 727 def self.field_encodings @field_encodings = { purchase_details: { kind: :object, fields: { fleet: { kind: :object, fields: { reported_breakdown: { kind: :object, fields: { fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, tax: { kind: :object, fields: { local_amount_decimal: :decimal_string, national_amount_decimal: :decimal_string, }, }, }, }, }, }, fuel: { kind: :object, fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, }, }, }, } end |
.field_remappings ⇒ Object
723 724 725 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 723 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
710 711 712 713 714 715 716 717 718 719 720 721 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 710 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.
640 641 642 643 644 645 646 647 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 640 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.
650 651 652 653 654 655 656 657 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 650 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
659 660 661 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 659 def test_helpers TestHelpers.new(self) end |