transbank-sdk
Version:
Transbank SDK for Node.js
69 lines (68 loc) • 2.98 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StartRequest = void 0;
var api_constants_1 = __importDefault(require("../../common/api_constants"));
var request_base_1 = __importDefault(require("../../common/request_base"));
var StartRequest = /** @class */ (function (_super) {
__extends(StartRequest, _super);
function StartRequest(url, name, lastName, secondLastName, rut, serviceId, finalUrl, commerceCode, maxAmount, phone, cellPhone, patpassName, personEmail, commerceEmail, address, city) {
var _this = _super.call(this, "".concat(api_constants_1.default.PATPASS_COMERCIO_ENDPOINT, "/patInscription"), 'POST') || this;
_this.url = url;
_this.name = name;
_this.lastName = lastName;
_this.secondLastName = secondLastName;
_this.rut = rut;
_this.serviceId = serviceId;
_this.finalUrl = finalUrl;
_this.maxAmount = maxAmount;
_this.phone = phone;
_this.cellPhone = cellPhone;
_this.patpassName = patpassName;
_this.personEmail = personEmail;
_this.commerceEmail = commerceEmail;
_this.address = address;
_this.city = city;
_this.commerceCode = commerceCode;
return _this;
}
StartRequest.prototype.toJson = function () {
return JSON.stringify({
url: this.url,
nombre: this.name,
pApellido: this.lastName,
sApellido: this.secondLastName,
rut: this.rut,
serviceId: this.serviceId,
finalUrl: this.finalUrl,
montoMaximo: this.maxAmount,
telefonoFijo: this.phone,
telefonoCelular: this.cellPhone,
nombrePatPass: this.patpassName,
correoPersona: this.personEmail,
correoComercio: this.commerceEmail,
direccion: this.address,
ciudad: this.city,
commerceCode: this.commerceCode
});
};
return StartRequest;
}(request_base_1.default));
exports.StartRequest = StartRequest;