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.
658 659 660 661 662 663 664 665 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 658 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.
678 679 680 681 682 683 684 685 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 678 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
653 654 655 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 653 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.
698 699 700 701 702 703 704 705 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 698 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.
718 719 720 721 722 723 724 725 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 718 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.
668 669 670 671 672 673 674 675 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 668 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.
688 689 690 691 692 693 694 695 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 688 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.
708 709 710 711 712 713 714 715 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 708 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.
728 729 730 731 732 733 734 735 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 728 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 |