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](docs.stripe.com/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](docs.stripe.com/issuing/purchases/transactions)
Defined Under Namespace
Classes: AmountDetails, CryptoTransaction, MerchantData, NetworkData, PurchaseDetails, 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 ‘Authorization` object that led to this transaction.
-
#balance_transaction ⇒ Object
readonly
ID of the [balance transaction](docs.stripe.com/api/balance_transactions) 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](www.iso.org/iso-4217-currency-codes.html), 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_currency` and in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal).
-
#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](docs.stripe.com/api/metadata) 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.
-
#settlement ⇒ Object
readonly
The ID of the [settlement](docs.stripe.com/api/issuing/settlements) to which this transaction belongs.
-
#token ⇒ Object
readonly
[Token](docs.stripe.com/api/issuing/tokens/object) object used for this transaction.
-
#treasury ⇒ Object
readonly
[Treasury](docs.stripe.com/api/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](docs.stripe.com/currencies#zero-decimal).
527 528 529 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 527 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](docs.stripe.com/currencies#zero-decimal).
529 530 531 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 529 def amount_details @amount_details end |
#authorization ⇒ Object (readonly)
The ‘Authorization` object that led to this transaction.
531 532 533 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 531 def @authorization end |
#balance_transaction ⇒ Object (readonly)
ID of the [balance transaction](docs.stripe.com/api/balance_transactions) associated with this transaction.
533 534 535 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 533 def balance_transaction @balance_transaction end |
#card ⇒ Object (readonly)
The card used to make this transaction.
535 536 537 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 535 def card @card end |
#cardholder ⇒ Object (readonly)
The cardholder to whom this transaction belongs.
537 538 539 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 537 def cardholder @cardholder end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
539 540 541 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 539 def created @created end |
#crypto_transactions ⇒ Object (readonly)
Array of onchain crypto transactions linked to this resource.
541 542 543 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 541 def crypto_transactions @crypto_transactions end |
#currency ⇒ Object (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).
543 544 545 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 543 def currency @currency end |
#dispute ⇒ Object (readonly)
If you’ve disputed the transaction, the ID of the dispute.
545 546 547 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 545 def dispute @dispute end |
#id ⇒ Object (readonly)
Unique identifier for the object.
547 548 549 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 547 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`.
549 550 551 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 549 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](docs.stripe.com/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.
551 552 553 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 551 def merchant_amount @merchant_amount end |
#merchant_currency ⇒ Object (readonly)
The currency with which the merchant is taking payment.
553 554 555 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 553 def merchant_currency @merchant_currency end |
#merchant_data ⇒ Object (readonly)
Attribute for field merchant_data
555 556 557 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 555 def merchant_data @merchant_data end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
557 558 559 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 557 def @metadata end |
#network_data ⇒ Object (readonly)
Details about the transaction, such as processing dates, set by the card network.
559 560 561 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 559 def network_data @network_data end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
561 562 563 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 561 def object @object end |
#purchase_details ⇒ Object (readonly)
Additional purchase information that is optionally provided by the merchant.
563 564 565 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 563 def purchase_details @purchase_details end |
#settlement ⇒ Object (readonly)
The ID of the [settlement](docs.stripe.com/api/issuing/settlements) to which this transaction belongs.
565 566 567 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 565 def settlement @settlement end |
#token ⇒ Object (readonly)
[Token](docs.stripe.com/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
567 568 569 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 567 def token @token end |
#treasury ⇒ Object (readonly)
[Treasury](docs.stripe.com/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
569 570 571 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 569 def treasury @treasury end |
#type ⇒ Object (readonly)
The nature of the transaction.
571 572 573 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 571 def type @type end |
#wallet ⇒ Object (readonly)
The digital wallet used for this transaction. One of ‘apple_pay`, `google_pay`, or `samsung_pay`.
573 574 575 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 573 def wallet @wallet end |
Class Method Details
.field_encodings ⇒ Object
661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 661 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
657 658 659 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 657 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
646 647 648 649 650 651 652 653 654 655 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 646 def self.inner_class_types @inner_class_types = { amount_details: AmountDetails, crypto_transactions: CryptoTransaction, merchant_data: MerchantData, network_data: NetworkData, purchase_details: PurchaseDetails, 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.
576 577 578 579 580 581 582 583 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 576 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.
586 587 588 589 590 591 592 593 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 586 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
595 596 597 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 595 def test_helpers TestHelpers.new(self) end |