Class: Stripe::TestHelpers::Terminal::ReaderService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/test_helpers/terminal/reader_service.rb

Instance Method Summary collapse

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.



9
10
11
12
13
14
15
16
17
# File 'lib/stripe/services/test_helpers/terminal/reader_service.rb', line 9

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