stripe
Version:
Stripe API wrapper
89 lines • 4.47 kB
JavaScript
;
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReaderResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class ReaderResource extends StripeResource_js_1.StripeResource {
/**
* Deletes a Reader object.
*/
del(id, params, options) {
return this._makeRequest('DELETE', `/v1/terminal/readers/${id}`, params, options);
}
/**
* Retrieves a Reader object.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/terminal/readers/${id}`, params, options);
}
/**
* Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
*/
update(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}`, params, options);
}
/**
* Returns a list of Reader objects.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/terminal/readers', params, options, {
methodType: 'list',
});
}
/**
* Creates a new Reader object.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/terminal/readers', params, options);
}
/**
* Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details.
*/
cancelAction(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/cancel_action`, params, options);
}
/**
* Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers.
*/
collectInputs(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/collect_inputs`, params, options);
}
/**
* Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details.
*/
collectPaymentMethod(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/collect_payment_method`, params, options);
}
/**
* Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details.
*/
confirmPaymentIntent(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/confirm_payment_intent`, params, options);
}
/**
* Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details.
*/
processPaymentIntent(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/process_payment_intent`, params, options);
}
/**
* Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details.
*/
processSetupIntent(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/process_setup_intent`, params, options);
}
/**
* Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details.
*/
refundPayment(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/refund_payment`, params, options);
}
/**
* Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display).
*/
setReaderDisplay(id, params, options) {
return this._makeRequest('POST', `/v1/terminal/readers/${id}/set_reader_display`, params, options);
}
}
exports.ReaderResource = ReaderResource;
//# sourceMappingURL=Readers.js.map