Class: Stripe::PaymentRecord
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::PaymentRecord
- Defined in:
- lib/stripe/resources/payment_record.rb
Overview
A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. For example, you can create a Payment Record to model a payment made on a different payment processor, in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or more Payment Attempt Records, which represent individual attempts made on a payment network.
Defined Under Namespace
Classes: Amount, AmountAuthorized, AmountCanceled, AmountFailed, AmountGuaranteed, AmountRefunded, AmountRequested, CustomerDetails, PaymentMethodDetails, ProcessorDetails, ReportPaymentAttemptCanceledParams, ReportPaymentAttemptFailedParams, ReportPaymentAttemptGuaranteedParams, ReportPaymentAttemptParams, ReportPaymentParams, ShippingDetails
Constant Summary collapse
- OBJECT_NAME =
"payment_record"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
A representation of an amount of money, consisting of an amount and a currency.
-
#amount_authorized ⇒ Object
readonly
A representation of an amount of money, consisting of an amount and a currency.
-
#amount_canceled ⇒ Object
readonly
A representation of an amount of money, consisting of an amount and a currency.
-
#amount_failed ⇒ Object
readonly
A representation of an amount of money, consisting of an amount and a currency.
-
#amount_guaranteed ⇒ Object
readonly
A representation of an amount of money, consisting of an amount and a currency.
-
#amount_refunded ⇒ Object
readonly
A representation of an amount of money, consisting of an amount and a currency.
-
#amount_requested ⇒ Object
readonly
A representation of an amount of money, consisting of an amount and a currency.
-
#application ⇒ Object
readonly
ID of the Connect application that created the PaymentRecord.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#customer_details ⇒ Object
readonly
Customer information for this payment.
-
#customer_presence ⇒ Object
readonly
Indicates whether the customer was present in your checkout flow during this payment.
-
#description ⇒ Object
readonly
An arbitrary string attached to the object.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#latest_payment_attempt_record ⇒ Object
readonly
ID of the latest Payment Attempt Record attached to this Payment Record.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#payment_method_details ⇒ Object
readonly
Information about the Payment Method debited for this payment.
-
#processor_details ⇒ Object
readonly
Processor information associated with this payment.
-
#shipping_details ⇒ Object
readonly
Shipping information for this payment.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .object_name ⇒ Object
-
.report_payment(params = {}, opts = {}) ⇒ Object
Report a new Payment Record.
-
.report_payment_attempt(id, params = {}, opts = {}) ⇒ Object
Report a new payment attempt on the specified Payment Record.
-
.report_payment_attempt_canceled(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was canceled.
-
.report_payment_attempt_failed(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record failed or errored.
-
.report_payment_attempt_guaranteed(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was guaranteed.
Instance Method Summary collapse
-
#report_payment_attempt(params = {}, opts = {}) ⇒ Object
Report a new payment attempt on the specified Payment Record.
-
#report_payment_attempt_canceled(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was canceled.
-
#report_payment_attempt_failed(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record failed or errored.
-
#report_payment_attempt_guaranteed(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was guaranteed.
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
#==, #[], #[]=, 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)
A representation of an amount of money, consisting of an amount and a currency.
1583 1584 1585 |
# File 'lib/stripe/resources/payment_record.rb', line 1583 def amount @amount end |
#amount_authorized ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1585 1586 1587 |
# File 'lib/stripe/resources/payment_record.rb', line 1585 def @amount_authorized end |
#amount_canceled ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1587 1588 1589 |
# File 'lib/stripe/resources/payment_record.rb', line 1587 def amount_canceled @amount_canceled end |
#amount_failed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1589 1590 1591 |
# File 'lib/stripe/resources/payment_record.rb', line 1589 def amount_failed @amount_failed end |
#amount_guaranteed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1591 1592 1593 |
# File 'lib/stripe/resources/payment_record.rb', line 1591 def amount_guaranteed @amount_guaranteed end |
#amount_refunded ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1593 1594 1595 |
# File 'lib/stripe/resources/payment_record.rb', line 1593 def amount_refunded @amount_refunded end |
#amount_requested ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1595 1596 1597 |
# File 'lib/stripe/resources/payment_record.rb', line 1595 def amount_requested @amount_requested end |
#application ⇒ Object (readonly)
ID of the Connect application that created the PaymentRecord.
1597 1598 1599 |
# File 'lib/stripe/resources/payment_record.rb', line 1597 def application @application end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
1599 1600 1601 |
# File 'lib/stripe/resources/payment_record.rb', line 1599 def created @created end |
#customer_details ⇒ Object (readonly)
Customer information for this payment.
1601 1602 1603 |
# File 'lib/stripe/resources/payment_record.rb', line 1601 def customer_details @customer_details end |
#customer_presence ⇒ Object (readonly)
Indicates whether the customer was present in your checkout flow during this payment.
1603 1604 1605 |
# File 'lib/stripe/resources/payment_record.rb', line 1603 def customer_presence @customer_presence end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
1605 1606 1607 |
# File 'lib/stripe/resources/payment_record.rb', line 1605 def description @description end |
#id ⇒ Object (readonly)
Unique identifier for the object.
1607 1608 1609 |
# File 'lib/stripe/resources/payment_record.rb', line 1607 def id @id end |
#latest_payment_attempt_record ⇒ Object (readonly)
ID of the latest Payment Attempt Record attached to this Payment Record.
1609 1610 1611 |
# File 'lib/stripe/resources/payment_record.rb', line 1609 def latest_payment_attempt_record @latest_payment_attempt_record end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
1611 1612 1613 |
# File 'lib/stripe/resources/payment_record.rb', line 1611 def livemode @livemode end |
#metadata ⇒ Object (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.
1613 1614 1615 |
# File 'lib/stripe/resources/payment_record.rb', line 1613 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
1615 1616 1617 |
# File 'lib/stripe/resources/payment_record.rb', line 1615 def object @object end |
#payment_method_details ⇒ Object (readonly)
Information about the Payment Method debited for this payment.
1617 1618 1619 |
# File 'lib/stripe/resources/payment_record.rb', line 1617 def payment_method_details @payment_method_details end |
#processor_details ⇒ Object (readonly)
Processor information associated with this payment.
1619 1620 1621 |
# File 'lib/stripe/resources/payment_record.rb', line 1619 def processor_details @processor_details end |
#shipping_details ⇒ Object (readonly)
Shipping information for this payment.
1621 1622 1623 |
# File 'lib/stripe/resources/payment_record.rb', line 1621 def shipping_details @shipping_details end |
Class Method Details
.object_name ⇒ Object
11 12 13 |
# File 'lib/stripe/resources/payment_record.rb', line 11 def self.object_name "payment_record" end |
.report_payment(params = {}, opts = {}) ⇒ Object
Report a new Payment Record. You may report a Payment Record as it is
initialized and later report updates through the other report_* methods, or report Payment
Records in a terminal state directly, through this method.
1626 1627 1628 1629 1630 1631 1632 1633 |
# File 'lib/stripe/resources/payment_record.rb', line 1626 def self.report_payment(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/payment_records/report_payment", params: params, opts: opts ) end |
.report_payment_attempt(id, params = {}, opts = {}) ⇒ Object
Report a new payment attempt on the specified Payment Record. A new payment
attempt can only be specified if all other payment attempts are canceled or failed.
1648 1649 1650 1651 1652 1653 1654 1655 |
# File 'lib/stripe/resources/payment_record.rb', line 1648 def self.report_payment_attempt(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.report_payment_attempt_canceled(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was canceled.
1670 1671 1672 1673 1674 1675 1676 1677 |
# File 'lib/stripe/resources/payment_record.rb', line 1670 def self.report_payment_attempt_canceled(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.report_payment_attempt_failed(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
failed or errored.
1692 1693 1694 1695 1696 1697 1698 1699 |
# File 'lib/stripe/resources/payment_record.rb', line 1692 def self.report_payment_attempt_failed(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.report_payment_attempt_guaranteed(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was guaranteed.
1714 1715 1716 1717 1718 1719 1720 1721 |
# File 'lib/stripe/resources/payment_record.rb', line 1714 def self.report_payment_attempt_guaranteed(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }), params: params, opts: opts ) end |
Instance Method Details
#report_payment_attempt(params = {}, opts = {}) ⇒ Object
Report a new payment attempt on the specified Payment Record. A new payment
attempt can only be specified if all other payment attempts are canceled or failed.
1637 1638 1639 1640 1641 1642 1643 1644 |
# File 'lib/stripe/resources/payment_record.rb', line 1637 def report_payment_attempt(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_payment_attempt_canceled(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was canceled.
1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'lib/stripe/resources/payment_record.rb', line 1659 def report_payment_attempt_canceled(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_payment_attempt_failed(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
failed or errored.
1681 1682 1683 1684 1685 1686 1687 1688 |
# File 'lib/stripe/resources/payment_record.rb', line 1681 def report_payment_attempt_failed(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_payment_attempt_guaranteed(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was guaranteed.
1703 1704 1705 1706 1707 1708 1709 1710 |
# File 'lib/stripe/resources/payment_record.rb', line 1703 def report_payment_attempt_guaranteed(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |