Class: Stripe::PaymentRecordService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::PaymentRecordService
- Defined in:
- lib/stripe/services/payment_record_service.rb
Instance Method Summary collapse
-
#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.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves a Payment Record with the given ID.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#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.
9 10 11 12 13 14 15 16 17 |
# File 'lib/stripe/services/payment_record_service.rb', line 9 def report_payment(params = {}, opts = {}) request( method: :post, path: "/v1/payment_records/report_payment", params: params, opts: opts, base_address: :api ) 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.
21 22 23 24 25 26 27 28 29 |
# File 'lib/stripe/services/payment_record_service.rb', line 21 def report_payment_attempt(id, params = {}, opts = {}) request( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#report_payment_attempt_canceled(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was canceled.
33 34 35 36 37 38 39 40 41 |
# File 'lib/stripe/services/payment_record_service.rb', line 33 def report_payment_attempt_canceled(id, params = {}, opts = {}) request( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#report_payment_attempt_failed(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
failed or errored.
45 46 47 48 49 50 51 52 53 |
# File 'lib/stripe/services/payment_record_service.rb', line 45 def report_payment_attempt_failed(id, params = {}, opts = {}) request( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#report_payment_attempt_guaranteed(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was guaranteed.
57 58 59 60 61 62 63 64 65 |
# File 'lib/stripe/services/payment_record_service.rb', line 57 def report_payment_attempt_guaranteed(id, params = {}, opts = {}) request( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#report_payment_attempt_informational(id, params = {}, opts = {}) ⇒ Object
Report informational updates on the specified Payment Record.
68 69 70 71 72 73 74 75 76 |
# File 'lib/stripe/services/payment_record_service.rb', line 68 def report_payment_attempt_informational(id, params = {}, opts = {}) request( method: :post, path: format("/v1/payment_records/%<id>s/report_payment_attempt_informational", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#report_refund(id, params = {}, opts = {}) ⇒ Object
Report that the most recent payment attempt on the specified Payment Record
was refunded.
80 81 82 83 84 85 86 87 88 |
# File 'lib/stripe/services/payment_record_service.rb', line 80 def report_refund(id, params = {}, opts = {}) request( method: :post, path: format("/v1/payment_records/%<id>s/report_refund", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves a Payment Record with the given ID
91 92 93 94 95 96 97 98 99 |
# File 'lib/stripe/services/payment_record_service.rb', line 91 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v1/payment_records/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |