UNPKG

kucoin-universal-sdk

Version:
190 lines 5.44 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.SubmitKYCReqBuilder = exports.SubmitKYCReq = void 0; const class_transformer_1 = require("class-transformer"); class SubmitKYCReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { // @ts-ignore this.clientUid = null; // @ts-ignore this.firstName = null; // @ts-ignore this.lastName = null; // @ts-ignore this.issueCountry = null; // @ts-ignore this.birthDate = null; // @ts-ignore this.identityType = null; // @ts-ignore this.identityNumber = null; // @ts-ignore this.expireDate = null; // @ts-ignore this.frontPhoto = null; // @ts-ignore this.backendPhoto = null; // @ts-ignore this.facePhoto = null; } /** * Creates a new instance of the `SubmitKYCReq` class. * The builder pattern allows step-by-step construction of a `SubmitKYCReq` object. */ static builder() { return new SubmitKYCReqBuilder(new SubmitKYCReq()); } /** * Creates a new instance of the `SubmitKYCReq` class with the given data. */ static create(data) { let obj = new SubmitKYCReq(); obj.clientUid = data.clientUid; obj.firstName = data.firstName; obj.lastName = data.lastName; obj.issueCountry = data.issueCountry; obj.birthDate = data.birthDate; obj.identityType = data.identityType; obj.identityNumber = data.identityNumber; obj.expireDate = data.expireDate; obj.frontPhoto = data.frontPhoto; obj.backendPhoto = data.backendPhoto; obj.facePhoto = data.facePhoto; return obj; } /** * Convert the object to a JSON string. */ toJson() { return JSON.stringify((0, class_transformer_1.instanceToPlain)(this)); } /** * Create an object from a JSON string. */ static fromJson(input) { return this.fromObject(JSON.parse(input)); } /** * Create an object from Js Object. */ static fromObject(jsonObject) { return (0, class_transformer_1.plainToClassFromExist)(new SubmitKYCReq(), jsonObject); } } exports.SubmitKYCReq = SubmitKYCReq; (function (SubmitKYCReq) { let IdentityTypeEnum; (function (IdentityTypeEnum) { /** * id card */ IdentityTypeEnum[IdentityTypeEnum["IDCARD"] = 'idcard'] = "IDCARD"; /** * driving license */ IdentityTypeEnum[IdentityTypeEnum["DRIVINGLICENSE"] = 'drivinglicense'] = "DRIVINGLICENSE"; /** * passport */ IdentityTypeEnum[IdentityTypeEnum["PASSPORT"] = 'passport'] = "PASSPORT"; /** * bvn */ IdentityTypeEnum[IdentityTypeEnum["BVN"] = 'bvn'] = "BVN"; })(IdentityTypeEnum = SubmitKYCReq.IdentityTypeEnum || (SubmitKYCReq.IdentityTypeEnum = {})); })(SubmitKYCReq || (exports.SubmitKYCReq = SubmitKYCReq = {})); class SubmitKYCReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * client uid */ setClientUid(value) { this.obj.clientUid = value; return this; } /** * first Name */ setFirstName(value) { this.obj.firstName = value; return this; } /** * last Name */ setLastName(value) { this.obj.lastName = value; return this; } /** * ISO country code */ setIssueCountry(value) { this.obj.issueCountry = value; return this; } /** * Birth Date */ setBirthDate(value) { this.obj.birthDate = value; return this; } /** * Identity type */ setIdentityType(value) { this.obj.identityType = value; return this; } /** * Identity Number */ setIdentityNumber(value) { this.obj.identityNumber = value; return this; } /** * expire Date. If there is no expiration date, please fill in: 2099-01-01 */ setExpireDate(value) { this.obj.expireDate = value; return this; } /** * **Optional when identityType=bvn,** Front photo of the ID card, in base64 format, PNG or JPG is recommended, and the size cannot exceed 2MB. If it exceeds 2MB, it is recommended to adjust the resolution and compress it to less than 2MB */ setFrontPhoto(value) { this.obj.frontPhoto = value; return this; } /** * **Optional when identityType=passport/bvn,** Back photo of ID, same as above */ setBackendPhoto(value) { this.obj.backendPhoto = value; return this; } /** * Selfie photo, in base64 format, PNG or JPG is recommended, and the size cannot exceed 2MB. If it exceeds 2MB, it is recommended to adjust the resolution and compress it to less than 2MB */ setFacePhoto(value) { this.obj.facePhoto = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.SubmitKYCReqBuilder = SubmitKYCReqBuilder; //# sourceMappingURL=model_submit_kyc_req.js.map