Class: Stripe::PaymentRecord
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::PaymentRecord
- Extended by:
- APIOperations::Create, APIOperations::List, APIOperations::Search
- 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
If the object exists in live mode, the value is
true. -
#metadata ⇒ Object
readonly
Set of key-value pairs 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
-
.create(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was disputed.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
List all the Payment Records for a given merchant.
- .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.
- .search(params = {}, opts = {}) ⇒ Object
- .search_auto_paging_each(params = {}, opts = {}, &blk) ⇒ Object
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 included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Search
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?, field_encodings, #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.
2340 2341 2342 |
# File 'lib/stripe/resources/payment_record.rb', line 2340 def amount @amount end |
#amount_authorized ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2342 2343 2344 |
# File 'lib/stripe/resources/payment_record.rb', line 2342 def @amount_authorized end |
#amount_canceled ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2344 2345 2346 |
# File 'lib/stripe/resources/payment_record.rb', line 2344 def amount_canceled @amount_canceled end |
#amount_failed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2346 2347 2348 |
# File 'lib/stripe/resources/payment_record.rb', line 2346 def amount_failed @amount_failed end |
#amount_guaranteed ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2348 2349 2350 |
# File 'lib/stripe/resources/payment_record.rb', line 2348 def amount_guaranteed @amount_guaranteed end |
#amount_refunded ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2350 2351 2352 |
# File 'lib/stripe/resources/payment_record.rb', line 2350 def amount_refunded @amount_refunded end |
#amount_requested ⇒ Object (readonly)
A representation of an amount of money, consisting of an amount and a currency.
2352 2353 2354 |
# File 'lib/stripe/resources/payment_record.rb', line 2352 def amount_requested @amount_requested end |
#application ⇒ Object (readonly)
ID of the Connect application that created the PaymentRecord.
2354 2355 2356 |
# File 'lib/stripe/resources/payment_record.rb', line 2354 def application @application end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
2356 2357 2358 |
# File 'lib/stripe/resources/payment_record.rb', line 2356 def created @created end |
#customer_details ⇒ Object (readonly)
Customer information for this payment.
2358 2359 2360 |
# File 'lib/stripe/resources/payment_record.rb', line 2358 def customer_details @customer_details end |
#customer_presence ⇒ Object (readonly)
Indicates whether the customer was present in your checkout flow during this payment.
2360 2361 2362 |
# File 'lib/stripe/resources/payment_record.rb', line 2360 def customer_presence @customer_presence end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
2362 2363 2364 |
# File 'lib/stripe/resources/payment_record.rb', line 2362 def description @description end |
#id ⇒ Object (readonly)
Unique identifier for the object.
2364 2365 2366 |
# File 'lib/stripe/resources/payment_record.rb', line 2364 def id @id end |
#latest_payment_attempt_record ⇒ Object (readonly)
ID of the latest Payment Attempt Record attached to this Payment Record.
2366 2367 2368 |
# File 'lib/stripe/resources/payment_record.rb', line 2366 def latest_payment_attempt_record @latest_payment_attempt_record 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.
2368 2369 2370 |
# File 'lib/stripe/resources/payment_record.rb', line 2368 def livemode @livemode 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.
2370 2371 2372 |
# File 'lib/stripe/resources/payment_record.rb', line 2370 def @metadata end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
2372 2373 2374 |
# File 'lib/stripe/resources/payment_record.rb', line 2372 def object @object end |
#payment_method_details ⇒ Object (readonly)
Information about the Payment Method debited for this payment.
2374 2375 2376 |
# File 'lib/stripe/resources/payment_record.rb', line 2374 def payment_method_details @payment_method_details end |
#processor_details ⇒ Object (readonly)
Processor information associated with this payment.
2376 2377 2378 |
# File 'lib/stripe/resources/payment_record.rb', line 2376 def processor_details @processor_details end |
#reported_by ⇒ Object (readonly)
Indicates who reported the payment.
2378 2379 2380 |
# File 'lib/stripe/resources/payment_record.rb', line 2378 def reported_by @reported_by end |
#shipping_details ⇒ Object (readonly)
Shipping information for this payment.
2380 2381 2382 |
# File 'lib/stripe/resources/payment_record.rb', line 2380 def shipping_details @shipping_details end |
Class Method Details
.create(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record was disputed.
2384 2385 2386 2387 2388 2389 2390 2391 |
# File 'lib/stripe/resources/payment_record.rb', line 2384 def self.create(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/payment_records/%<id>s/report_dispute", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.field_remappings ⇒ Object
2569 2570 2571 |
# File 'lib/stripe/resources/payment_record.rb', line 2569 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 |
# File 'lib/stripe/resources/payment_record.rb', line 2553 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 Records for a given merchant.
2394 2395 2396 |
# File 'lib/stripe/resources/payment_record.rb', line 2394 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/payment_records", params: params, opts: opts) end |
.object_name ⇒ Object
15 16 17 |
# File 'lib/stripe/resources/payment_record.rb', line 15 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.
2401 2402 2403 2404 2405 2406 2407 2408 |
# File 'lib/stripe/resources/payment_record.rb', line 2401 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.
2423 2424 2425 2426 2427 2428 2429 2430 |
# File 'lib/stripe/resources/payment_record.rb', line 2423 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.
2445 2446 2447 2448 2449 2450 2451 2452 |
# File 'lib/stripe/resources/payment_record.rb', line 2445 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.
2467 2468 2469 2470 2471 2472 2473 2474 |
# File 'lib/stripe/resources/payment_record.rb', line 2467 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.
2489 2490 2491 2492 2493 2494 2495 2496 |
# File 'lib/stripe/resources/payment_record.rb', line 2489 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.
2509 2510 2511 2512 2513 2514 2515 2516 |
# File 'lib/stripe/resources/payment_record.rb', line 2509 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.
2531 2532 2533 2534 2535 2536 2537 2538 |
# File 'lib/stripe/resources/payment_record.rb', line 2531 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 |
.search(params = {}, opts = {}) ⇒ Object
2540 2541 2542 2543 2544 2545 2546 2547 |
# File 'lib/stripe/resources/payment_record.rb', line 2540 def self.search(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_records/search", params: params, opts: opts ) end |
.search_auto_paging_each(params = {}, opts = {}, &blk) ⇒ Object
2549 2550 2551 |
# File 'lib/stripe/resources/payment_record.rb', line 2549 def self.search_auto_paging_each(params = {}, opts = {}, &blk) search(params, opts).auto_paging_each(&blk) 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.
2412 2413 2414 2415 2416 2417 2418 2419 |
# File 'lib/stripe/resources/payment_record.rb', line 2412 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.
2434 2435 2436 2437 2438 2439 2440 2441 |
# File 'lib/stripe/resources/payment_record.rb', line 2434 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.
2456 2457 2458 2459 2460 2461 2462 2463 |
# File 'lib/stripe/resources/payment_record.rb', line 2456 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.
2478 2479 2480 2481 2482 2483 2484 2485 |
# File 'lib/stripe/resources/payment_record.rb', line 2478 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.
2499 2500 2501 2502 2503 2504 2505 2506 |
# File 'lib/stripe/resources/payment_record.rb', line 2499 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.
2520 2521 2522 2523 2524 2525 2526 2527 |
# File 'lib/stripe/resources/payment_record.rb', line 2520 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 |