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.
-
.return_outbound_transfer(outbound_transfer, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundTransfer to the returned status.
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.
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.
43 44 45 46 47 48 49 50 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 43 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.
53 54 55 56 57 58 59 60 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 53 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 |
.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.
63 64 65 66 67 68 69 70 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 63 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 |
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.
73 74 75 76 77 78 79 80 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 73 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.
83 84 85 86 87 88 89 90 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 83 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.
93 94 95 96 97 98 99 100 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 93 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 |