Class: Stripe::Treasury::OutboundPayment::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Treasury::OutboundPayment::TestHelpers
- Defined in:
- lib/stripe/resources/treasury/outbound_payment.rb
Constant Summary collapse
- RESOURCE_CLASS =
OutboundPayment
Class Method Summary collapse
-
.fail(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the failed status.
-
.post(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the posted status.
- .resource_class ⇒ Object
-
.return_outbound_payment(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the returned status.
-
.update(id, params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundPayment with tracking details.
Instance Method Summary collapse
-
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the failed status.
-
#post(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the posted status.
-
#return_outbound_payment(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the returned status.
-
#update(params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundPayment with tracking details.
Methods inherited from APIResourceTestHelpers
custom_method, #initialize, resource_url, #resource_url
Methods included from APIOperations::Request
Constructor Details
This class inherits a constructor from Stripe::APIResourceTestHelpers
Class Method Details
.fail(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
557 558 559 560 561 562 563 564 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 557 def self.fail(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/fail", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.post(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
577 578 579 580 581 582 583 584 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 577 def self.post(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/post", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.resource_class ⇒ Object
552 553 554 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 552 def self.resource_class "OutboundPayment" end |
.return_outbound_payment(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
597 598 599 600 601 602 603 604 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 597 def self.return_outbound_payment(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/return", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.update(id, params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
617 618 619 620 621 622 623 624 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 617 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts ) end |
Instance Method Details
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
567 568 569 570 571 572 573 574 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 567 def fail(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/fail", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#post(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
587 588 589 590 591 592 593 594 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 587 def post(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/post", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#return_outbound_payment(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
607 608 609 610 611 612 613 614 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 607 def return_outbound_payment(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/return", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#update(params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
627 628 629 630 631 632 633 634 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 627 def update(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |