Class: Stripe::Treasury::OutboundPayment::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Treasury::OutboundPayment::TestHelpers
- Defined in:
- lib/stripe/resources/treasury/outbound_payment.rb
Constant Summary collapse
- RESOURCE_CLASS =
OutboundPayment
Class 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.
- .resource_class ⇒ Object
-
.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.
Instance Method Summary collapse
-
#fail(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the failed status.
-
#post(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the posted status.
-
#return_outbound_payment(params = {}, opts = {}) ⇒ Object
Transitions a test mode created OutboundPayment to the returned status.
-
#update(params = {}, opts = {}) ⇒ Object
Updates a test mode created OutboundPayment with tracking details.
Methods inherited from APIResourceTestHelpers
custom_method, #initialize, resource_url, #resource_url
Methods included from APIOperations::Request
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.
71 72 73 74 75 76 77 78 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 71 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.
91 92 93 94 95 96 97 98 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 91 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 |
.resource_class ⇒ Object
66 67 68 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 66 def self.resource_class "OutboundPayment" 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.
111 112 113 114 115 116 117 118 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 111 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 |
.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.
131 132 133 134 135 136 137 138 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 131 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s", { 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.
81 82 83 84 85 86 87 88 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 81 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.
101 102 103 104 105 106 107 108 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 101 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.
121 122 123 124 125 126 127 128 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 121 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 |
#update(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.
141 142 143 144 145 146 147 148 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 141 def update(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s", { id: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |