Class: Stripe::PaymentAttemptRecord
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::PaymentAttemptRecord
- Extended by:
- APIOperations::List
- Defined in:
- lib/stripe/resources/payment_attempt_record.rb
Overview
A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record can have guaranteed funds.
Defined Under Namespace
Classes: Amount, AmountAuthorized, AmountCanceled, AmountFailed, AmountGuaranteed, AmountRefunded, AmountRequested, CustomerDetails, PaymentMethodDetails, ProcessorDetails, ShippingDetails
Constant Summary collapse
- OBJECT_NAME =
"payment_attempt_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 PaymentAttemptRecord.
-
#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.
-
#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.
-
#payment_record ⇒ Object
readonly
ID of the Payment Record this Payment Attempt Record belongs to.
-
#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
-
.list(params = {}, opts = {}) ⇒ Object
List all the Payment Attempt Records attached to the specified Payment Record.
- .object_name ⇒ Object
-
.report_authenticated(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was authenticated.
-
.report_canceled(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was canceled.
-
.report_failed(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record failed.
-
.report_guaranteed(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was guaranteed.
-
.report_informational(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Attempt Record.
-
.report_refund(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was refunded.
Instance Method Summary collapse
-
#report_authenticated(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was authenticated.
-
#report_canceled(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was canceled.
-
#report_failed(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record failed.
-
#report_guaranteed(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was guaranteed.
-
#report_informational(params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Attempt Record.
-
#report_refund(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was refunded.
Methods included from APIOperations::List
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.
2119 2120 2121 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2119 def amount @amount end |
#amount_authorized ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2121 2122 2123 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2121 def @amount_authorized end |
#amount_canceled ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2123 2124 2125 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2123 def amount_canceled @amount_canceled end |
#amount_failed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2125 2126 2127 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2125 def amount_failed @amount_failed end |
#amount_guaranteed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2127 2128 2129 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2127 def amount_guaranteed @amount_guaranteed end |
#amount_refunded ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2129 2130 2131 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2129 def amount_refunded @amount_refunded end |
#amount_requested ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2131 2132 2133 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2131 def amount_requested @amount_requested end |
#application ⇒ Object (readonly)
ID of the Connect application that created the PaymentAttemptRecord.
2133 2134 2135 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2133 def application @application end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
2135 2136 2137 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2135 def created @created end |
#customer_details ⇒ Object (readonly)
Customer information for this payment.
2137 2138 2139 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2137 def customer_details @customer_details end |
#customer_presence ⇒ Object (readonly)
Indicates whether the customer was present in your checkout flow during this payment.
2139 2140 2141 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2139 def customer_presence @customer_presence end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
2141 2142 2143 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2141 def description @description end |
#id ⇒ Object (readonly)
Unique identifier for the object.
2143 2144 2145 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2143 def id @id 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.
2145 2146 2147 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2145 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.
2147 2148 2149 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2147 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
2149 2150 2151 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2149 def object @object end |
#payment_method_details ⇒ Object (readonly)
Information about the Payment Method debited for this payment.
2151 2152 2153 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2151 def payment_method_details @payment_method_details end |
#payment_record ⇒ Object (readonly)
ID of the Payment Record this Payment Attempt Record belongs to.
2153 2154 2155 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2153 def payment_record @payment_record end |
#processor_details ⇒ Object (readonly)
Processor information associated with this payment.
2155 2156 2157 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2155 def processor_details @processor_details end |
#reported_by ⇒ Object (readonly)
Indicates who reported the payment.
2157 2158 2159 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2157 def reported_by @reported_by end |
#shipping_details ⇒ Object (readonly)
Shipping information for this payment.
2159 2160 2161 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2159 def shipping_details @shipping_details end |
Class Method Details
.field_remappings ⇒ Object
2307 2308 2309 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2307 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2291 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 |
.list(params = {}, opts = {}) ⇒ Object
List all the Payment Attempt Records attached to the specified Payment Record.
2162 2163 2164 2165 2166 2167 2168 2169 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2162 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_attempt_records", params: params, opts: opts ) end |
.object_name ⇒ Object
13 14 15 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 13 def self.object_name "payment_attempt_record" end |
.report_authenticated(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was authenticated.
2182 2183 2184 2185 2186 2187 2188 2189 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2182 def self.report_authenticated(payment_attempt_record, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_authenticated", { payment_attempt_record: CGI.escape(payment_attempt_record) }), params: params, opts: opts ) end |
.report_canceled(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was canceled.
2202 2203 2204 2205 2206 2207 2208 2209 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2202 def self.report_canceled(payment_attempt_record, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_canceled", { payment_attempt_record: CGI.escape(payment_attempt_record) }), params: params, opts: opts ) end |
.report_failed(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record failed.
2222 2223 2224 2225 2226 2227 2228 2229 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2222 def self.report_failed(payment_attempt_record, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_failed", { payment_attempt_record: CGI.escape(payment_attempt_record) }), params: params, opts: opts ) end |
.report_guaranteed(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was guaranteed.
2242 2243 2244 2245 2246 2247 2248 2249 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2242 def self.report_guaranteed(payment_attempt_record, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_guaranteed", { payment_attempt_record: CGI.escape(payment_attempt_record) }), params: params, opts: opts ) end |
.report_informational(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Attempt Record.
2262 2263 2264 2265 2266 2267 2268 2269 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2262 def self.report_informational(payment_attempt_record, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_informational", { payment_attempt_record: CGI.escape(payment_attempt_record) }), params: params, opts: opts ) end |
.report_refund(payment_attempt_record, params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was refunded.
2282 2283 2284 2285 2286 2287 2288 2289 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2282 def self.report_refund(payment_attempt_record, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_refund", { payment_attempt_record: CGI.escape(payment_attempt_record) }), params: params, opts: opts ) end |
Instance Method Details
#report_authenticated(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was authenticated.
2172 2173 2174 2175 2176 2177 2178 2179 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2172 def report_authenticated(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_authenticated", { payment_attempt_record: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_canceled(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was canceled.
2192 2193 2194 2195 2196 2197 2198 2199 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2192 def report_canceled(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_canceled", { payment_attempt_record: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_failed(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record failed.
2212 2213 2214 2215 2216 2217 2218 2219 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2212 def report_failed(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_failed", { payment_attempt_record: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_guaranteed(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was guaranteed.
2232 2233 2234 2235 2236 2237 2238 2239 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2232 def report_guaranteed(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_guaranteed", { payment_attempt_record: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_informational(params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Attempt Record.
2252 2253 2254 2255 2256 2257 2258 2259 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2252 def report_informational(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_informational", { payment_attempt_record: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#report_refund(params = {}, opts = {}) ⇒ Object
Report that the specified Payment Attempt Record was refunded.
2272 2273 2274 2275 2276 2277 2278 2279 |
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2272 def report_refund(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_refund", { payment_attempt_record: CGI.escape(self["id"]) }), params: params, opts: opts ) end |