Class: Stripe::Treasury::InboundTransfer::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Treasury::InboundTransfer::TestHelpers
- Defined in:
- lib/stripe/resources/treasury/inbound_transfer.rb
Constant Summary collapse
- RESOURCE_CLASS =
InboundTransfer
Class Method Summary collapse
-
.fail(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the failed status.
- .resource_class ⇒ Object
-
.return_inbound_transfer(id, params = {}, opts = {}) ⇒ Object
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit.
-
.succeed(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the succeeded status.
Instance Method Summary collapse
-
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the failed status.
-
#return_inbound_transfer(params = {}, opts = {}) ⇒ Object
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit.
-
#succeed(params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the succeeded 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(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
295 296 297 298 299 300 301 302 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 295 def self.fail(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/fail", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.resource_class ⇒ Object
290 291 292 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 290 def self.resource_class "InboundTransfer" end |
.return_inbound_transfer(id, params = {}, opts = {}) ⇒ Object
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
315 316 317 318 319 320 321 322 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 315 def self.return_inbound_transfer(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.succeed(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
335 336 337 338 339 340 341 342 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 335 def self.succeed(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/succeed", { id: CGI.escape(id) }), params: params, opts: opts ) end |
Instance Method Details
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
305 306 307 308 309 310 311 312 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 305 def fail(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/fail", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#return_inbound_transfer(params = {}, opts = {}) ⇒ Object
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
325 326 327 328 329 330 331 332 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 325 def return_inbound_transfer(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#succeed(params = {}, opts = {}) ⇒ Object
Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
345 346 347 348 349 350 351 352 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 345 def succeed(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/succeed", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |