Class: Stripe::PaymentIntent::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::PaymentIntent::TestHelpers
- Defined in:
- lib/stripe/resources/payment_intent.rb
Constant Summary collapse
- RESOURCE_CLASS =
PaymentIntent
Class Method Summary collapse
- .resource_class ⇒ Object
-
.simulate_crypto_deposit(intent, params = {}, opts = {}) ⇒ Object
Simulate an incoming crypto deposit for a testmode PaymentIntent with payment_method_options[mode]=deposit.
Instance Method Summary collapse
-
#simulate_crypto_deposit(params = {}, opts = {}) ⇒ Object
Simulate an incoming crypto deposit for a testmode PaymentIntent with payment_method_options[mode]=deposit.
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
.resource_class ⇒ Object
5118 5119 5120 |
# File 'lib/stripe/resources/payment_intent.rb', line 5118 def self.resource_class "PaymentIntent" end |
.simulate_crypto_deposit(intent, params = {}, opts = {}) ⇒ Object
Simulate an incoming crypto deposit for a testmode PaymentIntent with payment_method_options[mode]=deposit. The transaction_hash parameter determines whether the simulated deposit succeeds or fails. Learn more about [testing your integration](docs.stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration).
5123 5124 5125 5126 5127 5128 5129 5130 |
# File 'lib/stripe/resources/payment_intent.rb', line 5123 def self.simulate_crypto_deposit(intent, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/payment_intents/%<intent>s/simulate_crypto_deposit", { intent: CGI.escape(intent) }), params: params, opts: opts ) end |
Instance Method Details
#simulate_crypto_deposit(params = {}, opts = {}) ⇒ Object
Simulate an incoming crypto deposit for a testmode PaymentIntent with payment_method_options[mode]=deposit. The transaction_hash parameter determines whether the simulated deposit succeeds or fails. Learn more about [testing your integration](docs.stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration).
5133 5134 5135 5136 5137 5138 5139 5140 |
# File 'lib/stripe/resources/payment_intent.rb', line 5133 def simulate_crypto_deposit(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/payment_intents/%<intent>s/simulate_crypto_deposit", { intent: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |