Class: Stripe::Terminal::Reader::TestHelpers

Inherits:
APIResourceTestHelpers show all
Defined in:
lib/stripe/resources/terminal/reader.rb

Constant Summary collapse

RESOURCE_CLASS =
Reader

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResourceTestHelpers

custom_method, #initialize, resource_url, #resource_url

Methods included from APIOperations::Request

included

Constructor Details

This class inherits a constructor from Stripe::APIResourceTestHelpers

Class Method Details

.present_payment_method(reader, params = {}, opts = {}) ⇒ Object


93
94
95
96
97
98
99
100
# File 'lib/stripe/resources/terminal/reader.rb', line 93

def self.present_payment_method(reader, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/terminal/readers/%<reader>s/present_payment_method", { reader: CGI.escape(reader) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

#present_payment_method(params = {}, opts = {}) ⇒ Object


102
103
104
105
106
107
108
109
# File 'lib/stripe/resources/terminal/reader.rb', line 102

def present_payment_method(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/terminal/readers/%<reader>s/present_payment_method", { reader: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end