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
5025 5026 5027 |
# File 'lib/stripe/resources/payment_intent.rb', line 5025 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).
5030 5031 5032 5033 5034 5035 5036 5037 |
# File 'lib/stripe/resources/payment_intent.rb', line 5030 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).
5040 5041 5042 5043 5044 5045 5046 5047 |
# File 'lib/stripe/resources/payment_intent.rb', line 5040 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 |