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.
412 413 414 415 416 417 418 419 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 412 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.
432 433 434 435 436 437 438 439 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 432 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
407 408 409 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 407 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.
452 453 454 455 456 457 458 459 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 452 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.
472 473 474 475 476 477 478 479 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 472 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.
422 423 424 425 426 427 428 429 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 422 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.
442 443 444 445 446 447 448 449 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 442 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.
462 463 464 465 466 467 468 469 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 462 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.
482 483 484 485 486 487 488 489 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 482 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 |