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.
541 542 543 544 545 546 547 548 549 |
# File 'lib/stripe/services/payment_record_service.rb', line 541 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.
553 554 555 556 557 558 559 560 561 |
# File 'lib/stripe/services/payment_record_service.rb', line 553 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.
565 566 567 568 569 570 571 572 573 |
# File 'lib/stripe/services/payment_record_service.rb', line 565 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.
577 578 579 580 581 582 583 584 585 |
# File 'lib/stripe/services/payment_record_service.rb', line 577 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.
589 590 591 592 593 594 595 596 597 |
# File 'lib/stripe/services/payment_record_service.rb', line 589 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
600 601 602 603 604 605 606 607 608 |
# File 'lib/stripe/services/payment_record_service.rb', line 600 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 |