zips-typescript-sdk
Version:
TypeScript SDK for ZIPS Payment Gateway - Complete payment solution for server-side applications
53 lines • 1.52 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
class CustomersModule extends base_1.default {
/** Creates new customer */
async create(params) {
return this.request({
url: this.merchantApiURL,
method: "POST",
data: params,
headers: this.getHeaders(),
});
}
/** Retrieves a customer */
async single(id) {
return this.request({
url: this.merchantApiURL,
method: "GET",
headers: this.getHeaders(),
});
}
/** List all customers */
async all(options = { limit: 10 }) {
return this.request({
url: this.merchantApiURL,
method: "GET",
params: options,
headers: this.getHeaders(),
});
}
/** Update a customer */
async update(id, data) {
return this.request({
url: this.merchantApiURL,
method: "PUT",
headers: this.getHeaders(),
data,
});
}
/** Deletes a customer */
async delete(id) {
return this.request({
url: this.merchantApiURL,
method: "DELETE",
headers: this.getHeaders(),
});
}
}
exports.default = CustomersModule;
//# sourceMappingURL=customer.js.map