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, MerchantData, NetworkData, PurchaseDetails, Redaction, 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.
-
#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_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.
-
#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, #_get_union_variant_class, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, inner_class_union_variant_types, #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.
485 486 487 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 485 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.
487 488 489 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 487 def amount_details @amount_details end |
#authorization ⇒ Object (readonly)
The Authorization object that led to this transaction.
489 490 491 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 489 def @authorization end |
#balance_transaction ⇒ Object (readonly)
ID of the balance transaction associated with this transaction.
491 492 493 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 491 def balance_transaction @balance_transaction end |
#card ⇒ Object (readonly)
The card used to make this transaction.
493 494 495 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 493 def card @card end |
#cardholder ⇒ Object (readonly)
The cardholder to whom this transaction belongs.
495 496 497 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 495 def cardholder @cardholder end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
497 498 499 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 497 def created @created end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
499 500 501 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 499 def currency @currency end |
#dispute ⇒ Object (readonly)
If you've disputed the transaction, the ID of the dispute.
501 502 503 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 501 def dispute @dispute end |
#id ⇒ Object (readonly)
Unique identifier for the object.
503 504 505 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 503 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.
505 506 507 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 505 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.
507 508 509 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 507 def merchant_amount @merchant_amount end |
#merchant_currency ⇒ Object (readonly)
The currency with which the merchant is taking payment.
509 510 511 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 509 def merchant_currency @merchant_currency end |
#merchant_data ⇒ Object (readonly)
Attribute for field merchant_data
511 512 513 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 511 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.
513 514 515 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 513 def @metadata end |
#network_data ⇒ Object (readonly)
Details about the transaction, such as processing dates, set by the card network.
515 516 517 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 515 def network_data @network_data end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
517 518 519 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 517 def object @object end |
#purchase_details ⇒ Object (readonly)
Additional purchase information that is optionally provided by the merchant.
519 520 521 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 519 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.
521 522 523 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 521 def redaction @redaction end |
#settlement ⇒ Object (readonly)
The ID of the settlement to which this transaction belongs.
523 524 525 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 523 def settlement @settlement 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.
525 526 527 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 525 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
527 528 529 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 527 def treasury @treasury end |
#type ⇒ Object (readonly)
The nature of the transaction.
529 530 531 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 529 def type @type end |
#wallet ⇒ Object (readonly)
The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay.
531 532 533 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 531 def wallet @wallet end |
Class Method Details
.field_encodings ⇒ Object
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 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 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 619 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
615 616 617 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 615 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
604 605 606 607 608 609 610 611 612 613 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 604 def self.inner_class_types @inner_class_types = { amount_details: AmountDetails, merchant_data: MerchantData, network_data: NetworkData, purchase_details: PurchaseDetails, redaction: Redaction, 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.
534 535 536 537 538 539 540 541 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 534 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.
544 545 546 547 548 549 550 551 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 544 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
553 554 555 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 553 def test_helpers TestHelpers.new(self) end |