Class: Stripe::PaymentRecordService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::PaymentRecordService
- Defined in:
- lib/stripe/services/payment_record_service.rb
Defined Under Namespace
Classes: ReportPaymentAttemptCanceledParams, ReportPaymentAttemptFailedParams, ReportPaymentAttemptGuaranteedParams, ReportPaymentAttemptParams, ReportPaymentParams, RetrieveParams
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.
-
#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.
473 474 475 476 477 478 479 480 481 |
# File 'lib/stripe/services/payment_record_service.rb', line 473 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.
485 486 487 488 489 490 491 492 493 |
# File 'lib/stripe/services/payment_record_service.rb', line 485 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.
497 498 499 500 501 502 503 504 505 |
# File 'lib/stripe/services/payment_record_service.rb', line 497 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.
509 510 511 512 513 514 515 516 517 |
# File 'lib/stripe/services/payment_record_service.rb', line 509 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.
521 522 523 524 525 526 527 528 529 |
# File 'lib/stripe/services/payment_record_service.rb', line 521 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 |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves a Payment Record with the given ID
532 533 534 535 536 537 538 539 540 |
# File 'lib/stripe/services/payment_record_service.rb', line 532 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 |