Class: Stripe::TestHelpers::Terminal::ReaderService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::TestHelpers::Terminal::ReaderService
- Defined in:
- lib/stripe/services/test_helpers/terminal/reader_service.rb
Defined Under Namespace
Classes: PresentPaymentMethodParams, SucceedInputCollectionParams, TimeoutInputCollectionParams
Instance Method Summary collapse
-
#present_payment_method(reader, params = {}, opts = {}) ⇒ Object
Presents a payment method on a simulated reader.
-
#succeed_input_collection(reader, params = {}, opts = {}) ⇒ Object
Use this endpoint to trigger a successful input collection on a simulated reader.
-
#timeout_input_collection(reader, params = {}, opts = {}) ⇒ Object
Use this endpoint to complete an input collection with a timeout error on a simulated reader.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#present_payment_method(reader, params = {}, opts = {}) ⇒ Object
Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
96 97 98 99 100 101 102 103 104 |
# File 'lib/stripe/services/test_helpers/terminal/reader_service.rb', line 96 def present_payment_method(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/terminal/readers/%<reader>s/present_payment_method", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#succeed_input_collection(reader, params = {}, opts = {}) ⇒ Object
Use this endpoint to trigger a successful input collection on a simulated reader.
107 108 109 110 111 112 113 114 115 |
# File 'lib/stripe/services/test_helpers/terminal/reader_service.rb', line 107 def succeed_input_collection(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/terminal/readers/%<reader>s/succeed_input_collection", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#timeout_input_collection(reader, params = {}, opts = {}) ⇒ Object
Use this endpoint to complete an input collection with a timeout error on a simulated reader.
118 119 120 121 122 123 124 125 126 |
# File 'lib/stripe/services/test_helpers/terminal/reader_service.rb', line 118 def timeout_input_collection(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/terminal/readers/%<reader>s/timeout_input_collection", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |