Class: Stripe::TestHelpers::Treasury::InboundTransferService

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

Defined Under Namespace

Classes: FailParams, ReturnInboundTransferParams, SucceedParams

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(id, params = {}, opts = {}) ⇒ Object

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.



47
48
49
50
51
52
53
54
55
# File 'lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb', line 47

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



58
59
60
61
62
63
64
65
66
# File 'lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb', line 58

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



69
70
71
72
73
74
75
76
77
# File 'lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb', line 69

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