Class: Stripe::TestHelpers::Treasury::OutboundPaymentService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/test_helpers/treasury/outbound_payment_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(id, params = {}, opts = {}) ⇒ Object

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



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

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

#post(id, params = {}, opts = {}) ⇒ Object

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



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

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

#return_outbound_payment(id, params = {}, opts = {}) ⇒ Object

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



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

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

#update(id, params = {}, opts = {}) ⇒ Object

Updates a test mode created OutboundPayment with tracking details. The OutboundPayment 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_payment_service.rb', line 42

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