Class: Stripe::Terminal::ReaderService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Terminal::ReaderService
- Defined in:
- lib/stripe/services/terminal/reader_service.rb
Instance Method Summary collapse
-
#cancel_action(reader, params = {}, opts = {}) ⇒ Object
Cancels the current reader action.
-
#collect_inputs(reader, params = {}, opts = {}) ⇒ Object
Initiates an [input collection flow](docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers.
-
#collect_payment_method(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
-
#confirm_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Finalizes a payment on a Reader.
-
#create(params = {}, opts = {}) ⇒ Object
Creates a new Reader object.
-
#delete(reader, params = {}, opts = {}) ⇒ Object
Deletes a Reader object.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of Reader objects.
-
#process_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader.
-
#process_setup_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a SetupIntent flow on a Reader.
-
#refund_payment(reader, params = {}, opts = {}) ⇒ Object
Initiates an in-person refund on a Reader.
-
#retrieve(reader, params = {}, opts = {}) ⇒ Object
Retrieves a Reader object.
-
#set_reader_display(reader, params = {}, opts = {}) ⇒ Object
Sets the reader display to show [cart details](docs.stripe.com/docs/terminal/features/display).
-
#update(reader, params = {}, opts = {}) ⇒ Object
Updates a Reader object by setting the values of the parameters passed.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#cancel_action(reader, params = {}, opts = {}) ⇒ Object
Cancels the current reader action. See [Programmatic Cancellation](docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details.
8 9 10 11 12 13 14 15 16 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 8 def cancel_action(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/cancel_action", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#collect_inputs(reader, params = {}, opts = {}) ⇒ Object
Initiates an [input collection flow](docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers.
19 20 21 22 23 24 25 26 27 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 19 def collect_inputs(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#collect_payment_method(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details.
30 31 32 33 34 35 36 37 38 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 30 def collect_payment_method(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#confirm_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Finalizes a payment on a Reader. See [Confirming a Payment](docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details.
41 42 43 44 45 46 47 48 49 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 41 def confirm_payment_intent(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#create(params = {}, opts = {}) ⇒ Object
Creates a new Reader object.
52 53 54 55 56 57 58 59 60 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 52 def create(params = {}, opts = {}) request( method: :post, path: "/v1/terminal/readers", params: params, opts: opts, base_address: :api ) end |
#delete(reader, params = {}, opts = {}) ⇒ Object
Deletes a Reader object.
63 64 65 66 67 68 69 70 71 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 63 def delete(reader, params = {}, opts = {}) request( method: :delete, path: format("/v1/terminal/readers/%<reader>s", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of Reader objects.
74 75 76 77 78 79 80 81 82 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 74 def list(params = {}, opts = {}) request( method: :get, path: "/v1/terminal/readers", params: params, opts: opts, base_address: :api ) end |
#process_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader. See [process the payment](docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details.
85 86 87 88 89 90 91 92 93 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 85 def process_payment_intent(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#process_setup_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a SetupIntent flow on a Reader. See [Save directly without charging](docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details.
96 97 98 99 100 101 102 103 104 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 96 def process_setup_intent(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#refund_payment(reader, params = {}, opts = {}) ⇒ Object
Initiates an in-person refund on a Reader. See [Refund an Interac Payment](docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details.
107 108 109 110 111 112 113 114 115 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 107 def refund_payment(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(reader, params = {}, opts = {}) ⇒ Object
Retrieves a Reader object.
118 119 120 121 122 123 124 125 126 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 118 def retrieve(reader, params = {}, opts = {}) request( method: :get, path: format("/v1/terminal/readers/%<reader>s", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#set_reader_display(reader, params = {}, opts = {}) ⇒ Object
Sets the reader display to show [cart details](docs.stripe.com/docs/terminal/features/display).
129 130 131 132 133 134 135 136 137 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 129 def set_reader_display(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |
#update(reader, params = {}, opts = {}) ⇒ Object
Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
140 141 142 143 144 145 146 147 148 |
# File 'lib/stripe/services/terminal/reader_service.rb', line 140 def update(reader, params = {}, opts = {}) request( method: :post, path: format("/v1/terminal/readers/%<reader>s", { reader: CGI.escape(reader) }), params: params, opts: opts, base_address: :api ) end |