moip-sdk-node-ts
Version:
Moip v2 API wrapper
19 lines (18 loc) • 974 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const api_assinaturas_1 = __importDefault(require("../client/api_assinaturas"));
const getOne = (opts, _code) => api_assinaturas_1.default.get(opts, `/customers/${_code}`);
const getAll = (opts) => api_assinaturas_1.default.get(opts, '/customers');
const create = (opts, subscriber, config) => api_assinaturas_1.default.post(opts, '/customers', subscriber, config);
const update = (opts, _code, subscriber) => api_assinaturas_1.default.put(opts, `/customers/${_code}`, subscriber);
const updateBilling = (opts, _code, billingInfo) => api_assinaturas_1.default.put(opts, `/customers/${_code}/billing_infos`, billingInfo);
exports.default = {
getOne: getOne,
getAll: getAll,
create: create,
update: update,
updateBilling: updateBilling,
};