Class: Stripe::TestHelpers::Treasury::OutboundTransferService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance 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.



9
10
11
12
13
14
15
16
17
# File 'lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb', line 9

def fail(outbound_transfer, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/fail", { outbound_transfer: CGI.escape(outbound_transfer) }),
    params: params,
    opts: opts,
    base_address: :api
  )
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.



20
21
22
23
24
25
26
27
28
# File 'lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb', line 20

def post(outbound_transfer, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(outbound_transfer) }),
    params: params,
    opts: opts,
    base_address: :api
  )
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.



31
32
33
34
35
36
37
38
39
# File 'lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb', line 31

def return_outbound_transfer(outbound_transfer, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }),
    params: params,
    opts: opts,
    base_address: :api
  )
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.



42
43
44
45
46
47
48
49
50
# File 'lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb', line 42

def update(outbound_transfer, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s", { outbound_transfer: CGI.escape(outbound_transfer) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end