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, 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](docs.stripe.com/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.
-
#reported_by ⇒ Object
readonly
Indicates who reported the payment.
-
#shipping_details ⇒ Object
readonly
Shipping information for this payment.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
- .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.
-
.report_payment_attempt_informational(id, params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Record.
-
.report_refund(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was refunded.
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.
-
#report_payment_attempt_informational(params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Record.
-
#report_refund(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was refunded.
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)
A representation of an amount of money, consisting of an amount and a currency.
1911 1912 1913 |
# File 'lib/stripe/resources/payment_record.rb', line 1911 def amount @amount end |
#amount_authorized ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1913 1914 1915 |
# File 'lib/stripe/resources/payment_record.rb', line 1913 def @amount_authorized end |
#amount_canceled ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1915 1916 1917 |
# File 'lib/stripe/resources/payment_record.rb', line 1915 def amount_canceled @amount_canceled end |
#amount_failed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1917 1918 1919 |
# File 'lib/stripe/resources/payment_record.rb', line 1917 def amount_failed @amount_failed end |
#amount_guaranteed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1919 1920 1921 |
# File 'lib/stripe/resources/payment_record.rb', line 1919 def amount_guaranteed @amount_guaranteed end |
#amount_refunded ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1921 1922 1923 |
# File 'lib/stripe/resources/payment_record.rb', line 1921 def amount_refunded @amount_refunded end |
#amount_requested ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
1923 1924 1925 |
# File 'lib/stripe/resources/payment_record.rb', line 1923 def amount_requested @amount_requested end |
#application ⇒ Object (readonly)
ID of the Connect application that created the PaymentRecord.
1925 1926 1927 |
# File 'lib/stripe/resources/payment_record.rb', line 1925 def application @application end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
1927 1928 1929 |
# File 'lib/stripe/resources/payment_record.rb', line 1927 def created @created end |
#customer_details ⇒ Object (readonly)
Customer information for this payment.
1929 1930 1931 |
# File 'lib/stripe/resources/payment_record.rb', line 1929 def customer_details @customer_details end |
#customer_presence ⇒ Object (readonly)
Indicates whether the customer was present in your checkout flow during this payment.
1931 1932 1933 |
# File 'lib/stripe/resources/payment_record.rb', line 1931 def customer_presence @customer_presence end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
1933 1934 1935 |
# File 'lib/stripe/resources/payment_record.rb', line 1933 def description @description end |
#id ⇒ Object (readonly)
Unique identifier for the object.
1935 1936 1937 |
# File 'lib/stripe/resources/payment_record.rb', line 1935 def id @id end |
#latest_payment_attempt_record ⇒ Object (readonly)
ID of the latest Payment Attempt Record attached to this Payment Record.
1937 1938 1939 |
# File 'lib/stripe/resources/payment_record.rb', line 1937 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.
1939 1940 1941 |
# File 'lib/stripe/resources/payment_record.rb', line 1939 def livemode @livemode 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.
1941 1942 1943 |
# File 'lib/stripe/resources/payment_record.rb', line 1941 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
1943 1944 1945 |
# File 'lib/stripe/resources/payment_record.rb', line 1943 def object @object end |
#payment_method_details ⇒ Object (readonly)
Information about the Payment Method debited for this payment.
1945 1946 1947 |
# File 'lib/stripe/resources/payment_record.rb', line 1945 def payment_method_details @payment_method_details end |
#processor_details ⇒ Object (readonly)
Processor information associated with this payment.
1947 1948 1949 |
# File 'lib/stripe/resources/payment_record.rb', line 1947 def processor_details @processor_details end |
#reported_by ⇒ Object (readonly)
Indicates who reported the payment.
1949 1950 1951 |
# File 'lib/stripe/resources/payment_record.rb', line 1949 def reported_by @reported_by end |
#shipping_details ⇒ Object (readonly)
Shipping information for this payment.
1951 1952 1953 |
# File 'lib/stripe/resources/payment_record.rb', line 1951 def shipping_details @shipping_details end |
Class Method Details
.field_remappings ⇒ Object
2111 2112 2113 |
# File 'lib/stripe/resources/payment_record.rb', line 2111 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 |
# File 'lib/stripe/resources/payment_record.rb', line 2095 def self.inner_class_types @inner_class_types = { amount: Amount, amount_authorized: AmountAuthorized, amount_canceled: AmountCanceled, amount_failed: AmountFailed, amount_guaranteed: AmountGuaranteed, amount_refunded: AmountRefunded, amount_requested: AmountRequested, customer_details: CustomerDetails, payment_method_details: PaymentMethodDetails, processor_details: ProcessorDetails, shipping_details: ShippingDetails, } end |
.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.
1956 1957 1958 1959 1960 1961 1962 1963 |
# File 'lib/stripe/resources/payment_record.rb', line 1956 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.
1978 1979 1980 1981 1982 1983 1984 1985 |
# File 'lib/stripe/resources/payment_record.rb', line 1978 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.
2000 2001 2002 2003 2004 2005 2006 2007 |
# File 'lib/stripe/resources/payment_record.rb', line 2000 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.
2022 2023 2024 2025 2026 2027 2028 2029 |
# File 'lib/stripe/resources/payment_record.rb', line 2022 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.
2044 2045 2046 2047 2048 2049 2050 2051 |
# File 'lib/stripe/resources/payment_record.rb', line 2044 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 |
.report_payment_attempt_informational(id, params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Record.
2064 2065 2066 2067 2068 2069 2070 2071 |
# File 'lib/stripe/resources/payment_record.rb', line 2064 def self.report_payment_attempt_informational(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_informational", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.report_refund(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was refunded.
2086 2087 2088 2089 2090 2091 2092 2093 |
# File 'lib/stripe/resources/payment_record.rb', line 2086 def self.report_refund(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_refund", { 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.
1967 1968 1969 1970 1971 1972 1973 1974 |
# File 'lib/stripe/resources/payment_record.rb', line 1967 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.
1989 1990 1991 1992 1993 1994 1995 1996 |
# File 'lib/stripe/resources/payment_record.rb', line 1989 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.
2011 2012 2013 2014 2015 2016 2017 2018 |
# File 'lib/stripe/resources/payment_record.rb', line 2011 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.
2033 2034 2035 2036 2037 2038 2039 2040 |
# File 'lib/stripe/resources/payment_record.rb', line 2033 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 |
#report_payment_attempt_informational(params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Record.
2054 2055 2056 2057 2058 2059 2060 2061 |
# File 'lib/stripe/resources/payment_record.rb', line 2054 def report_payment_attempt_informational(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_informational", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_refund(params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was refunded.
2075 2076 2077 2078 2079 2080 2081 2082 |
# File 'lib/stripe/resources/payment_record.rb', line 2075 def report_refund(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_refund", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |