Class: Stripe::Treasury::OutboundPayment::TestHelpers

Inherits:
APIResourceTestHelpers show all
Defined in:
lib/stripe/resources/treasury/outbound_payment.rb

Constant Summary collapse

RESOURCE_CLASS =
OutboundPayment

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResourceTestHelpers

custom_method, #initialize, resource_url, #resource_url

Methods included from APIOperations::Request

included

Constructor Details

This class inherits a constructor from Stripe::APIResourceTestHelpers

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



43
44
45
46
47
48
49
50
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 43

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



53
54
55
56
57
58
59
60
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 53

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



63
64
65
66
67
68
69
70
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 63

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

Instance Method Details

#fail(params = {}, opts = {}) ⇒ Object

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



73
74
75
76
77
78
79
80
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 73

def fail(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/fail", { id: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

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

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



83
84
85
86
87
88
89
90
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 83

def post(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/post", { id: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

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

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



93
94
95
96
97
98
99
100
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 93

def return_outbound_payment(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/return", { id: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end