Class: Stripe::TestHelpers::Treasury::OutboundPaymentService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::TestHelpers::Treasury::OutboundPaymentService
- Defined in:
- lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb
Defined Under Namespace
Classes: FailParams, PostParams, ReturnOutboundPaymentParams, UpdateParams
Instance Method Summary collapse
-
#fail(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the failed status.
-
#post(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the posted status.
-
#return_outbound_payment(id, params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the returned status.
-
#update(id, params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundPayment with tracking details.
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.
102 103 104 105 106 107 108 109 110 |
# File 'lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb', line 102 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.
113 114 115 116 117 118 119 120 121 |
# File 'lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb', line 113 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.
124 125 126 127 128 129 130 131 132 |
# File 'lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb', line 124 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.
135 136 137 138 139 140 141 142 143 |
# File 'lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb', line 135 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 |