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.
499 500 501 502 503 504 505 506 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 499 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.
519 520 521 522 523 524 525 526 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 519 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
494 495 496 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 494 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.
539 540 541 542 543 544 545 546 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 539 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.
559 560 561 562 563 564 565 566 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 559 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.
509 510 511 512 513 514 515 516 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 509 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.
529 530 531 532 533 534 535 536 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 529 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.
549 550 551 552 553 554 555 556 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 549 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.
569 570 571 572 573 574 575 576 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 569 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 |