Class: Stripe::Treasury::OutboundTransfer::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Treasury::OutboundTransfer::TestHelpers
- Defined in:
- lib/stripe/resources/treasury/outbound_transfer.rb
Constant Summary collapse
- RESOURCE_CLASS =
OutboundTransfer
Class Method Summary collapse
-
.fail(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the failed status.
-
.post(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the posted status.
- .resource_class ⇒ Object
-
.return_outbound_transfer(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the returned status.
-
.update(outbound_transfer, params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundTransfer with tracking details.
Instance Method Summary collapse
-
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the failed status.
-
#post(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the posted status.
-
#return_outbound_transfer(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the returned status.
-
#update(params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundTransfer 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(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
549 550 551 552 553 554 555 556 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 549 def self.fail(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/fail", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end |
.post(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
569 570 571 572 573 574 575 576 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 569 def self.post(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end |
.resource_class ⇒ Object
544 545 546 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 544 def self.resource_class "OutboundTransfer" end |
.return_outbound_transfer(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
589 590 591 592 593 594 595 596 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 589 def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end |
.update(outbound_transfer, params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
609 610 611 612 613 614 615 616 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 609 def self.update(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end |
Instance Method Details
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
559 560 561 562 563 564 565 566 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 559 def fail(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/fail", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#post(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
579 580 581 582 583 584 585 586 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 579 def post(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#return_outbound_transfer(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
599 600 601 602 603 604 605 606 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 599 def return_outbound_transfer(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#update(params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
619 620 621 622 623 624 625 626 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 619 def update(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s", { outbound_transfer: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |