diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3a51f83..37723aa 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,146 +2,138 @@ .gitignore .npmignore README.md -docs/PaymentMethod.md -docs/payment_method/models/BillingInformation.md -docs/payment_method/models/Card.md -docs/payment_method/models/CardChannelProperties.md -docs/payment_method/models/CardParameters.md -docs/payment_method/models/CardParametersCardInformation.md -docs/payment_method/models/CardVerificationResults.md -docs/payment_method/models/CardVerificationResultsThreeDSecure.md -docs/payment_method/models/ChannelAmountLimits.md -docs/payment_method/models/ChannelAmountLimitsAllOf.md -docs/payment_method/models/ChannelProperty.md -docs/payment_method/models/ChannelPropertyAllOf.md -docs/payment_method/models/CreatePaymentMethod409Response.md -docs/payment_method/models/CreatePaymentMethod503Response.md -docs/payment_method/models/DirectDebit.md -docs/payment_method/models/DirectDebitAllOf.md -docs/payment_method/models/DirectDebitBankAccount.md -docs/payment_method/models/DirectDebitChannelCode.md -docs/payment_method/models/DirectDebitChannelProperties.md -docs/payment_method/models/DirectDebitDebitCard.md -docs/payment_method/models/DirectDebitParameters.md -docs/payment_method/models/DirectDebitType.md -docs/payment_method/models/EWallet.md -docs/payment_method/models/EWalletAccount.md -docs/payment_method/models/EWalletChannelCode.md -docs/payment_method/models/EWalletChannelProperties.md -docs/payment_method/models/EWalletParameters.md -docs/payment_method/models/GetAllPaymentMethods400Response.md -docs/payment_method/models/GetAllPaymentMethods403Response.md -docs/payment_method/models/GetAllPaymentMethods404Response.md -docs/payment_method/models/GetAllPaymentMethodsDefaultResponse.md -docs/payment_method/models/OverTheCounter.md -docs/payment_method/models/OverTheCounterChannelCode.md -docs/payment_method/models/OverTheCounterChannelProperties.md -docs/payment_method/models/OverTheCounterChannelPropertiesUpdate.md -docs/payment_method/models/OverTheCounterParameters.md -docs/payment_method/models/OverTheCounterUpdateParameters.md -docs/payment_method/models/PaymentChannel.md -docs/payment_method/models/PaymentChannelAllOf.md -docs/payment_method/models/PaymentChannelList.md -docs/payment_method/models/PaymentChannelListLinksInner.md -docs/payment_method/models/PaymentChannelListLinksInnerAllOf.md -docs/payment_method/models/PaymentMethod.md -docs/payment_method/models/PaymentMethodAction.md -docs/payment_method/models/PaymentMethodAuthParameters.md -docs/payment_method/models/PaymentMethodCountry.md -docs/payment_method/models/PaymentMethodExpireParameters.md -docs/payment_method/models/PaymentMethodList.md -docs/payment_method/models/PaymentMethodParameters.md -docs/payment_method/models/PaymentMethodReusability.md -docs/payment_method/models/PaymentMethodStatus.md -docs/payment_method/models/PaymentMethodType.md -docs/payment_method/models/PaymentMethodUpdateParameters.md -docs/payment_method/models/QrCode.md -docs/payment_method/models/QrCodeChannelCode.md -docs/payment_method/models/QrCodeChannelProperties.md -docs/payment_method/models/QrCodeParameters.md -docs/payment_method/models/SimulatePaymentRequest.md -docs/payment_method/models/TokenizedCardInformation.md -docs/payment_method/models/VirtualAccount.md -docs/payment_method/models/VirtualAccountAllOf.md -docs/payment_method/models/VirtualAccountAlternativeDisplay.md -docs/payment_method/models/VirtualAccountChannelCode.md -docs/payment_method/models/VirtualAccountChannelProperties.md -docs/payment_method/models/VirtualAccountChannelPropertiesPatch.md -docs/payment_method/models/VirtualAccountParameters.md -docs/payment_method/models/VirtualAccountUpdateParameters.md +docs/PaymentRequest.md +docs/payment_request/models/Capture.md +docs/payment_request/models/CaptureListResponse.md +docs/payment_request/models/CaptureParameters.md +docs/payment_request/models/Card.md +docs/payment_request/models/CardChannelProperties.md +docs/payment_request/models/CardInformation.md +docs/payment_request/models/CardVerificationResults.md +docs/payment_request/models/CardVerificationResultsThreeDSecure.md +docs/payment_request/models/DirectDebit.md +docs/payment_request/models/DirectDebitAllOf.md +docs/payment_request/models/DirectDebitBankAccount.md +docs/payment_request/models/DirectDebitChannelCode.md +docs/payment_request/models/DirectDebitChannelProperties.md +docs/payment_request/models/DirectDebitChannelPropertiesBankAccount.md +docs/payment_request/models/DirectDebitChannelPropertiesBankRedirect.md +docs/payment_request/models/DirectDebitChannelPropertiesDebitCard.md +docs/payment_request/models/DirectDebitDebitCard.md +docs/payment_request/models/DirectDebitParameters.md +docs/payment_request/models/DirectDebitType.md +docs/payment_request/models/EWallet.md +docs/payment_request/models/EWalletAccount.md +docs/payment_request/models/EWalletAllOf.md +docs/payment_request/models/EWalletChannelCode.md +docs/payment_request/models/EWalletChannelProperties.md +docs/payment_request/models/EWalletParameters.md +docs/payment_request/models/Error.md +docs/payment_request/models/OverTheCounter.md +docs/payment_request/models/OverTheCounterChannelCode.md +docs/payment_request/models/OverTheCounterChannelProperties.md +docs/payment_request/models/OverTheCounterParameters.md +docs/payment_request/models/PaymentMethod.md +docs/payment_request/models/PaymentMethodParameters.md +docs/payment_request/models/PaymentMethodReusability.md +docs/payment_request/models/PaymentMethodStatus.md +docs/payment_request/models/PaymentMethodType.md +docs/payment_request/models/PaymentRequest.md +docs/payment_request/models/PaymentRequestAction.md +docs/payment_request/models/PaymentRequestAuthParameters.md +docs/payment_request/models/PaymentRequestBasketItem.md +docs/payment_request/models/PaymentRequestCaptureMethod.md +docs/payment_request/models/PaymentRequestCardVerificationResults.md +docs/payment_request/models/PaymentRequestCardVerificationResultsThreeDeeSecure.md +docs/payment_request/models/PaymentRequestChannelProperties.md +docs/payment_request/models/PaymentRequestCountry.md +docs/payment_request/models/PaymentRequestCurrency.md +docs/payment_request/models/PaymentRequestInitiator.md +docs/payment_request/models/PaymentRequestListResponse.md +docs/payment_request/models/PaymentRequestParameters.md +docs/payment_request/models/PaymentRequestParametersChannelProperties.md +docs/payment_request/models/PaymentRequestParametersChannelPropertiesAllOf.md +docs/payment_request/models/PaymentRequestShippingInformation.md +docs/payment_request/models/PaymentRequestStatus.md +docs/payment_request/models/QrCode.md +docs/payment_request/models/QrCodeChannelCode.md +docs/payment_request/models/QrCodeChannelProperties.md +docs/payment_request/models/QrCodeParameters.md +docs/payment_request/models/VirtualAccount.md +docs/payment_request/models/VirtualAccountAllOf.md +docs/payment_request/models/VirtualAccountAlternativeDisplay.md +docs/payment_request/models/VirtualAccountChannelCode.md +docs/payment_request/models/VirtualAccountChannelProperties.md +docs/payment_request/models/VirtualAccountParameters.md images/header.jpg index.ts index.ts package.json -payment_method/apis/PaymentMethod.ts -payment_method/apis/index.ts -payment_method/index.ts -payment_method/models/BillingInformation.ts -payment_method/models/Card.ts -payment_method/models/CardChannelProperties.ts -payment_method/models/CardParameters.ts -payment_method/models/CardParametersCardInformation.ts -payment_method/models/CardVerificationResults.ts -payment_method/models/CardVerificationResultsThreeDSecure.ts -payment_method/models/ChannelAmountLimits.ts -payment_method/models/ChannelAmountLimitsAllOf.ts -payment_method/models/ChannelProperty.ts -payment_method/models/ChannelPropertyAllOf.ts -payment_method/models/CreatePaymentMethod409Response.ts -payment_method/models/CreatePaymentMethod503Response.ts -payment_method/models/DirectDebit.ts -payment_method/models/DirectDebitAllOf.ts -payment_method/models/DirectDebitBankAccount.ts -payment_method/models/DirectDebitChannelCode.ts -payment_method/models/DirectDebitChannelProperties.ts -payment_method/models/DirectDebitDebitCard.ts -payment_method/models/DirectDebitParameters.ts -payment_method/models/DirectDebitType.ts -payment_method/models/EWallet.ts -payment_method/models/EWalletAccount.ts -payment_method/models/EWalletChannelCode.ts -payment_method/models/EWalletChannelProperties.ts -payment_method/models/EWalletParameters.ts -payment_method/models/GetAllPaymentMethods400Response.ts -payment_method/models/GetAllPaymentMethods403Response.ts -payment_method/models/GetAllPaymentMethods404Response.ts -payment_method/models/GetAllPaymentMethodsDefaultResponse.ts -payment_method/models/OverTheCounter.ts -payment_method/models/OverTheCounterChannelCode.ts -payment_method/models/OverTheCounterChannelProperties.ts -payment_method/models/OverTheCounterChannelPropertiesUpdate.ts -payment_method/models/OverTheCounterParameters.ts -payment_method/models/OverTheCounterUpdateParameters.ts -payment_method/models/PaymentChannel.ts -payment_method/models/PaymentChannelAllOf.ts -payment_method/models/PaymentChannelList.ts -payment_method/models/PaymentChannelListLinksInner.ts -payment_method/models/PaymentChannelListLinksInnerAllOf.ts -payment_method/models/PaymentMethod.ts -payment_method/models/PaymentMethodAction.ts -payment_method/models/PaymentMethodAuthParameters.ts -payment_method/models/PaymentMethodCountry.ts -payment_method/models/PaymentMethodExpireParameters.ts -payment_method/models/PaymentMethodList.ts -payment_method/models/PaymentMethodParameters.ts -payment_method/models/PaymentMethodReusability.ts -payment_method/models/PaymentMethodStatus.ts -payment_method/models/PaymentMethodType.ts -payment_method/models/PaymentMethodUpdateParameters.ts -payment_method/models/QRCode.ts -payment_method/models/QRCodeChannelCode.ts -payment_method/models/QRCodeChannelProperties.ts -payment_method/models/QRCodeParameters.ts -payment_method/models/SimulatePaymentRequest.ts -payment_method/models/TokenizedCardInformation.ts -payment_method/models/VirtualAccount.ts -payment_method/models/VirtualAccountAllOf.ts -payment_method/models/VirtualAccountAlternativeDisplay.ts -payment_method/models/VirtualAccountChannelCode.ts -payment_method/models/VirtualAccountChannelProperties.ts -payment_method/models/VirtualAccountChannelPropertiesPatch.ts -payment_method/models/VirtualAccountParameters.ts -payment_method/models/VirtualAccountUpdateParameters.ts -payment_method/models/index.ts +payment_request/apis/PaymentRequest.ts +payment_request/apis/index.ts +payment_request/index.ts +payment_request/models/Capture.ts +payment_request/models/CaptureListResponse.ts +payment_request/models/CaptureParameters.ts +payment_request/models/Card.ts +payment_request/models/CardChannelProperties.ts +payment_request/models/CardInformation.ts +payment_request/models/CardVerificationResults.ts +payment_request/models/CardVerificationResultsThreeDSecure.ts +payment_request/models/DirectDebit.ts +payment_request/models/DirectDebitAllOf.ts +payment_request/models/DirectDebitBankAccount.ts +payment_request/models/DirectDebitChannelCode.ts +payment_request/models/DirectDebitChannelProperties.ts +payment_request/models/DirectDebitChannelPropertiesBankAccount.ts +payment_request/models/DirectDebitChannelPropertiesBankRedirect.ts +payment_request/models/DirectDebitChannelPropertiesDebitCard.ts +payment_request/models/DirectDebitDebitCard.ts +payment_request/models/DirectDebitParameters.ts +payment_request/models/DirectDebitType.ts +payment_request/models/EWallet.ts +payment_request/models/EWalletAccount.ts +payment_request/models/EWalletAllOf.ts +payment_request/models/EWalletChannelCode.ts +payment_request/models/EWalletChannelProperties.ts +payment_request/models/EWalletParameters.ts +payment_request/models/ModelError.ts +payment_request/models/OverTheCounter.ts +payment_request/models/OverTheCounterChannelCode.ts +payment_request/models/OverTheCounterChannelProperties.ts +payment_request/models/OverTheCounterParameters.ts +payment_request/models/PaymentMethod.ts +payment_request/models/PaymentMethodParameters.ts +payment_request/models/PaymentMethodReusability.ts +payment_request/models/PaymentMethodStatus.ts +payment_request/models/PaymentMethodType.ts +payment_request/models/PaymentRequest.ts +payment_request/models/PaymentRequestAction.ts +payment_request/models/PaymentRequestAuthParameters.ts +payment_request/models/PaymentRequestBasketItem.ts +payment_request/models/PaymentRequestCaptureMethod.ts +payment_request/models/PaymentRequestCardVerificationResults.ts +payment_request/models/PaymentRequestCardVerificationResultsThreeDeeSecure.ts +payment_request/models/PaymentRequestChannelProperties.ts +payment_request/models/PaymentRequestCountry.ts +payment_request/models/PaymentRequestCurrency.ts +payment_request/models/PaymentRequestInitiator.ts +payment_request/models/PaymentRequestListResponse.ts +payment_request/models/PaymentRequestParameters.ts +payment_request/models/PaymentRequestParametersChannelProperties.ts +payment_request/models/PaymentRequestParametersChannelPropertiesAllOf.ts +payment_request/models/PaymentRequestShippingInformation.ts +payment_request/models/PaymentRequestStatus.ts +payment_request/models/QRCode.ts +payment_request/models/QRCodeChannelCode.ts +payment_request/models/QRCodeChannelProperties.ts +payment_request/models/QRCodeParameters.ts +payment_request/models/VirtualAccount.ts +payment_request/models/VirtualAccountAllOf.ts +payment_request/models/VirtualAccountAlternativeDisplay.ts +payment_request/models/VirtualAccountChannelCode.ts +payment_request/models/VirtualAccountChannelProperties.ts +payment_request/models/VirtualAccountParameters.ts +payment_request/models/index.ts runtime.ts tsconfig.json diff --git a/README.md b/README.md index 7ae3aa0..828f3e0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The official Xendit Node SDK provides a simple and convenient way to call Xendit's REST API in applications written in Node. -* Package version: 3.2.0 +* Package version: 3.3.0 # Getting Started @@ -13,7 +13,7 @@ in applications written in Node. ### Requirements -Node 16.0 and later. +Node 18.0 and later. ### Install with npm ```bash @@ -49,13 +49,14 @@ const xenditClient = new Xendit({ # Documentation Find detailed API information and examples for each of our product’s by clicking the links below, -* [Transaction](docs/Transaction.md) -* [Balance](docs/Balance.md) -* [PaymentRequest](docs/PaymentRequest.md) -* [PaymentMethod](docs/PaymentMethod.md) * [Refund](docs/Refund.md) * [Invoice](docs/Invoice.md) * [Payout](docs/Payout.md) +* [PaymentMethod](docs/PaymentMethod.md) +* [PaymentRequest](docs/PaymentRequest.md) +* [Customer](docs/Customer.md) +* [Transaction](docs/Transaction.md) +* [Balance](docs/Balance.md) Further Reading diff --git a/customer/apis/Customer.ts b/customer/apis/Customer.ts new file mode 100644 index 0000000..9ecb725 --- /dev/null +++ b/customer/apis/Customer.ts @@ -0,0 +1,256 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + + +import * as runtime from '../../runtime'; +import type { + CreateCustomer400Response, + Customer, + CustomerRequest, + GetCustomerByReferenceID200Response, + GetCustomerByReferenceID400Response, + PatchCustomer, + ResponseDataNotFound, + UpdateCustomer400Response, +} from '../models'; +import { + CreateCustomer400ResponseFromJSON, + CreateCustomer400ResponseToJSON, + CustomerFromJSON, + CustomerToJSON, + CustomerRequestFromJSON, + CustomerRequestToJSON, + GetCustomerByReferenceID200ResponseFromJSON, + GetCustomerByReferenceID200ResponseToJSON, + GetCustomerByReferenceID400ResponseFromJSON, + GetCustomerByReferenceID400ResponseToJSON, + PatchCustomerFromJSON, + PatchCustomerToJSON, + ResponseDataNotFoundFromJSON, + ResponseDataNotFoundToJSON, + UpdateCustomer400ResponseFromJSON, + UpdateCustomer400ResponseToJSON, +} from '../models'; + +export interface CreateCustomerRequest { + iDEMPOTENCYKEY?: string; + forUserId?: string; + idempotencyKey?: string; + data?: CustomerRequest; +} + +export interface GetCustomerRequest { + id: string; + forUserId?: string; + idempotencyKey?: string; +} + +export interface GetCustomerByReferenceIDRequest { + referenceId: string; + forUserId?: string; + idempotencyKey?: string; +} + +export interface UpdateCustomerRequest { + id: string; + forUserId?: string; + idempotencyKey?: string; + data?: PatchCustomer; +} + +/** + * + */ +export class CustomerApi extends runtime.BaseAPI { + + secretKey: string = ""; + xenditURL: string = ""; + + constructor({secretKey, xenditURL}: {secretKey: string, xenditURL?: string}) { + const conf = new runtime.Configuration({ + basePath: xenditURL || 'https://api.xendit.co' + }) + super(conf) + this.secretKey = secretKey; + } + + /** + * Function to create a customer that you may use in your Invoice or Payment Requests. For detail explanations, see this link: https://developers.xendit.co/api-reference/#create-customer + * Create Customer + */ + private async createCustomerRaw(requestParameters: CreateCustomerRequest): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":"); + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters.iDEMPOTENCYKEY !== undefined && requestParameters.iDEMPOTENCYKEY !== null) { + headerParameters['IDEMPOTENCY-KEY'] = String(requestParameters.iDEMPOTENCYKEY); + } + + if (requestParameters.forUserId !== undefined && requestParameters.forUserId !== null) { + headerParameters['for-user-id'] = String(requestParameters.forUserId); + } + + if (requestParameters.idempotencyKey !== undefined && requestParameters.idempotencyKey !== null) { + headerParameters['idempotency-key'] = String(requestParameters.idempotencyKey); + } + + const response = await this.request({ + path: `/customers`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CustomerRequestToJSON(requestParameters.data), + }); + + return new runtime.JSONApiResponse(response, (jsonValue) => CustomerFromJSON(jsonValue)); + } + + /** + * Function to create a customer that you may use in your Invoice or Payment Requests. For detail explanations, see this link: https://developers.xendit.co/api-reference/#create-customer + * Create Customer + */ + async createCustomer(requestParameters: CreateCustomerRequest = {}): Promise { + const response = await this.createCustomerRaw(requestParameters); + return await response.value(); + } + + /** + * Retrieves a single customer object For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer + * Get Customer By ID + */ + private async getCustomerRaw(requestParameters: GetCustomerRequest): Promise> { + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getCustomer.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":"); + + if (requestParameters.forUserId !== undefined && requestParameters.forUserId !== null) { + headerParameters['for-user-id'] = String(requestParameters.forUserId); + } + + if (requestParameters.idempotencyKey !== undefined && requestParameters.idempotencyKey !== null) { + headerParameters['idempotency-key'] = String(requestParameters.idempotencyKey); + } + + const response = await this.request({ + path: `/customers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }); + + return new runtime.JSONApiResponse(response, (jsonValue) => CustomerFromJSON(jsonValue)); + } + + /** + * Retrieves a single customer object For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer + * Get Customer By ID + */ + async getCustomer(requestParameters: GetCustomerRequest): Promise { + const response = await this.getCustomerRaw(requestParameters); + return await response.value(); + } + + /** + * Retrieves an array with a customer object that matches the provided reference_id - the identifier provided by you For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer-by-reference-id + * GET customers by reference id + */ + private async getCustomerByReferenceIDRaw(requestParameters: GetCustomerByReferenceIDRequest): Promise> { + if (requestParameters.referenceId === null || requestParameters.referenceId === undefined) { + throw new runtime.RequiredError('referenceId','Required parameter requestParameters.referenceId was null or undefined when calling getCustomerByReferenceID.'); + } + + const queryParameters: any = {}; + + if (requestParameters.referenceId !== undefined) { + queryParameters['reference_id'] = requestParameters.referenceId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":"); + + if (requestParameters.forUserId !== undefined && requestParameters.forUserId !== null) { + headerParameters['for-user-id'] = String(requestParameters.forUserId); + } + + if (requestParameters.idempotencyKey !== undefined && requestParameters.idempotencyKey !== null) { + headerParameters['idempotency-key'] = String(requestParameters.idempotencyKey); + } + + const response = await this.request({ + path: `/customers`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetCustomerByReferenceID200ResponseFromJSON(jsonValue)); + } + + /** + * Retrieves an array with a customer object that matches the provided reference_id - the identifier provided by you For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer-by-reference-id + * GET customers by reference id + */ + async getCustomerByReferenceID(requestParameters: GetCustomerByReferenceIDRequest): Promise { + const response = await this.getCustomerByReferenceIDRaw(requestParameters); + return await response.value(); + } + + /** + * Function to update an existing customer. For a detailed explanation For detail explanations, see this link: https://developers.xendit.co/api-reference/#update-customer + * Update End Customer Resource + */ + private async updateCustomerRaw(requestParameters: UpdateCustomerRequest): Promise> { + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateCustomer.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":"); + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters.forUserId !== undefined && requestParameters.forUserId !== null) { + headerParameters['for-user-id'] = String(requestParameters.forUserId); + } + + if (requestParameters.idempotencyKey !== undefined && requestParameters.idempotencyKey !== null) { + headerParameters['idempotency-key'] = String(requestParameters.idempotencyKey); + } + + const response = await this.request({ + path: `/customers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchCustomerToJSON(requestParameters.data), + }); + + return new runtime.JSONApiResponse(response, (jsonValue) => CustomerFromJSON(jsonValue)); + } + + /** + * Function to update an existing customer. For a detailed explanation For detail explanations, see this link: https://developers.xendit.co/api-reference/#update-customer + * Update End Customer Resource + */ + async updateCustomer(requestParameters: UpdateCustomerRequest): Promise { + const response = await this.updateCustomerRaw(requestParameters); + return await response.value(); + } + +} diff --git a/customer/apis/index.ts b/customer/apis/index.ts new file mode 100644 index 0000000..685b43c --- /dev/null +++ b/customer/apis/index.ts @@ -0,0 +1,3 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './Customer'; diff --git a/customer/index.ts b/customer/index.ts new file mode 100644 index 0000000..e9c8372 --- /dev/null +++ b/customer/index.ts @@ -0,0 +1,3 @@ +export { + CustomerApi as Customer, +} from './apis' diff --git a/customer/models/AccountBank.ts b/customer/models/AccountBank.ts new file mode 100644 index 0000000..c72fd28 --- /dev/null +++ b/customer/models/AccountBank.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountBank + */ +export interface AccountBank { + /** + * Unique account identifier as per the bank records. + * @type {string} + * @memberof AccountBank + */ + accountNumber?: string; + /** + * Name of account holder as per the bank records. Needs to match the registered account name exactly. . + * @type {string} + * @memberof AccountBank + */ + accountHolderName?: string | null; + /** + * The SWIFT code for international payments + * @type {string} + * @memberof AccountBank + */ + swiftCode?: string | null; + /** + * Free text account type, e.g., Savings, Transaction, Virtual Account. + * @type {string} + * @memberof AccountBank + */ + accountType?: string | null; + /** + * Potentially masked account detail, for display purposes only. + * @type {string} + * @memberof AccountBank + */ + accountDetails?: string | null; + /** + * + * @type {string} + * @memberof AccountBank + */ + currency?: string; +} + +/** + * Check if a given object implements the AccountBank interface. + */ +export function instanceOfAccountBank(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function AccountBankFromJSON(json: any): AccountBank { + return AccountBankFromJSONTyped(json, false); +} + +export function AccountBankFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountBank { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'accountNumber': !exists(json, 'account_number') ? undefined : json['account_number'], + 'accountHolderName': !exists(json, 'account_holder_name') ? undefined : json['account_holder_name'], + 'swiftCode': !exists(json, 'swift_code') ? undefined : json['swift_code'], + 'accountType': !exists(json, 'account_type') ? undefined : json['account_type'], + 'accountDetails': !exists(json, 'account_details') ? undefined : json['account_details'], + 'currency': !exists(json, 'currency') ? undefined : json['currency'], + }; +} + +export function AccountBankToJSON(value?: AccountBank | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'account_number': value.accountNumber, + 'account_holder_name': value.accountHolderName, + 'swift_code': value.swiftCode, + 'account_type': value.accountType, + 'account_details': value.accountDetails, + 'currency': value.currency, + }; +} + diff --git a/customer/models/AccountCard.ts b/customer/models/AccountCard.ts new file mode 100644 index 0000000..bdd954e --- /dev/null +++ b/customer/models/AccountCard.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountCard + */ +export interface AccountCard { + /** + * The token id returned in tokenisation + * @type {string} + * @memberof AccountCard + */ + tokenId?: string; +} + +/** + * Check if a given object implements the AccountCard interface. + */ +export function instanceOfAccountCard(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function AccountCardFromJSON(json: any): AccountCard { + return AccountCardFromJSONTyped(json, false); +} + +export function AccountCardFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountCard { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'tokenId': !exists(json, 'token_id') ? undefined : json['token_id'], + }; +} + +export function AccountCardToJSON(value?: AccountCard | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'token_id': value.tokenId, + }; +} + diff --git a/customer/models/AccountEwallet.ts b/customer/models/AccountEwallet.ts new file mode 100644 index 0000000..a96b272 --- /dev/null +++ b/customer/models/AccountEwallet.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountEwallet + */ +export interface AccountEwallet { + /** + * Unique account identifier as per the bank records. + * @type {string} + * @memberof AccountEwallet + */ + accountNumber?: string; + /** + * Name of account holder as per the bank records. Needs to match the registered account name exactly. + * @type {string} + * @memberof AccountEwallet + */ + accountHolderName?: string | null; + /** + * + * @type {string} + * @memberof AccountEwallet + */ + currency?: string; +} + +/** + * Check if a given object implements the AccountEwallet interface. + */ +export function instanceOfAccountEwallet(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function AccountEwalletFromJSON(json: any): AccountEwallet { + return AccountEwalletFromJSONTyped(json, false); +} + +export function AccountEwalletFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountEwallet { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'accountNumber': !exists(json, 'account_number') ? undefined : json['account_number'], + 'accountHolderName': !exists(json, 'account_holder_name') ? undefined : json['account_holder_name'], + 'currency': !exists(json, 'currency') ? undefined : json['currency'], + }; +} + +export function AccountEwalletToJSON(value?: AccountEwallet | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'account_number': value.accountNumber, + 'account_holder_name': value.accountHolderName, + 'currency': value.currency, + }; +} + diff --git a/customer/models/AccountOTC.ts b/customer/models/AccountOTC.ts new file mode 100644 index 0000000..ac4f70a --- /dev/null +++ b/customer/models/AccountOTC.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountOTC + */ +export interface AccountOTC { + /** + * Complete fixed payment code (including prefix) + * @type {string} + * @memberof AccountOTC + */ + paymentCode?: string; + /** + * YYYY-MM-DD string with expiry date for the payment code + * @type {string} + * @memberof AccountOTC + */ + expiresAt?: string | null; +} + +/** + * Check if a given object implements the AccountOTC interface. + */ +export function instanceOfAccountOTC(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function AccountOTCFromJSON(json: any): AccountOTC { + return AccountOTCFromJSONTyped(json, false); +} + +export function AccountOTCFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountOTC { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'paymentCode': !exists(json, 'payment_code') ? undefined : json['payment_code'], + 'expiresAt': !exists(json, 'expires_at') ? undefined : json['expires_at'], + }; +} + +export function AccountOTCToJSON(value?: AccountOTC | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'payment_code': value.paymentCode, + 'expires_at': value.expiresAt, + }; +} + diff --git a/customer/models/AccountPayLater.ts b/customer/models/AccountPayLater.ts new file mode 100644 index 0000000..06a45f9 --- /dev/null +++ b/customer/models/AccountPayLater.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountPayLater + */ +export interface AccountPayLater { + /** + * Alphanumeric string identifying this account. Usually an email address or phone number. + * @type {string} + * @memberof AccountPayLater + */ + accountId?: string; + /** + * Name of account holder as per the cardless credit account. + * @type {string} + * @memberof AccountPayLater + */ + accountHolderName?: string | null; + /** + * + * @type {string} + * @memberof AccountPayLater + */ + currency?: string; +} + +/** + * Check if a given object implements the AccountPayLater interface. + */ +export function instanceOfAccountPayLater(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function AccountPayLaterFromJSON(json: any): AccountPayLater { + return AccountPayLaterFromJSONTyped(json, false); +} + +export function AccountPayLaterFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountPayLater { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'accountId': !exists(json, 'account_id') ? undefined : json['account_id'], + 'accountHolderName': !exists(json, 'account_holder_name') ? undefined : json['account_holder_name'], + 'currency': !exists(json, 'currency') ? undefined : json['currency'], + }; +} + +export function AccountPayLaterToJSON(value?: AccountPayLater | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'account_id': value.accountId, + 'account_holder_name': value.accountHolderName, + 'currency': value.currency, + }; +} + diff --git a/customer/models/AccountQRCode.ts b/customer/models/AccountQRCode.ts new file mode 100644 index 0000000..f7e84ba --- /dev/null +++ b/customer/models/AccountQRCode.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface AccountQRCode + */ +export interface AccountQRCode { + /** + * String representation of the QR Code image + * @type {string} + * @memberof AccountQRCode + */ + qrString?: string; +} + +/** + * Check if a given object implements the AccountQRCode interface. + */ +export function instanceOfAccountQRCode(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function AccountQRCodeFromJSON(json: any): AccountQRCode { + return AccountQRCodeFromJSONTyped(json, false); +} + +export function AccountQRCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountQRCode { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'qrString': !exists(json, 'qr_string') ? undefined : json['qr_string'], + }; +} + +export function AccountQRCodeToJSON(value?: AccountQRCode | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'qr_string': value.qrString, + }; +} + diff --git a/customer/models/Address.ts b/customer/models/Address.ts new file mode 100644 index 0000000..e86ac0d --- /dev/null +++ b/customer/models/Address.ts @@ -0,0 +1,170 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { AddressStatus } from './AddressStatus'; +import { + AddressStatusFromJSON, + AddressStatusFromJSONTyped, + AddressStatusToJSON, +} from './AddressStatus'; + +/** + * + * @export + * @interface Address + */ +export interface Address { + /** + * + * @type {string} + * @memberof Address + */ + id?: string; + /** + * + * @type {string} + * @memberof Address + */ + category: string | null; + /** + * + * @type {string} + * @memberof Address + */ + country: string; + /** + * + * @type {string} + * @memberof Address + */ + provinceState: string | null; + /** + * + * @type {string} + * @memberof Address + */ + city: string | null; + /** + * + * @type {string} + * @memberof Address + */ + postalCode: string | null; + /** + * + * @type {string} + * @memberof Address + */ + streetLine1: string | null; + /** + * + * @type {string} + * @memberof Address + */ + streetLine2: string | null; + /** + * + * @type {AddressStatus} + * @memberof Address + */ + status?: AddressStatus | null; + /** + * + * @type {boolean} + * @memberof Address + */ + isPrimary: boolean | null; + /** + * + * @type {object} + * @memberof Address + */ + meta?: object | null; + /** + * + * @type {Date} + * @memberof Address + */ + created?: Date; + /** + * + * @type {Date} + * @memberof Address + */ + updated?: Date; +} + +/** + * Check if a given object implements the Address interface. + */ +export function instanceOfAddress(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "category" in value; + isInstance = isInstance && "country" in value; + isInstance = isInstance && "provinceState" in value; + isInstance = isInstance && "city" in value; + isInstance = isInstance && "postalCode" in value; + isInstance = isInstance && "streetLine1" in value; + isInstance = isInstance && "streetLine2" in value; + isInstance = isInstance && "isPrimary" in value; + + return isInstance; +} + +export function AddressFromJSON(json: any): Address { + return AddressFromJSONTyped(json, false); +} + +export function AddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): Address { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': !exists(json, 'id') ? undefined : json['id'], + 'category': json['category'], + 'country': json['country'], + 'provinceState': json['province_state'], + 'city': json['city'], + 'postalCode': json['postal_code'], + 'streetLine1': json['street_line1'], + 'streetLine2': json['street_line2'], + 'status': !exists(json, 'status') ? undefined : AddressStatusFromJSON(json['status']), + 'isPrimary': json['is_primary'], + 'meta': !exists(json, 'meta') ? undefined : json['meta'], + 'created': !exists(json, 'created') ? undefined : (new Date(json['created'])), + 'updated': !exists(json, 'updated') ? undefined : (new Date(json['updated'])), + }; +} + +export function AddressToJSON(value?: Address | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'category': value.category, + 'country': value.country, + 'province_state': value.provinceState, + 'city': value.city, + 'postal_code': value.postalCode, + 'street_line1': value.streetLine1, + 'street_line2': value.streetLine2, + 'status': AddressStatusToJSON(value.status), + 'is_primary': value.isPrimary, + 'meta': value.meta, + 'created': value.created === undefined ? undefined : (value.created.toISOString()), + 'updated': value.updated === undefined ? undefined : (value.updated.toISOString()), + }; +} + diff --git a/customer/models/AddressRequest.ts b/customer/models/AddressRequest.ts new file mode 100644 index 0000000..f42cb7b --- /dev/null +++ b/customer/models/AddressRequest.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { AddressStatus } from './AddressStatus'; +import { + AddressStatusFromJSON, + AddressStatusFromJSONTyped, + AddressStatusToJSON, +} from './AddressStatus'; + +/** + * + * @export + * @interface AddressRequest + */ +export interface AddressRequest { + /** + * Home, work or provincial + * @type {string} + * @memberof AddressRequest + */ + category?: string; + /** + * ISO3166-2 country code + * @type {string} + * @memberof AddressRequest + */ + countryCode?: string | null; + /** + * + * @type {string} + * @memberof AddressRequest + */ + provinceState?: string; + /** + * + * @type {string} + * @memberof AddressRequest + */ + city?: string; + /** + * + * @type {string} + * @memberof AddressRequest + */ + suburb?: string; + /** + * + * @type {string} + * @memberof AddressRequest + */ + postalCode?: string; + /** + * + * @type {string} + * @memberof AddressRequest + */ + line1?: string; + /** + * + * @type {string} + * @memberof AddressRequest + */ + line2?: string; + /** + * + * @type {AddressStatus} + * @memberof AddressRequest + */ + status?: AddressStatus | null; + /** + * + * @type {boolean} + * @memberof AddressRequest + */ + isPrimary?: boolean; +} + +/** + * Check if a given object implements the AddressRequest interface. + */ +export function instanceOfAddressRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function AddressRequestFromJSON(json: any): AddressRequest { + return AddressRequestFromJSONTyped(json, false); +} + +export function AddressRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'category': !exists(json, 'category') ? undefined : json['category'], + 'countryCode': !exists(json, 'country_code') ? undefined : json['country_code'], + 'provinceState': !exists(json, 'province_state') ? undefined : json['province_state'], + 'city': !exists(json, 'city') ? undefined : json['city'], + 'suburb': !exists(json, 'suburb') ? undefined : json['suburb'], + 'postalCode': !exists(json, 'postal_code') ? undefined : json['postal_code'], + 'line1': !exists(json, 'line_1') ? undefined : json['line_1'], + 'line2': !exists(json, 'line_2') ? undefined : json['line_2'], + 'status': !exists(json, 'status') ? undefined : AddressStatusFromJSON(json['status']), + 'isPrimary': !exists(json, 'is_primary') ? undefined : json['is_primary'], + }; +} + +export function AddressRequestToJSON(value?: AddressRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'category': value.category, + 'country_code': value.countryCode, + 'province_state': value.provinceState, + 'city': value.city, + 'suburb': value.suburb, + 'postal_code': value.postalCode, + 'line_1': value.line1, + 'line_2': value.line2, + 'status': AddressStatusToJSON(value.status), + 'is_primary': value.isPrimary, + }; +} + diff --git a/customer/models/AddressStatus.ts b/customer/models/AddressStatus.ts new file mode 100644 index 0000000..64d3faf --- /dev/null +++ b/customer/models/AddressStatus.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + + +/** + * + * @export + */ +export const AddressStatus = { + Active: 'ACTIVE', + Deleted: 'DELETED' +} as const; +export type AddressStatus = typeof AddressStatus[keyof typeof AddressStatus]; + + +export function AddressStatusFromJSON(json: any): AddressStatus { + return AddressStatusFromJSONTyped(json, false); +} + +export function AddressStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddressStatus { + return json as AddressStatus; +} + +export function AddressStatusToJSON(value?: AddressStatus | null): any { + return value as any; +} + diff --git a/customer/models/BusinessDetail.ts b/customer/models/BusinessDetail.ts new file mode 100644 index 0000000..22c9930 --- /dev/null +++ b/customer/models/BusinessDetail.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface BusinessDetail + */ +export interface BusinessDetail { + /** + * + * @type {string} + * @memberof BusinessDetail + */ + businessName?: string; + /** + * + * @type {string} + * @memberof BusinessDetail + */ + businessType?: BusinessDetailBusinessTypeEnum; + /** + * + * @type {string} + * @memberof BusinessDetail + */ + dateOfRegistration?: string | null; + /** + * + * @type {string} + * @memberof BusinessDetail + */ + natureOfBusiness?: string | null; + /** + * ISO3166-2 country code + * @type {string} + * @memberof BusinessDetail + */ + businessDomicile?: string | null; +} + + +/** + * @export + */ +export const BusinessDetailBusinessTypeEnum = { + Corporation: 'CORPORATION', + SoleProprietor: 'SOLE_PROPRIETOR', + Partnership: 'PARTNERSHIP', + Cooperative: 'COOPERATIVE', + Trust: 'TRUST', + NonProfit: 'NON_PROFIT', + Government: 'GOVERNMENT' +} as const; +export type BusinessDetailBusinessTypeEnum = typeof BusinessDetailBusinessTypeEnum[keyof typeof BusinessDetailBusinessTypeEnum]; + + +/** + * Check if a given object implements the BusinessDetail interface. + */ +export function instanceOfBusinessDetail(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function BusinessDetailFromJSON(json: any): BusinessDetail { + return BusinessDetailFromJSONTyped(json, false); +} + +export function BusinessDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): BusinessDetail { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'businessName': !exists(json, 'business_name') ? undefined : json['business_name'], + 'businessType': !exists(json, 'business_type') ? undefined : json['business_type'], + 'dateOfRegistration': !exists(json, 'date_of_registration') ? undefined : json['date_of_registration'], + 'natureOfBusiness': !exists(json, 'nature_of_business') ? undefined : json['nature_of_business'], + 'businessDomicile': !exists(json, 'business_domicile') ? undefined : json['business_domicile'], + }; +} + +export function BusinessDetailToJSON(value?: BusinessDetail | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'business_name': value.businessName, + 'business_type': value.businessType, + 'date_of_registration': value.dateOfRegistration, + 'nature_of_business': value.natureOfBusiness, + 'business_domicile': value.businessDomicile, + }; +} + diff --git a/customer/models/CreateCustomer400Response.ts b/customer/models/CreateCustomer400Response.ts new file mode 100644 index 0000000..0a3b85e --- /dev/null +++ b/customer/models/CreateCustomer400Response.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface CreateCustomer400Response + */ +export interface CreateCustomer400Response { + /** + * + * @type {string} + * @memberof CreateCustomer400Response + */ + errorCode: CreateCustomer400ResponseErrorCodeEnum; + /** + * + * @type {any} + * @memberof CreateCustomer400Response + */ + message: any | null; + /** + * + * @type {Array} + * @memberof CreateCustomer400Response + */ + errors?: Array; +} + + +/** + * @export + */ +export const CreateCustomer400ResponseErrorCodeEnum = { + DuplicateEndCustomerError: 'DUPLICATE_END_CUSTOMER_ERROR', + ApiValidationError: 'API_VALIDATION_ERROR' +} as const; +export type CreateCustomer400ResponseErrorCodeEnum = typeof CreateCustomer400ResponseErrorCodeEnum[keyof typeof CreateCustomer400ResponseErrorCodeEnum]; + + +/** + * Check if a given object implements the CreateCustomer400Response interface. + */ +export function instanceOfCreateCustomer400Response(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "errorCode" in value; + isInstance = isInstance && "message" in value; + + return isInstance; +} + +export function CreateCustomer400ResponseFromJSON(json: any): CreateCustomer400Response { + return CreateCustomer400ResponseFromJSONTyped(json, false); +} + +export function CreateCustomer400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCustomer400Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': json['error_code'], + 'message': json['message'], + 'errors': !exists(json, 'errors') ? undefined : json['errors'], + }; +} + +export function CreateCustomer400ResponseToJSON(value?: CreateCustomer400Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + 'errors': value.errors, + }; +} + diff --git a/customer/models/CreateCustomer400ResponseAllOf.ts b/customer/models/CreateCustomer400ResponseAllOf.ts new file mode 100644 index 0000000..b37ae2e --- /dev/null +++ b/customer/models/CreateCustomer400ResponseAllOf.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface CreateCustomer400ResponseAllOf + */ +export interface CreateCustomer400ResponseAllOf { + /** + * + * @type {string} + * @memberof CreateCustomer400ResponseAllOf + */ + errorCode?: CreateCustomer400ResponseAllOfErrorCodeEnum; + /** + * + * @type {any} + * @memberof CreateCustomer400ResponseAllOf + */ + message?: any | null; +} + + +/** + * @export + */ +export const CreateCustomer400ResponseAllOfErrorCodeEnum = { + DuplicateEndCustomerError: 'DUPLICATE_END_CUSTOMER_ERROR', + ApiValidationError: 'API_VALIDATION_ERROR' +} as const; +export type CreateCustomer400ResponseAllOfErrorCodeEnum = typeof CreateCustomer400ResponseAllOfErrorCodeEnum[keyof typeof CreateCustomer400ResponseAllOfErrorCodeEnum]; + + +/** + * Check if a given object implements the CreateCustomer400ResponseAllOf interface. + */ +export function instanceOfCreateCustomer400ResponseAllOf(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function CreateCustomer400ResponseAllOfFromJSON(json: any): CreateCustomer400ResponseAllOf { + return CreateCustomer400ResponseAllOfFromJSONTyped(json, false); +} + +export function CreateCustomer400ResponseAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCustomer400ResponseAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': !exists(json, 'error_code') ? undefined : json['error_code'], + 'message': !exists(json, 'message') ? undefined : json['message'], + }; +} + +export function CreateCustomer400ResponseAllOfToJSON(value?: CreateCustomer400ResponseAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + }; +} + diff --git a/customer/models/Customer.ts b/customer/models/Customer.ts new file mode 100644 index 0000000..260e905 --- /dev/null +++ b/customer/models/Customer.ts @@ -0,0 +1,242 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { Address } from './Address'; +import { + AddressFromJSON, + AddressFromJSONTyped, + AddressToJSON, +} from './Address'; +import type { BusinessDetail } from './BusinessDetail'; +import { + BusinessDetailFromJSON, + BusinessDetailFromJSONTyped, + BusinessDetailToJSON, +} from './BusinessDetail'; +import type { EndCustomerStatus } from './EndCustomerStatus'; +import { + EndCustomerStatusFromJSON, + EndCustomerStatusFromJSONTyped, + EndCustomerStatusToJSON, +} from './EndCustomerStatus'; +import type { IdentityAccountResponse } from './IdentityAccountResponse'; +import { + IdentityAccountResponseFromJSON, + IdentityAccountResponseFromJSONTyped, + IdentityAccountResponseToJSON, +} from './IdentityAccountResponse'; +import type { IndividualDetail } from './IndividualDetail'; +import { + IndividualDetailFromJSON, + IndividualDetailFromJSONTyped, + IndividualDetailToJSON, +} from './IndividualDetail'; +import type { KYCDocumentResponse } from './KYCDocumentResponse'; +import { + KYCDocumentResponseFromJSON, + KYCDocumentResponseFromJSONTyped, + KYCDocumentResponseToJSON, +} from './KYCDocumentResponse'; + +/** + * + * @export + * @interface Customer + */ +export interface Customer { + /** + * + * @type {string} + * @memberof Customer + */ + type: CustomerTypeEnum; + /** + * Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. + * @type {string} + * @memberof Customer + */ + referenceId: string; + /** + * + * @type {IndividualDetail} + * @memberof Customer + */ + individualDetail: IndividualDetail | null; + /** + * + * @type {BusinessDetail} + * @memberof Customer + */ + businessDetail: BusinessDetail | null; + /** + * + * @type {string} + * @memberof Customer + */ + description: string | null; + /** + * + * @type {string} + * @memberof Customer + */ + email: string | null; + /** + * + * @type {string} + * @memberof Customer + */ + mobileNumber: string | null; + /** + * + * @type {string} + * @memberof Customer + */ + phoneNumber: string | null; + /** + * + * @type {Array
} + * @memberof Customer + */ + addresses: Array
| null; + /** + * + * @type {Array} + * @memberof Customer + */ + identityAccounts: Array | null; + /** + * + * @type {Array} + * @memberof Customer + */ + kycDocuments: Array | null; + /** + * + * @type {object} + * @memberof Customer + */ + metadata: object | null; + /** + * + * @type {EndCustomerStatus} + * @memberof Customer + */ + status?: EndCustomerStatus | null; + /** + * + * @type {string} + * @memberof Customer + */ + id: string; + /** + * + * @type {Date} + * @memberof Customer + */ + created: Date; + /** + * + * @type {Date} + * @memberof Customer + */ + updated: Date; +} + + +/** + * @export + */ +export const CustomerTypeEnum = { + Individual: 'INDIVIDUAL', + Business: 'BUSINESS' +} as const; +export type CustomerTypeEnum = typeof CustomerTypeEnum[keyof typeof CustomerTypeEnum]; + + +/** + * Check if a given object implements the Customer interface. + */ +export function instanceOfCustomer(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + isInstance = isInstance && "referenceId" in value; + isInstance = isInstance && "individualDetail" in value; + isInstance = isInstance && "businessDetail" in value; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "email" in value; + isInstance = isInstance && "mobileNumber" in value; + isInstance = isInstance && "phoneNumber" in value; + isInstance = isInstance && "addresses" in value; + isInstance = isInstance && "identityAccounts" in value; + isInstance = isInstance && "kycDocuments" in value; + isInstance = isInstance && "metadata" in value; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "created" in value; + isInstance = isInstance && "updated" in value; + + return isInstance; +} + +export function CustomerFromJSON(json: any): Customer { + return CustomerFromJSONTyped(json, false); +} + +export function CustomerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Customer { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'referenceId': json['reference_id'], + 'individualDetail': IndividualDetailFromJSON(json['individual_detail']), + 'businessDetail': BusinessDetailFromJSON(json['business_detail']), + 'description': json['description'], + 'email': json['email'], + 'mobileNumber': json['mobile_number'], + 'phoneNumber': json['phone_number'], + 'addresses': (json['addresses'] === null ? null : (json['addresses'] as Array).map(AddressFromJSON)), + 'identityAccounts': (json['identity_accounts'] === null ? null : (json['identity_accounts'] as Array).map(IdentityAccountResponseFromJSON)), + 'kycDocuments': (json['kyc_documents'] === null ? null : (json['kyc_documents'] as Array).map(KYCDocumentResponseFromJSON)), + 'metadata': json['metadata'], + 'status': !exists(json, 'status') ? undefined : EndCustomerStatusFromJSON(json['status']), + 'id': json['id'], + 'created': (new Date(json['created'])), + 'updated': (new Date(json['updated'])), + }; +} + +export function CustomerToJSON(value?: Customer | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'reference_id': value.referenceId, + 'individual_detail': IndividualDetailToJSON(value.individualDetail), + 'business_detail': BusinessDetailToJSON(value.businessDetail), + 'description': value.description, + 'email': value.email, + 'mobile_number': value.mobileNumber, + 'phone_number': value.phoneNumber, + 'addresses': (value.addresses === null ? null : (value.addresses as Array).map(AddressToJSON)), + 'identity_accounts': (value.identityAccounts === null ? null : (value.identityAccounts as Array).map(IdentityAccountResponseToJSON)), + 'kyc_documents': (value.kycDocuments === null ? null : (value.kycDocuments as Array).map(KYCDocumentResponseToJSON)), + 'metadata': value.metadata, + 'status': EndCustomerStatusToJSON(value.status), + 'id': value.id, + 'created': (value.created.toISOString()), + 'updated': (value.updated.toISOString()), + }; +} + diff --git a/customer/models/CustomerRequest.ts b/customer/models/CustomerRequest.ts new file mode 100644 index 0000000..8c974da --- /dev/null +++ b/customer/models/CustomerRequest.ts @@ -0,0 +1,198 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { AddressRequest } from './AddressRequest'; +import { + AddressRequestFromJSON, + AddressRequestFromJSONTyped, + AddressRequestToJSON, +} from './AddressRequest'; +import type { BusinessDetail } from './BusinessDetail'; +import { + BusinessDetailFromJSON, + BusinessDetailFromJSONTyped, + BusinessDetailToJSON, +} from './BusinessDetail'; +import type { IdentityAccountRequest } from './IdentityAccountRequest'; +import { + IdentityAccountRequestFromJSON, + IdentityAccountRequestFromJSONTyped, + IdentityAccountRequestToJSON, +} from './IdentityAccountRequest'; +import type { IndividualDetail } from './IndividualDetail'; +import { + IndividualDetailFromJSON, + IndividualDetailFromJSONTyped, + IndividualDetailToJSON, +} from './IndividualDetail'; +import type { KYCDocumentRequest } from './KYCDocumentRequest'; +import { + KYCDocumentRequestFromJSON, + KYCDocumentRequestFromJSONTyped, + KYCDocumentRequestToJSON, +} from './KYCDocumentRequest'; + +/** + * + * @export + * @interface CustomerRequest + */ +export interface CustomerRequest { + /** + * Entity's name for this client + * @type {string} + * @memberof CustomerRequest + */ + clientName?: string; + /** + * Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. + * @type {string} + * @memberof CustomerRequest + */ + referenceId: string; + /** + * + * @type {string} + * @memberof CustomerRequest + */ + type?: CustomerRequestTypeEnum; + /** + * + * @type {IndividualDetail} + * @memberof CustomerRequest + */ + individualDetail?: IndividualDetail | null; + /** + * + * @type {BusinessDetail} + * @memberof CustomerRequest + */ + businessDetail?: BusinessDetail | null; + /** + * + * @type {string} + * @memberof CustomerRequest + */ + description?: string | null; + /** + * + * @type {string} + * @memberof CustomerRequest + */ + email?: string; + /** + * + * @type {string} + * @memberof CustomerRequest + */ + mobileNumber?: string; + /** + * + * @type {string} + * @memberof CustomerRequest + */ + phoneNumber?: string; + /** + * + * @type {Array} + * @memberof CustomerRequest + */ + addresses?: Array; + /** + * + * @type {Array} + * @memberof CustomerRequest + */ + identityAccounts?: Array; + /** + * + * @type {Array} + * @memberof CustomerRequest + */ + kycDocuments?: Array; + /** + * + * @type {object} + * @memberof CustomerRequest + */ + metadata?: object; +} + + +/** + * @export + */ +export const CustomerRequestTypeEnum = { + Individual: 'INDIVIDUAL', + Business: 'BUSINESS' +} as const; +export type CustomerRequestTypeEnum = typeof CustomerRequestTypeEnum[keyof typeof CustomerRequestTypeEnum]; + + +/** + * Check if a given object implements the CustomerRequest interface. + */ +export function instanceOfCustomerRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "referenceId" in value; + + return isInstance; +} + +export function CustomerRequestFromJSON(json: any): CustomerRequest { + return CustomerRequestFromJSONTyped(json, false); +} + +export function CustomerRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomerRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'clientName': !exists(json, 'client_name') ? undefined : json['client_name'], + 'referenceId': json['reference_id'], + 'type': !exists(json, 'type') ? undefined : json['type'], + 'individualDetail': !exists(json, 'individual_detail') ? undefined : IndividualDetailFromJSON(json['individual_detail']), + 'businessDetail': !exists(json, 'business_detail') ? undefined : BusinessDetailFromJSON(json['business_detail']), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'email': !exists(json, 'email') ? undefined : json['email'], + 'mobileNumber': !exists(json, 'mobile_number') ? undefined : json['mobile_number'], + 'phoneNumber': !exists(json, 'phone_number') ? undefined : json['phone_number'], + 'addresses': !exists(json, 'addresses') ? undefined : ((json['addresses'] as Array).map(AddressRequestFromJSON)), + 'identityAccounts': !exists(json, 'identity_accounts') ? undefined : ((json['identity_accounts'] as Array).map(IdentityAccountRequestFromJSON)), + 'kycDocuments': !exists(json, 'kyc_documents') ? undefined : ((json['kyc_documents'] as Array).map(KYCDocumentRequestFromJSON)), + 'metadata': !exists(json, 'metadata') ? undefined : json['metadata'], + }; +} + +export function CustomerRequestToJSON(value?: CustomerRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'client_name': value.clientName, + 'reference_id': value.referenceId, + 'type': value.type, + 'individual_detail': IndividualDetailToJSON(value.individualDetail), + 'business_detail': BusinessDetailToJSON(value.businessDetail), + 'description': value.description, + 'email': value.email, + 'mobile_number': value.mobileNumber, + 'phone_number': value.phoneNumber, + 'addresses': value.addresses === undefined ? undefined : ((value.addresses as Array).map(AddressRequestToJSON)), + 'identity_accounts': value.identityAccounts === undefined ? undefined : ((value.identityAccounts as Array).map(IdentityAccountRequestToJSON)), + 'kyc_documents': value.kycDocuments === undefined ? undefined : ((value.kycDocuments as Array).map(KYCDocumentRequestToJSON)), + 'metadata': value.metadata, + }; +} + diff --git a/customer/models/EmploymentDetail.ts b/customer/models/EmploymentDetail.ts new file mode 100644 index 0000000..5b09526 --- /dev/null +++ b/customer/models/EmploymentDetail.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface EmploymentDetail + */ +export interface EmploymentDetail { + /** + * Name of employer + * @type {string} + * @memberof EmploymentDetail + */ + employerName?: string | null; + /** + * Industry or nature of business + * @type {string} + * @memberof EmploymentDetail + */ + natureOfBusiness?: string | null; + /** + * Occupation or title + * @type {string} + * @memberof EmploymentDetail + */ + roleDescription?: string | null; +} + +/** + * Check if a given object implements the EmploymentDetail interface. + */ +export function instanceOfEmploymentDetail(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function EmploymentDetailFromJSON(json: any): EmploymentDetail { + return EmploymentDetailFromJSONTyped(json, false); +} + +export function EmploymentDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmploymentDetail { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'employerName': !exists(json, 'employer_name') ? undefined : json['employer_name'], + 'natureOfBusiness': !exists(json, 'nature_of_business') ? undefined : json['nature_of_business'], + 'roleDescription': !exists(json, 'role_description') ? undefined : json['role_description'], + }; +} + +export function EmploymentDetailToJSON(value?: EmploymentDetail | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'employer_name': value.employerName, + 'nature_of_business': value.natureOfBusiness, + 'role_description': value.roleDescription, + }; +} + diff --git a/customer/models/EndCustomerStatus.ts b/customer/models/EndCustomerStatus.ts new file mode 100644 index 0000000..bd00bf0 --- /dev/null +++ b/customer/models/EndCustomerStatus.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + + +/** + * + * @export + */ +export const EndCustomerStatus = { + Active: 'ACTIVE', + Inactive: 'INACTIVE', + Pending: 'PENDING', + Blocked: 'BLOCKED', + Deleted: 'DELETED' +} as const; +export type EndCustomerStatus = typeof EndCustomerStatus[keyof typeof EndCustomerStatus]; + + +export function EndCustomerStatusFromJSON(json: any): EndCustomerStatus { + return EndCustomerStatusFromJSONTyped(json, false); +} + +export function EndCustomerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndCustomerStatus { + return json as EndCustomerStatus; +} + +export function EndCustomerStatusToJSON(value?: EndCustomerStatus | null): any { + return value as any; +} + diff --git a/customer/models/GetCustomerByReferenceID200Response.ts b/customer/models/GetCustomerByReferenceID200Response.ts new file mode 100644 index 0000000..cca4314 --- /dev/null +++ b/customer/models/GetCustomerByReferenceID200Response.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { Customer } from './Customer'; +import { + CustomerFromJSON, + CustomerFromJSONTyped, + CustomerToJSON, +} from './Customer'; + +/** + * + * @export + * @interface GetCustomerByReferenceID200Response + */ +export interface GetCustomerByReferenceID200Response { + /** + * + * @type {boolean} + * @memberof GetCustomerByReferenceID200Response + */ + hasMore?: boolean; + /** + * + * @type {Array} + * @memberof GetCustomerByReferenceID200Response + */ + data?: Array; +} + +/** + * Check if a given object implements the GetCustomerByReferenceID200Response interface. + */ +export function instanceOfGetCustomerByReferenceID200Response(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function GetCustomerByReferenceID200ResponseFromJSON(json: any): GetCustomerByReferenceID200Response { + return GetCustomerByReferenceID200ResponseFromJSONTyped(json, false); +} + +export function GetCustomerByReferenceID200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCustomerByReferenceID200Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'hasMore': !exists(json, 'has_more') ? undefined : json['has_more'], + 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(CustomerFromJSON)), + }; +} + +export function GetCustomerByReferenceID200ResponseToJSON(value?: GetCustomerByReferenceID200Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'has_more': value.hasMore, + 'data': value.data === undefined ? undefined : ((value.data as Array).map(CustomerToJSON)), + }; +} + diff --git a/customer/models/GetCustomerByReferenceID400Response.ts b/customer/models/GetCustomerByReferenceID400Response.ts new file mode 100644 index 0000000..3d5344b --- /dev/null +++ b/customer/models/GetCustomerByReferenceID400Response.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface GetCustomerByReferenceID400Response + */ +export interface GetCustomerByReferenceID400Response { + /** + * + * @type {string} + * @memberof GetCustomerByReferenceID400Response + */ + errorCode: GetCustomerByReferenceID400ResponseErrorCodeEnum; + /** + * + * @type {any} + * @memberof GetCustomerByReferenceID400Response + */ + message: any | null; + /** + * + * @type {Array} + * @memberof GetCustomerByReferenceID400Response + */ + errors?: Array; +} + + +/** + * @export + */ +export const GetCustomerByReferenceID400ResponseErrorCodeEnum = { + EntityNotFoundError: 'ENTITY_NOT_FOUND_ERROR', + ClientNotFoundError: 'CLIENT_NOT_FOUND_ERROR', + EndCustomerNotFoundError: 'END_CUSTOMER_NOT_FOUND_ERROR', + ApiValidationError: 'API_VALIDATION_ERROR' +} as const; +export type GetCustomerByReferenceID400ResponseErrorCodeEnum = typeof GetCustomerByReferenceID400ResponseErrorCodeEnum[keyof typeof GetCustomerByReferenceID400ResponseErrorCodeEnum]; + + +/** + * Check if a given object implements the GetCustomerByReferenceID400Response interface. + */ +export function instanceOfGetCustomerByReferenceID400Response(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "errorCode" in value; + isInstance = isInstance && "message" in value; + + return isInstance; +} + +export function GetCustomerByReferenceID400ResponseFromJSON(json: any): GetCustomerByReferenceID400Response { + return GetCustomerByReferenceID400ResponseFromJSONTyped(json, false); +} + +export function GetCustomerByReferenceID400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCustomerByReferenceID400Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': json['error_code'], + 'message': json['message'], + 'errors': !exists(json, 'errors') ? undefined : json['errors'], + }; +} + +export function GetCustomerByReferenceID400ResponseToJSON(value?: GetCustomerByReferenceID400Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + 'errors': value.errors, + }; +} + diff --git a/customer/models/GetCustomerByReferenceID400ResponseAllOf.ts b/customer/models/GetCustomerByReferenceID400ResponseAllOf.ts new file mode 100644 index 0000000..8a71d58 --- /dev/null +++ b/customer/models/GetCustomerByReferenceID400ResponseAllOf.ts @@ -0,0 +1,80 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface GetCustomerByReferenceID400ResponseAllOf + */ +export interface GetCustomerByReferenceID400ResponseAllOf { + /** + * + * @type {string} + * @memberof GetCustomerByReferenceID400ResponseAllOf + */ + errorCode?: GetCustomerByReferenceID400ResponseAllOfErrorCodeEnum; + /** + * + * @type {any} + * @memberof GetCustomerByReferenceID400ResponseAllOf + */ + message?: any | null; +} + + +/** + * @export + */ +export const GetCustomerByReferenceID400ResponseAllOfErrorCodeEnum = { + EntityNotFoundError: 'ENTITY_NOT_FOUND_ERROR', + ClientNotFoundError: 'CLIENT_NOT_FOUND_ERROR', + EndCustomerNotFoundError: 'END_CUSTOMER_NOT_FOUND_ERROR', + ApiValidationError: 'API_VALIDATION_ERROR' +} as const; +export type GetCustomerByReferenceID400ResponseAllOfErrorCodeEnum = typeof GetCustomerByReferenceID400ResponseAllOfErrorCodeEnum[keyof typeof GetCustomerByReferenceID400ResponseAllOfErrorCodeEnum]; + + +/** + * Check if a given object implements the GetCustomerByReferenceID400ResponseAllOf interface. + */ +export function instanceOfGetCustomerByReferenceID400ResponseAllOf(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function GetCustomerByReferenceID400ResponseAllOfFromJSON(json: any): GetCustomerByReferenceID400ResponseAllOf { + return GetCustomerByReferenceID400ResponseAllOfFromJSONTyped(json, false); +} + +export function GetCustomerByReferenceID400ResponseAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCustomerByReferenceID400ResponseAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': !exists(json, 'error_code') ? undefined : json['error_code'], + 'message': !exists(json, 'message') ? undefined : json['message'], + }; +} + +export function GetCustomerByReferenceID400ResponseAllOfToJSON(value?: GetCustomerByReferenceID400ResponseAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + }; +} + diff --git a/customer/models/IdentityAccountRequest.ts b/customer/models/IdentityAccountRequest.ts new file mode 100644 index 0000000..6f38d33 --- /dev/null +++ b/customer/models/IdentityAccountRequest.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { IdentityAccountRequestProperties } from './IdentityAccountRequestProperties'; +import { + IdentityAccountRequestPropertiesFromJSON, + IdentityAccountRequestPropertiesFromJSONTyped, + IdentityAccountRequestPropertiesToJSON, +} from './IdentityAccountRequestProperties'; +import type { IdentityAccountType } from './IdentityAccountType'; +import { + IdentityAccountTypeFromJSON, + IdentityAccountTypeFromJSONTyped, + IdentityAccountTypeToJSON, +} from './IdentityAccountType'; + +/** + * + * @export + * @interface IdentityAccountRequest + */ +export interface IdentityAccountRequest { + /** + * + * @type {IdentityAccountType} + * @memberof IdentityAccountRequest + */ + type?: IdentityAccountType; + /** + * The issuing institution associated with the account (e.g., OCBC, GOPAY, 7-11). If adding financial accounts that Xendit supports, we recommend you use the channel_name found at https://xendit.github.io/apireference/#payment-channels for this field + * @type {string} + * @memberof IdentityAccountRequest + */ + company?: string; + /** + * Free text description of this account + * @type {string} + * @memberof IdentityAccountRequest + */ + description?: string; + /** + * ISO3166-2 country code + * @type {string} + * @memberof IdentityAccountRequest + */ + country?: string | null; + /** + * + * @type {IdentityAccountRequestProperties} + * @memberof IdentityAccountRequest + */ + properties?: IdentityAccountRequestProperties; +} + +/** + * Check if a given object implements the IdentityAccountRequest interface. + */ +export function instanceOfIdentityAccountRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function IdentityAccountRequestFromJSON(json: any): IdentityAccountRequest { + return IdentityAccountRequestFromJSONTyped(json, false); +} + +export function IdentityAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentityAccountRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': !exists(json, 'type') ? undefined : IdentityAccountTypeFromJSON(json['type']), + 'company': !exists(json, 'company') ? undefined : json['company'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'country': !exists(json, 'country') ? undefined : json['country'], + 'properties': !exists(json, 'properties') ? undefined : IdentityAccountRequestPropertiesFromJSON(json['properties']), + }; +} + +export function IdentityAccountRequestToJSON(value?: IdentityAccountRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': IdentityAccountTypeToJSON(value.type), + 'company': value.company, + 'description': value.description, + 'country': value.country, + 'properties': IdentityAccountRequestPropertiesToJSON(value.properties), + }; +} + diff --git a/customer/models/IdentityAccountRequestProperties.ts b/customer/models/IdentityAccountRequestProperties.ts new file mode 100644 index 0000000..1ad2028 --- /dev/null +++ b/customer/models/IdentityAccountRequestProperties.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { AccountBank } from './AccountBank'; +import { + AccountBankFromJSON, + AccountBankFromJSONTyped, + AccountBankToJSON, +} from './AccountBank'; +import type { AccountCard } from './AccountCard'; +import { + AccountCardFromJSON, + AccountCardFromJSONTyped, + AccountCardToJSON, +} from './AccountCard'; +import type { AccountEwallet } from './AccountEwallet'; +import { + AccountEwalletFromJSON, + AccountEwalletFromJSONTyped, + AccountEwalletToJSON, +} from './AccountEwallet'; +import type { AccountOTC } from './AccountOTC'; +import { + AccountOTCFromJSON, + AccountOTCFromJSONTyped, + AccountOTCToJSON, +} from './AccountOTC'; +import type { AccountPayLater } from './AccountPayLater'; +import { + AccountPayLaterFromJSON, + AccountPayLaterFromJSONTyped, + AccountPayLaterToJSON, +} from './AccountPayLater'; +import type { AccountQRCode } from './AccountQRCode'; +import { + AccountQRCodeFromJSON, + AccountQRCodeFromJSONTyped, + AccountQRCodeToJSON, +} from './AccountQRCode'; + +/** + * + * @export + * @interface IdentityAccountRequestProperties + */ +export interface IdentityAccountRequestProperties { + /** + * Unique account identifier as per the bank records. + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + accountNumber?: string; + /** + * Name of account holder as per the cardless credit account. + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + accountHolderName?: string | null; + /** + * The SWIFT code for international payments + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + swiftCode?: string | null; + /** + * Free text account type, e.g., Savings, Transaction, Virtual Account. + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + accountType?: string | null; + /** + * Potentially masked account detail, for display purposes only. + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + accountDetails?: string | null; + /** + * + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + currency?: string; + /** + * The token id returned in tokenisation + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + tokenId?: string; + /** + * Alphanumeric string identifying this account. Usually an email address or phone number. + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + accountId?: string; + /** + * Complete fixed payment code (including prefix) + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + paymentCode?: string; + /** + * YYYY-MM-DD string with expiry date for the payment code + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + expiresAt?: string | null; + /** + * String representation of the QR Code image + * @type {string} + * @memberof IdentityAccountRequestProperties + */ + qrString?: string; +} + +/** + * Check if a given object implements the IdentityAccountRequestProperties interface. + */ +export function instanceOfIdentityAccountRequestProperties(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function IdentityAccountRequestPropertiesFromJSON(json: any): IdentityAccountRequestProperties { + return IdentityAccountRequestPropertiesFromJSONTyped(json, false); +} + +export function IdentityAccountRequestPropertiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentityAccountRequestProperties { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'accountNumber': !exists(json, 'account_number') ? undefined : json['account_number'], + 'accountHolderName': !exists(json, 'account_holder_name') ? undefined : json['account_holder_name'], + 'swiftCode': !exists(json, 'swift_code') ? undefined : json['swift_code'], + 'accountType': !exists(json, 'account_type') ? undefined : json['account_type'], + 'accountDetails': !exists(json, 'account_details') ? undefined : json['account_details'], + 'currency': !exists(json, 'currency') ? undefined : json['currency'], + 'tokenId': !exists(json, 'token_id') ? undefined : json['token_id'], + 'accountId': !exists(json, 'account_id') ? undefined : json['account_id'], + 'paymentCode': !exists(json, 'payment_code') ? undefined : json['payment_code'], + 'expiresAt': !exists(json, 'expires_at') ? undefined : json['expires_at'], + 'qrString': !exists(json, 'qr_string') ? undefined : json['qr_string'], + }; +} + +export function IdentityAccountRequestPropertiesToJSON(value?: IdentityAccountRequestProperties | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'account_number': value.accountNumber, + 'account_holder_name': value.accountHolderName, + 'swift_code': value.swiftCode, + 'account_type': value.accountType, + 'account_details': value.accountDetails, + 'currency': value.currency, + 'token_id': value.tokenId, + 'account_id': value.accountId, + 'payment_code': value.paymentCode, + 'expires_at': value.expiresAt, + 'qr_string': value.qrString, + }; +} + diff --git a/customer/models/IdentityAccountResponse.ts b/customer/models/IdentityAccountResponse.ts new file mode 100644 index 0000000..2bcdeb3 --- /dev/null +++ b/customer/models/IdentityAccountResponse.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { IdentityAccountResponseProperties } from './IdentityAccountResponseProperties'; +import { + IdentityAccountResponsePropertiesFromJSON, + IdentityAccountResponsePropertiesFromJSONTyped, + IdentityAccountResponsePropertiesToJSON, +} from './IdentityAccountResponseProperties'; + +/** + * + * @export + * @interface IdentityAccountResponse + */ +export interface IdentityAccountResponse { + /** + * + * @type {string} + * @memberof IdentityAccountResponse + */ + id?: string; + /** + * + * @type {string} + * @memberof IdentityAccountResponse + */ + code?: string | null; + /** + * + * @type {string} + * @memberof IdentityAccountResponse + */ + company: string | null; + /** + * + * @type {string} + * @memberof IdentityAccountResponse + */ + description: string | null; + /** + * ISO3166-2 country code + * @type {string} + * @memberof IdentityAccountResponse + */ + country: string | null; + /** + * + * @type {string} + * @memberof IdentityAccountResponse + */ + holderName?: string | null; + /** + * + * @type {string} + * @memberof IdentityAccountResponse + */ + type: IdentityAccountResponseTypeEnum; + /** + * + * @type {IdentityAccountResponseProperties} + * @memberof IdentityAccountResponse + */ + properties: IdentityAccountResponseProperties; + /** + * + * @type {Date} + * @memberof IdentityAccountResponse + */ + created?: Date; +} + + +/** + * @export + */ +export const IdentityAccountResponseTypeEnum = { + BankAccount: 'BANK_ACCOUNT', + Ewallet: 'EWALLET', + CreditCard: 'CREDIT_CARD', + Otc: 'OTC', + QrCode: 'QR_CODE', + CardlessCredit: 'CARDLESS_CREDIT' +} as const; +export type IdentityAccountResponseTypeEnum = typeof IdentityAccountResponseTypeEnum[keyof typeof IdentityAccountResponseTypeEnum]; + + +/** + * Check if a given object implements the IdentityAccountResponse interface. + */ +export function instanceOfIdentityAccountResponse(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "company" in value; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "country" in value; + isInstance = isInstance && "type" in value; + isInstance = isInstance && "properties" in value; + + return isInstance; +} + +export function IdentityAccountResponseFromJSON(json: any): IdentityAccountResponse { + return IdentityAccountResponseFromJSONTyped(json, false); +} + +export function IdentityAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentityAccountResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': !exists(json, 'id') ? undefined : json['id'], + 'code': !exists(json, 'code') ? undefined : json['code'], + 'company': json['company'], + 'description': json['description'], + 'country': json['country'], + 'holderName': !exists(json, 'holder_name') ? undefined : json['holder_name'], + 'type': json['type'], + 'properties': IdentityAccountResponsePropertiesFromJSON(json['properties']), + 'created': !exists(json, 'created') ? undefined : (new Date(json['created'])), + }; +} + +export function IdentityAccountResponseToJSON(value?: IdentityAccountResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'code': value.code, + 'company': value.company, + 'description': value.description, + 'country': value.country, + 'holder_name': value.holderName, + 'type': value.type, + 'properties': IdentityAccountResponsePropertiesToJSON(value.properties), + 'created': value.created === undefined ? undefined : (value.created.toISOString()), + }; +} + diff --git a/customer/models/IdentityAccountResponseProperties.ts b/customer/models/IdentityAccountResponseProperties.ts new file mode 100644 index 0000000..45e60f1 --- /dev/null +++ b/customer/models/IdentityAccountResponseProperties.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { AccountBank } from './AccountBank'; +import { + AccountBankFromJSON, + AccountBankFromJSONTyped, + AccountBankToJSON, +} from './AccountBank'; +import type { AccountCard } from './AccountCard'; +import { + AccountCardFromJSON, + AccountCardFromJSONTyped, + AccountCardToJSON, +} from './AccountCard'; +import type { AccountEwallet } from './AccountEwallet'; +import { + AccountEwalletFromJSON, + AccountEwalletFromJSONTyped, + AccountEwalletToJSON, +} from './AccountEwallet'; +import type { AccountOTC } from './AccountOTC'; +import { + AccountOTCFromJSON, + AccountOTCFromJSONTyped, + AccountOTCToJSON, +} from './AccountOTC'; +import type { AccountPayLater } from './AccountPayLater'; +import { + AccountPayLaterFromJSON, + AccountPayLaterFromJSONTyped, + AccountPayLaterToJSON, +} from './AccountPayLater'; +import type { AccountQRCode } from './AccountQRCode'; +import { + AccountQRCodeFromJSON, + AccountQRCodeFromJSONTyped, + AccountQRCodeToJSON, +} from './AccountQRCode'; + +/** + * + * @export + * @interface IdentityAccountResponseProperties + */ +export interface IdentityAccountResponseProperties { + /** + * Unique account identifier as per the bank records. + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + accountNumber?: string; + /** + * Name of account holder as per the cardless credit account. + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + accountHolderName?: string | null; + /** + * The SWIFT code for international payments + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + swiftCode?: string | null; + /** + * Free text account type, e.g., Savings, Transaction, Virtual Account. + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + accountType?: string | null; + /** + * Potentially masked account detail, for display purposes only. + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + accountDetails?: string | null; + /** + * + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + currency?: string; + /** + * The token id returned in tokenisation + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + tokenId?: string; + /** + * Complete fixed payment code (including prefix) + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + paymentCode?: string; + /** + * YYYY-MM-DD string with expiry date for the payment code + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + expiresAt?: string | null; + /** + * String representation of the QR Code image + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + qrString?: string; + /** + * Alphanumeric string identifying this account. Usually an email address or phone number. + * @type {string} + * @memberof IdentityAccountResponseProperties + */ + accountId?: string; +} + +/** + * Check if a given object implements the IdentityAccountResponseProperties interface. + */ +export function instanceOfIdentityAccountResponseProperties(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function IdentityAccountResponsePropertiesFromJSON(json: any): IdentityAccountResponseProperties { + return IdentityAccountResponsePropertiesFromJSONTyped(json, false); +} + +export function IdentityAccountResponsePropertiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentityAccountResponseProperties { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'accountNumber': !exists(json, 'account_number') ? undefined : json['account_number'], + 'accountHolderName': !exists(json, 'account_holder_name') ? undefined : json['account_holder_name'], + 'swiftCode': !exists(json, 'swift_code') ? undefined : json['swift_code'], + 'accountType': !exists(json, 'account_type') ? undefined : json['account_type'], + 'accountDetails': !exists(json, 'account_details') ? undefined : json['account_details'], + 'currency': !exists(json, 'currency') ? undefined : json['currency'], + 'tokenId': !exists(json, 'token_id') ? undefined : json['token_id'], + 'paymentCode': !exists(json, 'payment_code') ? undefined : json['payment_code'], + 'expiresAt': !exists(json, 'expires_at') ? undefined : json['expires_at'], + 'qrString': !exists(json, 'qr_string') ? undefined : json['qr_string'], + 'accountId': !exists(json, 'account_id') ? undefined : json['account_id'], + }; +} + +export function IdentityAccountResponsePropertiesToJSON(value?: IdentityAccountResponseProperties | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'account_number': value.accountNumber, + 'account_holder_name': value.accountHolderName, + 'swift_code': value.swiftCode, + 'account_type': value.accountType, + 'account_details': value.accountDetails, + 'currency': value.currency, + 'token_id': value.tokenId, + 'payment_code': value.paymentCode, + 'expires_at': value.expiresAt, + 'qr_string': value.qrString, + 'account_id': value.accountId, + }; +} + diff --git a/customer/models/IdentityAccountType.ts b/customer/models/IdentityAccountType.ts new file mode 100644 index 0000000..b60ca0e --- /dev/null +++ b/customer/models/IdentityAccountType.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + + +/** + * + * @export + */ +export const IdentityAccountType = { + BankAccount: 'BANK_ACCOUNT', + Ewallet: 'EWALLET', + CreditCard: 'CREDIT_CARD', + PayLater: 'PAY_LATER', + Otc: 'OTC', + QrCode: 'QR_CODE' +} as const; +export type IdentityAccountType = typeof IdentityAccountType[keyof typeof IdentityAccountType]; + + +export function IdentityAccountTypeFromJSON(json: any): IdentityAccountType { + return IdentityAccountTypeFromJSONTyped(json, false); +} + +export function IdentityAccountTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentityAccountType { + return json as IdentityAccountType; +} + +export function IdentityAccountTypeToJSON(value?: IdentityAccountType | null): any { + return value as any; +} + diff --git a/customer/models/IndividualDetail.ts b/customer/models/IndividualDetail.ts new file mode 100644 index 0000000..f68d2aa --- /dev/null +++ b/customer/models/IndividualDetail.ts @@ -0,0 +1,158 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { EmploymentDetail } from './EmploymentDetail'; +import { + EmploymentDetailFromJSON, + EmploymentDetailFromJSONTyped, + EmploymentDetailToJSON, +} from './EmploymentDetail'; + +/** + * + * @export + * @interface IndividualDetail + */ +export interface IndividualDetail { + /** + * + * @type {string} + * @memberof IndividualDetail + */ + givenNames?: string; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + givenNamesNonRoman?: string | null; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + middleName?: string | null; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + surname?: string | null; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + surnameNonRoman?: string | null; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + motherMaidenName?: string | null; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + gender?: IndividualDetailGenderEnum; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + dateOfBirth?: string | null; + /** + * ISO3166-2 country code + * @type {string} + * @memberof IndividualDetail + */ + nationality?: string | null; + /** + * + * @type {string} + * @memberof IndividualDetail + */ + placeOfBirth?: string | null; + /** + * + * @type {EmploymentDetail} + * @memberof IndividualDetail + */ + employment?: EmploymentDetail | null; +} + + +/** + * @export + */ +export const IndividualDetailGenderEnum = { + Male: 'MALE', + Female: 'FEMALE', + Other: 'OTHER' +} as const; +export type IndividualDetailGenderEnum = typeof IndividualDetailGenderEnum[keyof typeof IndividualDetailGenderEnum]; + + +/** + * Check if a given object implements the IndividualDetail interface. + */ +export function instanceOfIndividualDetail(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function IndividualDetailFromJSON(json: any): IndividualDetail { + return IndividualDetailFromJSONTyped(json, false); +} + +export function IndividualDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): IndividualDetail { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'givenNames': !exists(json, 'given_names') ? undefined : json['given_names'], + 'givenNamesNonRoman': !exists(json, 'given_names_non_roman') ? undefined : json['given_names_non_roman'], + 'middleName': !exists(json, 'middle_name') ? undefined : json['middle_name'], + 'surname': !exists(json, 'surname') ? undefined : json['surname'], + 'surnameNonRoman': !exists(json, 'surname_non_roman') ? undefined : json['surname_non_roman'], + 'motherMaidenName': !exists(json, 'mother_maiden_name') ? undefined : json['mother_maiden_name'], + 'gender': !exists(json, 'gender') ? undefined : json['gender'], + 'dateOfBirth': !exists(json, 'date_of_birth') ? undefined : json['date_of_birth'], + 'nationality': !exists(json, 'nationality') ? undefined : json['nationality'], + 'placeOfBirth': !exists(json, 'place_of_birth') ? undefined : json['place_of_birth'], + 'employment': !exists(json, 'employment') ? undefined : EmploymentDetailFromJSON(json['employment']), + }; +} + +export function IndividualDetailToJSON(value?: IndividualDetail | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'given_names': value.givenNames, + 'given_names_non_roman': value.givenNamesNonRoman, + 'middle_name': value.middleName, + 'surname': value.surname, + 'surname_non_roman': value.surnameNonRoman, + 'mother_maiden_name': value.motherMaidenName, + 'gender': value.gender, + 'date_of_birth': value.dateOfBirth, + 'nationality': value.nationality, + 'place_of_birth': value.placeOfBirth, + 'employment': EmploymentDetailToJSON(value.employment), + }; +} + diff --git a/customer/models/KYCDocumentRequest.ts b/customer/models/KYCDocumentRequest.ts new file mode 100644 index 0000000..d725250 --- /dev/null +++ b/customer/models/KYCDocumentRequest.ts @@ -0,0 +1,128 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { KYCDocumentSubType } from './KYCDocumentSubType'; +import { + KYCDocumentSubTypeFromJSON, + KYCDocumentSubTypeFromJSONTyped, + KYCDocumentSubTypeToJSON, +} from './KYCDocumentSubType'; +import type { KYCDocumentType } from './KYCDocumentType'; +import { + KYCDocumentTypeFromJSON, + KYCDocumentTypeFromJSONTyped, + KYCDocumentTypeToJSON, +} from './KYCDocumentType'; + +/** + * + * @export + * @interface KYCDocumentRequest + */ +export interface KYCDocumentRequest { + /** + * ISO3166-2 country code + * @type {string} + * @memberof KYCDocumentRequest + */ + country?: string | null; + /** + * + * @type {KYCDocumentType} + * @memberof KYCDocumentRequest + */ + type?: KYCDocumentType; + /** + * + * @type {KYCDocumentSubType} + * @memberof KYCDocumentRequest + */ + subType?: KYCDocumentSubType | null; + /** + * + * @type {string} + * @memberof KYCDocumentRequest + */ + documentName?: string; + /** + * + * @type {string} + * @memberof KYCDocumentRequest + */ + documentNumber?: string; + /** + * + * @type {string} + * @memberof KYCDocumentRequest + */ + expiresAt?: string; + /** + * + * @type {string} + * @memberof KYCDocumentRequest + */ + holderName?: string; + /** + * + * @type {Array} + * @memberof KYCDocumentRequest + */ + documentImages?: Array; +} + +/** + * Check if a given object implements the KYCDocumentRequest interface. + */ +export function instanceOfKYCDocumentRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function KYCDocumentRequestFromJSON(json: any): KYCDocumentRequest { + return KYCDocumentRequestFromJSONTyped(json, false); +} + +export function KYCDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KYCDocumentRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'country': !exists(json, 'country') ? undefined : json['country'], + 'type': !exists(json, 'type') ? undefined : KYCDocumentTypeFromJSON(json['type']), + 'subType': !exists(json, 'sub_type') ? undefined : KYCDocumentSubTypeFromJSON(json['sub_type']), + 'documentName': !exists(json, 'document_name') ? undefined : json['document_name'], + 'documentNumber': !exists(json, 'document_number') ? undefined : json['document_number'], + 'expiresAt': !exists(json, 'expires_at') ? undefined : json['expires_at'], + 'holderName': !exists(json, 'holder_name') ? undefined : json['holder_name'], + 'documentImages': !exists(json, 'document_images') ? undefined : json['document_images'], + }; +} + +export function KYCDocumentRequestToJSON(value?: KYCDocumentRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'country': value.country, + 'type': KYCDocumentTypeToJSON(value.type), + 'sub_type': KYCDocumentSubTypeToJSON(value.subType), + 'document_name': value.documentName, + 'document_number': value.documentNumber, + 'expires_at': value.expiresAt, + 'holder_name': value.holderName, + 'document_images': value.documentImages, + }; +} + diff --git a/customer/models/KYCDocumentResponse.ts b/customer/models/KYCDocumentResponse.ts new file mode 100644 index 0000000..0cc2ed2 --- /dev/null +++ b/customer/models/KYCDocumentResponse.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { KYCDocumentSubType } from './KYCDocumentSubType'; +import { + KYCDocumentSubTypeFromJSON, + KYCDocumentSubTypeFromJSONTyped, + KYCDocumentSubTypeToJSON, +} from './KYCDocumentSubType'; +import type { KYCDocumentType } from './KYCDocumentType'; +import { + KYCDocumentTypeFromJSON, + KYCDocumentTypeFromJSONTyped, + KYCDocumentTypeToJSON, +} from './KYCDocumentType'; + +/** + * + * @export + * @interface KYCDocumentResponse + */ +export interface KYCDocumentResponse { + /** + * + * @type {string} + * @memberof KYCDocumentResponse + */ + country: string; + /** + * + * @type {KYCDocumentType} + * @memberof KYCDocumentResponse + */ + type: KYCDocumentType; + /** + * + * @type {KYCDocumentSubType} + * @memberof KYCDocumentResponse + */ + subType: KYCDocumentSubType; + /** + * + * @type {string} + * @memberof KYCDocumentResponse + */ + documentName: string | null; + /** + * + * @type {string} + * @memberof KYCDocumentResponse + */ + documentNumber: string | null; + /** + * + * @type {string} + * @memberof KYCDocumentResponse + */ + expiresAt: string | null; + /** + * + * @type {string} + * @memberof KYCDocumentResponse + */ + holderName: string | null; + /** + * + * @type {Array} + * @memberof KYCDocumentResponse + */ + documentImages: Array | null; +} + +/** + * Check if a given object implements the KYCDocumentResponse interface. + */ +export function instanceOfKYCDocumentResponse(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "country" in value; + isInstance = isInstance && "type" in value; + isInstance = isInstance && "subType" in value; + isInstance = isInstance && "documentName" in value; + isInstance = isInstance && "documentNumber" in value; + isInstance = isInstance && "expiresAt" in value; + isInstance = isInstance && "holderName" in value; + isInstance = isInstance && "documentImages" in value; + + return isInstance; +} + +export function KYCDocumentResponseFromJSON(json: any): KYCDocumentResponse { + return KYCDocumentResponseFromJSONTyped(json, false); +} + +export function KYCDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): KYCDocumentResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'country': json['country'], + 'type': KYCDocumentTypeFromJSON(json['type']), + 'subType': KYCDocumentSubTypeFromJSON(json['sub_type']), + 'documentName': json['document_name'], + 'documentNumber': json['document_number'], + 'expiresAt': json['expires_at'], + 'holderName': json['holder_name'], + 'documentImages': json['document_images'], + }; +} + +export function KYCDocumentResponseToJSON(value?: KYCDocumentResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'country': value.country, + 'type': KYCDocumentTypeToJSON(value.type), + 'sub_type': KYCDocumentSubTypeToJSON(value.subType), + 'document_name': value.documentName, + 'document_number': value.documentNumber, + 'expires_at': value.expiresAt, + 'holder_name': value.holderName, + 'document_images': value.documentImages, + }; +} + diff --git a/customer/models/KYCDocumentSubType.ts b/customer/models/KYCDocumentSubType.ts new file mode 100644 index 0000000..2250155 --- /dev/null +++ b/customer/models/KYCDocumentSubType.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + + +/** + * + * @export + */ +export const KYCDocumentSubType = { + NationalId: 'NATIONAL_ID', + ConsularId: 'CONSULAR_ID', + VoterId: 'VOTER_ID', + PostalId: 'POSTAL_ID', + ResidencePermit: 'RESIDENCE_PERMIT', + TaxId: 'TAX_ID', + StudentId: 'STUDENT_ID', + MilitaryId: 'MILITARY_ID', + MedicalId: 'MEDICAL_ID', + Others: 'OTHERS' +} as const; +export type KYCDocumentSubType = typeof KYCDocumentSubType[keyof typeof KYCDocumentSubType]; + + +export function KYCDocumentSubTypeFromJSON(json: any): KYCDocumentSubType { + return KYCDocumentSubTypeFromJSONTyped(json, false); +} + +export function KYCDocumentSubTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): KYCDocumentSubType { + return json as KYCDocumentSubType; +} + +export function KYCDocumentSubTypeToJSON(value?: KYCDocumentSubType | null): any { + return value as any; +} + diff --git a/customer/models/KYCDocumentType.ts b/customer/models/KYCDocumentType.ts new file mode 100644 index 0000000..1fcc3e0 --- /dev/null +++ b/customer/models/KYCDocumentType.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + + +/** + * + * @export + */ +export const KYCDocumentType = { + BirthCertificate: 'BIRTH_CERTIFICATE', + BankStatement: 'BANK_STATEMENT', + DrivingLicense: 'DRIVING_LICENSE', + IdentityCard: 'IDENTITY_CARD', + Passport: 'PASSPORT', + Visa: 'VISA', + BusinessRegistration: 'BUSINESS_REGISTRATION', + BusinessLicense: 'BUSINESS_LICENSE' +} as const; +export type KYCDocumentType = typeof KYCDocumentType[keyof typeof KYCDocumentType]; + + +export function KYCDocumentTypeFromJSON(json: any): KYCDocumentType { + return KYCDocumentTypeFromJSONTyped(json, false); +} + +export function KYCDocumentTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): KYCDocumentType { + return json as KYCDocumentType; +} + +export function KYCDocumentTypeToJSON(value?: KYCDocumentType | null): any { + return value as any; +} + diff --git a/customer/models/ModelError.ts b/customer/models/ModelError.ts new file mode 100644 index 0000000..0f78364 --- /dev/null +++ b/customer/models/ModelError.ts @@ -0,0 +1,77 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface ModelError + */ +export interface ModelError { + /** + * + * @type {string} + * @memberof ModelError + */ + errorCode: string; + /** + * + * @type {string} + * @memberof ModelError + */ + message: string; + /** + * + * @type {Array} + * @memberof ModelError + */ + errors?: Array; +} + +/** + * Check if a given object implements the ModelError interface. + */ +export function instanceOfModelError(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "errorCode" in value; + isInstance = isInstance && "message" in value; + + return isInstance; +} + +export function ModelErrorFromJSON(json: any): ModelError { + return ModelErrorFromJSONTyped(json, false); +} + +export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': json['error_code'], + 'message': json['message'], + 'errors': !exists(json, 'errors') ? undefined : json['errors'], + }; +} + +export function ModelErrorToJSON(value?: ModelError | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + 'errors': value.errors, + }; +} + diff --git a/customer/models/PatchCustomer.ts b/customer/models/PatchCustomer.ts new file mode 100644 index 0000000..2045822 --- /dev/null +++ b/customer/models/PatchCustomer.ts @@ -0,0 +1,192 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +import type { AddressRequest } from './AddressRequest'; +import { + AddressRequestFromJSON, + AddressRequestFromJSONTyped, + AddressRequestToJSON, +} from './AddressRequest'; +import type { BusinessDetail } from './BusinessDetail'; +import { + BusinessDetailFromJSON, + BusinessDetailFromJSONTyped, + BusinessDetailToJSON, +} from './BusinessDetail'; +import type { EndCustomerStatus } from './EndCustomerStatus'; +import { + EndCustomerStatusFromJSON, + EndCustomerStatusFromJSONTyped, + EndCustomerStatusToJSON, +} from './EndCustomerStatus'; +import type { IdentityAccountRequest } from './IdentityAccountRequest'; +import { + IdentityAccountRequestFromJSON, + IdentityAccountRequestFromJSONTyped, + IdentityAccountRequestToJSON, +} from './IdentityAccountRequest'; +import type { IndividualDetail } from './IndividualDetail'; +import { + IndividualDetailFromJSON, + IndividualDetailFromJSONTyped, + IndividualDetailToJSON, +} from './IndividualDetail'; +import type { KYCDocumentRequest } from './KYCDocumentRequest'; +import { + KYCDocumentRequestFromJSON, + KYCDocumentRequestFromJSONTyped, + KYCDocumentRequestToJSON, +} from './KYCDocumentRequest'; + +/** + * + * @export + * @interface PatchCustomer + */ +export interface PatchCustomer { + /** + * Entity's name for this client + * @type {string} + * @memberof PatchCustomer + */ + clientName?: string | null; + /** + * Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. + * @type {string} + * @memberof PatchCustomer + */ + referenceId?: string | null; + /** + * + * @type {IndividualDetail} + * @memberof PatchCustomer + */ + individualDetail?: IndividualDetail | null; + /** + * + * @type {BusinessDetail} + * @memberof PatchCustomer + */ + businessDetail?: BusinessDetail | null; + /** + * + * @type {string} + * @memberof PatchCustomer + */ + description?: string | null; + /** + * + * @type {string} + * @memberof PatchCustomer + */ + email?: string | null; + /** + * + * @type {string} + * @memberof PatchCustomer + */ + mobileNumber?: string | null; + /** + * + * @type {string} + * @memberof PatchCustomer + */ + phoneNumber?: string | null; + /** + * + * @type {object} + * @memberof PatchCustomer + */ + metadata?: object | null; + /** + * + * @type {Array} + * @memberof PatchCustomer + */ + addresses?: Array | null; + /** + * + * @type {Array} + * @memberof PatchCustomer + */ + identityAccounts?: Array | null; + /** + * + * @type {Array} + * @memberof PatchCustomer + */ + kycDocuments?: Array | null; + /** + * + * @type {EndCustomerStatus} + * @memberof PatchCustomer + */ + status?: EndCustomerStatus | null; +} + +/** + * Check if a given object implements the PatchCustomer interface. + */ +export function instanceOfPatchCustomer(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PatchCustomerFromJSON(json: any): PatchCustomer { + return PatchCustomerFromJSONTyped(json, false); +} + +export function PatchCustomerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchCustomer { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'clientName': !exists(json, 'client_name') ? undefined : json['client_name'], + 'referenceId': !exists(json, 'reference_id') ? undefined : json['reference_id'], + 'individualDetail': !exists(json, 'individual_detail') ? undefined : IndividualDetailFromJSON(json['individual_detail']), + 'businessDetail': !exists(json, 'business_detail') ? undefined : BusinessDetailFromJSON(json['business_detail']), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'email': !exists(json, 'email') ? undefined : json['email'], + 'mobileNumber': !exists(json, 'mobile_number') ? undefined : json['mobile_number'], + 'phoneNumber': !exists(json, 'phone_number') ? undefined : json['phone_number'], + 'metadata': !exists(json, 'metadata') ? undefined : json['metadata'], + 'addresses': !exists(json, 'addresses') ? undefined : (json['addresses'] === null ? null : (json['addresses'] as Array).map(AddressRequestFromJSON)), + 'identityAccounts': !exists(json, 'identity_accounts') ? undefined : (json['identity_accounts'] === null ? null : (json['identity_accounts'] as Array).map(IdentityAccountRequestFromJSON)), + 'kycDocuments': !exists(json, 'kyc_documents') ? undefined : (json['kyc_documents'] === null ? null : (json['kyc_documents'] as Array).map(KYCDocumentRequestFromJSON)), + 'status': !exists(json, 'status') ? undefined : EndCustomerStatusFromJSON(json['status']), + }; +} + +export function PatchCustomerToJSON(value?: PatchCustomer | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'client_name': value.clientName, + 'reference_id': value.referenceId, + 'individual_detail': IndividualDetailToJSON(value.individualDetail), + 'business_detail': BusinessDetailToJSON(value.businessDetail), + 'description': value.description, + 'email': value.email, + 'mobile_number': value.mobileNumber, + 'phone_number': value.phoneNumber, + 'metadata': value.metadata, + 'addresses': value.addresses === undefined ? undefined : (value.addresses === null ? null : (value.addresses as Array).map(AddressRequestToJSON)), + 'identity_accounts': value.identityAccounts === undefined ? undefined : (value.identityAccounts === null ? null : (value.identityAccounts as Array).map(IdentityAccountRequestToJSON)), + 'kyc_documents': value.kycDocuments === undefined ? undefined : (value.kycDocuments === null ? null : (value.kycDocuments as Array).map(KYCDocumentRequestToJSON)), + 'status': EndCustomerStatusToJSON(value.status), + }; +} + diff --git a/customer/models/ResponseDataNotFound.ts b/customer/models/ResponseDataNotFound.ts new file mode 100644 index 0000000..1e27960 --- /dev/null +++ b/customer/models/ResponseDataNotFound.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface ResponseDataNotFound + */ +export interface ResponseDataNotFound { + /** + * + * @type {string} + * @memberof ResponseDataNotFound + */ + errorCode?: ResponseDataNotFoundErrorCodeEnum; + /** + * + * @type {any} + * @memberof ResponseDataNotFound + */ + message?: any | null; +} + + +/** + * @export + */ +export const ResponseDataNotFoundErrorCodeEnum = { + DataNotFound: 'DATA_NOT_FOUND', + EntityNotFoundError: 'ENTITY_NOT_FOUND_ERROR', + ClientNotFoundError: 'CLIENT_NOT_FOUND_ERROR' +} as const; +export type ResponseDataNotFoundErrorCodeEnum = typeof ResponseDataNotFoundErrorCodeEnum[keyof typeof ResponseDataNotFoundErrorCodeEnum]; + + +/** + * Check if a given object implements the ResponseDataNotFound interface. + */ +export function instanceOfResponseDataNotFound(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ResponseDataNotFoundFromJSON(json: any): ResponseDataNotFound { + return ResponseDataNotFoundFromJSONTyped(json, false); +} + +export function ResponseDataNotFoundFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResponseDataNotFound { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': !exists(json, 'error_code') ? undefined : json['error_code'], + 'message': !exists(json, 'message') ? undefined : json['message'], + }; +} + +export function ResponseDataNotFoundToJSON(value?: ResponseDataNotFound | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + }; +} + diff --git a/customer/models/UpdateCustomer400Response.ts b/customer/models/UpdateCustomer400Response.ts new file mode 100644 index 0000000..a108727 --- /dev/null +++ b/customer/models/UpdateCustomer400Response.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface UpdateCustomer400Response + */ +export interface UpdateCustomer400Response { + /** + * + * @type {string} + * @memberof UpdateCustomer400Response + */ + errorCode: UpdateCustomer400ResponseErrorCodeEnum; + /** + * + * @type {any} + * @memberof UpdateCustomer400Response + */ + message: any | null; + /** + * + * @type {Array} + * @memberof UpdateCustomer400Response + */ + errors?: Array; +} + + +/** + * @export + */ +export const UpdateCustomer400ResponseErrorCodeEnum = { + EntityNotFoundError: 'ENTITY_NOT_FOUND_ERROR', + ClientNotFoundError: 'CLIENT_NOT_FOUND_ERROR', + EndCustomerNotFoundError: 'END_CUSTOMER_NOT_FOUND_ERROR', + DuplicateEndCustomerError: 'DUPLICATE_END_CUSTOMER_ERROR', + ApiValidationError: 'API_VALIDATION_ERROR' +} as const; +export type UpdateCustomer400ResponseErrorCodeEnum = typeof UpdateCustomer400ResponseErrorCodeEnum[keyof typeof UpdateCustomer400ResponseErrorCodeEnum]; + + +/** + * Check if a given object implements the UpdateCustomer400Response interface. + */ +export function instanceOfUpdateCustomer400Response(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "errorCode" in value; + isInstance = isInstance && "message" in value; + + return isInstance; +} + +export function UpdateCustomer400ResponseFromJSON(json: any): UpdateCustomer400Response { + return UpdateCustomer400ResponseFromJSONTyped(json, false); +} + +export function UpdateCustomer400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCustomer400Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': json['error_code'], + 'message': json['message'], + 'errors': !exists(json, 'errors') ? undefined : json['errors'], + }; +} + +export function UpdateCustomer400ResponseToJSON(value?: UpdateCustomer400Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + 'errors': value.errors, + }; +} + diff --git a/customer/models/UpdateCustomer400ResponseAllOf.ts b/customer/models/UpdateCustomer400ResponseAllOf.ts new file mode 100644 index 0000000..df99c7a --- /dev/null +++ b/customer/models/UpdateCustomer400ResponseAllOf.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * NOTE: This file is auto generated by Xendit. + * Do not edit the class manually. + * Improvements? Share your ideas at https://github.com/xendit/xendit-node + */ + +import { exists, mapValues } from '../../runtime'; +/** + * + * @export + * @interface UpdateCustomer400ResponseAllOf + */ +export interface UpdateCustomer400ResponseAllOf { + /** + * + * @type {string} + * @memberof UpdateCustomer400ResponseAllOf + */ + errorCode?: UpdateCustomer400ResponseAllOfErrorCodeEnum; + /** + * + * @type {any} + * @memberof UpdateCustomer400ResponseAllOf + */ + message?: any | null; +} + + +/** + * @export + */ +export const UpdateCustomer400ResponseAllOfErrorCodeEnum = { + EntityNotFoundError: 'ENTITY_NOT_FOUND_ERROR', + ClientNotFoundError: 'CLIENT_NOT_FOUND_ERROR', + EndCustomerNotFoundError: 'END_CUSTOMER_NOT_FOUND_ERROR', + DuplicateEndCustomerError: 'DUPLICATE_END_CUSTOMER_ERROR', + ApiValidationError: 'API_VALIDATION_ERROR' +} as const; +export type UpdateCustomer400ResponseAllOfErrorCodeEnum = typeof UpdateCustomer400ResponseAllOfErrorCodeEnum[keyof typeof UpdateCustomer400ResponseAllOfErrorCodeEnum]; + + +/** + * Check if a given object implements the UpdateCustomer400ResponseAllOf interface. + */ +export function instanceOfUpdateCustomer400ResponseAllOf(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function UpdateCustomer400ResponseAllOfFromJSON(json: any): UpdateCustomer400ResponseAllOf { + return UpdateCustomer400ResponseAllOfFromJSONTyped(json, false); +} + +export function UpdateCustomer400ResponseAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateCustomer400ResponseAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'errorCode': !exists(json, 'error_code') ? undefined : json['error_code'], + 'message': !exists(json, 'message') ? undefined : json['message'], + }; +} + +export function UpdateCustomer400ResponseAllOfToJSON(value?: UpdateCustomer400ResponseAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'error_code': value.errorCode, + 'message': value.message, + }; +} + diff --git a/customer/models/index.ts b/customer/models/index.ts new file mode 100644 index 0000000..dcaa2d3 --- /dev/null +++ b/customer/models/index.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AccountBank'; +export * from './AccountCard'; +export * from './AccountEwallet'; +export * from './AccountOTC'; +export * from './AccountPayLater'; +export * from './AccountQRCode'; +export * from './Address'; +export * from './AddressRequest'; +export * from './AddressStatus'; +export * from './BusinessDetail'; +export * from './CreateCustomer400Response'; +export * from './CreateCustomer400ResponseAllOf'; +export * from './Customer'; +export * from './CustomerRequest'; +export * from './EmploymentDetail'; +export * from './EndCustomerStatus'; +export * from './GetCustomerByReferenceID200Response'; +export * from './GetCustomerByReferenceID400Response'; +export * from './GetCustomerByReferenceID400ResponseAllOf'; +export * from './IdentityAccountRequest'; +export * from './IdentityAccountRequestProperties'; +export * from './IdentityAccountResponse'; +export * from './IdentityAccountResponseProperties'; +export * from './IdentityAccountType'; +export * from './IndividualDetail'; +export * from './KYCDocumentRequest'; +export * from './KYCDocumentResponse'; +export * from './KYCDocumentSubType'; +export * from './KYCDocumentType'; +export * from './ModelError'; +export * from './PatchCustomer'; +export * from './ResponseDataNotFound'; +export * from './UpdateCustomer400Response'; +export * from './UpdateCustomer400ResponseAllOf'; diff --git a/docs/Customer.md b/docs/Customer.md new file mode 100644 index 0000000..768b0e8 --- /dev/null +++ b/docs/Customer.md @@ -0,0 +1,121 @@ +## Customer +You can use the APIs below to interface with Xendit's `Customer` API. +To start using the API, you need to destruct instantiated Xendit client or directly import the module and set the secret key. + +```typescript +import { Xendit, Customer as CustomerClient } from 'xendit-node'; + +const xenditClient = new Xendit({secretKey: YOUR_SECRET_KEY}) +const { Customer } = xenditClient + +const xenditCustomerClient = new CustomerClient({secretKey: YOUR_SECRET_KEY}) + +// At this point, `Customer` and `xenditCustomerClient` will have no usage difference, for example: +// Customer. +// or +// xenditCustomerClient. +``` +## Create Customer + + +### Function Signature +| Name | Value | +|--------------------|:-------------:| +| Function Name | `createCustomer` | +| Request Parameters | [CreateCustomerRequest](#request-parameters--CreateCustomerRequest) | +| Return Type | [Customer](customer/models/Customer.md) | + +### Request Parameters — `CreateCustomerRequest` +| Field Name | Required | Type | +|-----------|:----------:|:----------:| +| iDEMPOTENCYKEY| | string | +| forUserId| | string | +| idempotencyKey| | string | +| data| | [CustomerRequest](customer/models/CustomerRequest.md) | + +### Usage Examples +#### Minimum API Usage +```typescript +import { Customer } from 'xendit-node/customer/models' + +const response: Customer = await xenditCustomerClient.createCustomer({ }) +``` +## Get Customer By ID + + +### Function Signature +| Name | Value | +|--------------------|:-------------:| +| Function Name | `getCustomer` | +| Request Parameters | [GetCustomerRequest](#request-parameters--GetCustomerRequest) | +| Return Type | [Customer](customer/models/Customer.md) | + +### Request Parameters — `GetCustomerRequest` +| Field Name | Required | Type | +|-----------|:----------:|:----------:| +| id| ✅ | string | +| forUserId| | string | +| idempotencyKey| | string | + +### Usage Examples +#### Minimum API Usage +```typescript +import { Customer } from 'xendit-node/customer/models' + +const response: Customer = await xenditCustomerClient.getCustomer({ + id: "d290f1ee-6c54-4b01-90e6-d701748f0851", +}) +``` +## GET customers by reference id + + +### Function Signature +| Name | Value | +|--------------------|:-------------:| +| Function Name | `getCustomerByReferenceID` | +| Request Parameters | [GetCustomerByReferenceIDRequest](#request-parameters--GetCustomerByReferenceIDRequest) | +| Return Type | [GetCustomerByReferenceID200Response](customer/models/GetCustomerByReferenceID200Response.md) | + +### Request Parameters — `GetCustomerByReferenceIDRequest` +| Field Name | Required | Type | +|-----------|:----------:|:----------:| +| referenceId| ✅ | string | +| forUserId| | string | +| idempotencyKey| | string | + +### Usage Examples +#### Minimum API Usage +```typescript +import { GetCustomerByReferenceID200Response } from 'xendit-node/customer/models' + +const response: GetCustomerByReferenceID200Response = await xenditCustomerClient.getCustomerByReferenceID({ + referenceId: "referenceId_example", +}) +``` +## Update End Customer Resource + + +### Function Signature +| Name | Value | +|--------------------|:-------------:| +| Function Name | `updateCustomer` | +| Request Parameters | [UpdateCustomerRequest](#request-parameters--UpdateCustomerRequest) | +| Return Type | [Customer](customer/models/Customer.md) | + +### Request Parameters — `UpdateCustomerRequest` +| Field Name | Required | Type | +|-----------|:----------:|:----------:| +| id| ✅ | string | +| forUserId| | string | +| idempotencyKey| | string | +| data| | [PatchCustomer](customer/models/PatchCustomer.md) | + +### Usage Examples +#### Minimum API Usage +```typescript +import { Customer } from 'xendit-node/customer/models' + +const response: Customer = await xenditCustomerClient.updateCustomer({ + id: "d290f1ee-6c54-4b01-90e6-d701748f0851", +}) +``` diff --git a/docs/PaymentMethod.md b/docs/PaymentMethod.md index 3f62591..18ca016 100644 --- a/docs/PaymentMethod.md +++ b/docs/PaymentMethod.md @@ -147,30 +147,6 @@ const response: PaymentMethod = await xenditPaymentMethodClient.expirePaymentMet paymentMethodId: "pm-1fdaf346-dd2e-4b6c-b938-124c7167a822", }) ``` -## Get all payment channels - - -### Function Signature -| Name | Value | -|--------------------|:-------------:| -| Function Name | `getAllPaymentChannels` | -| Request Parameters | [GetAllPaymentChannelsRequest](#request-parameters--GetAllPaymentChannelsRequest) | -| Return Type | [PaymentChannelList](payment_method/models/PaymentChannelList.md) | - -### Request Parameters — `GetAllPaymentChannelsRequest` -| Field Name | Required | Type | -|-----------|:----------:|:----------:| -| isActivated| | boolean | -| type| | string | -| idempotencyKey| | string | - -### Usage Examples -#### Minimum API Usage -```typescript -import { PaymentChannelList } from 'xendit-node/payment_method/models' - -const response: PaymentChannelList = await xenditPaymentMethodClient.getAllPaymentChannels({ }) -``` ## Get all payment methods by filters diff --git a/docs/customer/models/AccountBank.md b/docs/customer/models/AccountBank.md new file mode 100644 index 0000000..4c179db --- /dev/null +++ b/docs/customer/models/AccountBank.md @@ -0,0 +1,16 @@ +# AccountBank + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **accountNumber** | string | | Unique account identifier as per the bank records. | +**accountHolderName** | string | | Name of account holder as per the bank records. Needs to match the registered account name exactly. . | +**swiftCode** | string | | The SWIFT code for international payments | +**accountType** | string | | Free text account type, e.g., Savings, Transaction, Virtual Account. | +**accountDetails** | string | | Potentially masked account detail, for display purposes only. | +**currency** | string | | | + + diff --git a/docs/customer/models/AccountCard.md b/docs/customer/models/AccountCard.md new file mode 100644 index 0000000..df571fc --- /dev/null +++ b/docs/customer/models/AccountCard.md @@ -0,0 +1,11 @@ +# AccountCard + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **tokenId** | string | | The token id returned in tokenisation | + + diff --git a/docs/customer/models/AccountEwallet.md b/docs/customer/models/AccountEwallet.md new file mode 100644 index 0000000..c44e57a --- /dev/null +++ b/docs/customer/models/AccountEwallet.md @@ -0,0 +1,13 @@ +# AccountEwallet + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **accountNumber** | string | | Unique account identifier as per the bank records. | +**accountHolderName** | string | | Name of account holder as per the bank records. Needs to match the registered account name exactly. | +**currency** | string | | | + + diff --git a/docs/customer/models/AccountOtc.md b/docs/customer/models/AccountOtc.md new file mode 100644 index 0000000..ecd606f --- /dev/null +++ b/docs/customer/models/AccountOtc.md @@ -0,0 +1,12 @@ +# AccountOTC + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **paymentCode** | string | | Complete fixed payment code (including prefix) | +**expiresAt** | string | | YYYY-MM-DD string with expiry date for the payment code | + + diff --git a/docs/customer/models/AccountPayLater.md b/docs/customer/models/AccountPayLater.md new file mode 100644 index 0000000..81db480 --- /dev/null +++ b/docs/customer/models/AccountPayLater.md @@ -0,0 +1,13 @@ +# AccountPayLater + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **accountId** | string | | Alphanumeric string identifying this account. Usually an email address or phone number. | +**accountHolderName** | string | | Name of account holder as per the cardless credit account. | +**currency** | string | | | + + diff --git a/docs/customer/models/AccountQrCode.md b/docs/customer/models/AccountQrCode.md new file mode 100644 index 0000000..bc8adab --- /dev/null +++ b/docs/customer/models/AccountQrCode.md @@ -0,0 +1,11 @@ +# AccountQRCode + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **qrString** | string | | String representation of the QR Code image | + + diff --git a/docs/customer/models/Address.md b/docs/customer/models/Address.md new file mode 100644 index 0000000..5d7732c --- /dev/null +++ b/docs/customer/models/Address.md @@ -0,0 +1,23 @@ +# Address + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **id** | string | | | +**category** | string | ✅ | | +**country** | string | ✅ | | +**provinceState** | string | ✅ | | +**city** | string | ✅ | | +**postalCode** | string | ✅ | | +**streetLine1** | string | ✅ | | +**streetLine2** | string | ✅ | | +**status** | [AddressStatus](AddressStatus.md) | | | +**isPrimary** | boolean | ✅ | | +**meta** | object | | | +**created** | Date | | | +**updated** | Date | | | + + diff --git a/docs/customer/models/AddressRequest.md b/docs/customer/models/AddressRequest.md new file mode 100644 index 0000000..eafc875 --- /dev/null +++ b/docs/customer/models/AddressRequest.md @@ -0,0 +1,20 @@ +# AddressRequest + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **category** | string | | Home, work or provincial | +**countryCode** | string | | ISO3166-2 country code | +**provinceState** | string | | | +**city** | string | | | +**suburb** | string | | | +**postalCode** | string | | | +**line1** | string | | | +**line2** | string | | | +**status** | [AddressStatus](AddressStatus.md) | | | +**isPrimary** | boolean | | | + + diff --git a/docs/customer/models/AddressStatus.md b/docs/customer/models/AddressStatus.md new file mode 100644 index 0000000..2c455e6 --- /dev/null +++ b/docs/customer/models/AddressStatus.md @@ -0,0 +1,13 @@ +# AddressStatus + + + + +## Enum + + + * `Active` (value: `'ACTIVE'`) + + * `Deleted` (value: `'DELETED'`) + + diff --git a/docs/customer/models/BusinessDetail.md b/docs/customer/models/BusinessDetail.md new file mode 100644 index 0000000..9718ff4 --- /dev/null +++ b/docs/customer/models/BusinessDetail.md @@ -0,0 +1,15 @@ +# BusinessDetail + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **businessName** | string | | | +**businessType** | string | | | +**dateOfRegistration** | string | | | +**natureOfBusiness** | string | | | +**businessDomicile** | string | | ISO3166-2 country code | + + diff --git a/docs/customer/models/CreateCustomer400Response.md b/docs/customer/models/CreateCustomer400Response.md new file mode 100644 index 0000000..a8d56f5 --- /dev/null +++ b/docs/customer/models/CreateCustomer400Response.md @@ -0,0 +1,13 @@ +# CreateCustomer400Response + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | ✅ | | +**message** | any | ✅ | | +**errors** | []object | | | + + diff --git a/docs/customer/models/CreateCustomer400ResponseAllOf.md b/docs/customer/models/CreateCustomer400ResponseAllOf.md new file mode 100644 index 0000000..b3fa923 --- /dev/null +++ b/docs/customer/models/CreateCustomer400ResponseAllOf.md @@ -0,0 +1,12 @@ +# CreateCustomer400ResponseAllOf + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | | | +**message** | any | | | + + diff --git a/docs/customer/models/Customer.md b/docs/customer/models/Customer.md new file mode 100644 index 0000000..d586e09 --- /dev/null +++ b/docs/customer/models/Customer.md @@ -0,0 +1,26 @@ +# Customer + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **type** | string | ✅ | | +**referenceId** | string | ✅ | Merchant\'s reference of this end customer, eg Merchant\'s user\'s id. Must be unique. | +**individualDetail** | [IndividualDetail](IndividualDetail.md) | ✅ | | +**businessDetail** | [BusinessDetail](BusinessDetail.md) | ✅ | | +**description** | string | ✅ | | +**email** | string | ✅ | | +**mobileNumber** | string | ✅ | | +**phoneNumber** | string | ✅ | | +**addresses** | [[]Address](Address.md) | ✅ | | +**identityAccounts** | [[]IdentityAccountResponse](IdentityAccountResponse.md) | ✅ | | +**kycDocuments** | [[]KYCDocumentResponse](KYCDocumentResponse.md) | ✅ | | +**metadata** | object | ✅ | | +**status** | [EndCustomerStatus](EndCustomerStatus.md) | | | +**id** | string | ✅ | | +**created** | Date | ✅ | | +**updated** | Date | ✅ | | + + diff --git a/docs/customer/models/CustomerRequest.md b/docs/customer/models/CustomerRequest.md new file mode 100644 index 0000000..244266d --- /dev/null +++ b/docs/customer/models/CustomerRequest.md @@ -0,0 +1,23 @@ +# CustomerRequest + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **clientName** | string | | Entity\'s name for this client | +**referenceId** | string | ✅ | Merchant\'s reference of this end customer, eg Merchant\'s user\'s id. Must be unique. | +**type** | string | | | +**individualDetail** | [IndividualDetail](IndividualDetail.md) | | | +**businessDetail** | [BusinessDetail](BusinessDetail.md) | | | +**description** | string | | | +**email** | string | | | +**mobileNumber** | string | | | +**phoneNumber** | string | | | +**addresses** | [[]AddressRequest](AddressRequest.md) | | | +**identityAccounts** | [[]IdentityAccountRequest](IdentityAccountRequest.md) | | | +**kycDocuments** | [[]KYCDocumentRequest](KYCDocumentRequest.md) | | | +**metadata** | object | | | + + diff --git a/docs/customer/models/EmploymentDetail.md b/docs/customer/models/EmploymentDetail.md new file mode 100644 index 0000000..5caae31 --- /dev/null +++ b/docs/customer/models/EmploymentDetail.md @@ -0,0 +1,13 @@ +# EmploymentDetail + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **employerName** | string | | Name of employer | +**natureOfBusiness** | string | | Industry or nature of business | +**roleDescription** | string | | Occupation or title | + + diff --git a/docs/customer/models/EndCustomerStatus.md b/docs/customer/models/EndCustomerStatus.md new file mode 100644 index 0000000..cc7c0ca --- /dev/null +++ b/docs/customer/models/EndCustomerStatus.md @@ -0,0 +1,19 @@ +# EndCustomerStatus + + + + +## Enum + + + * `Active` (value: `'ACTIVE'`) + + * `Inactive` (value: `'INACTIVE'`) + + * `Pending` (value: `'PENDING'`) + + * `Blocked` (value: `'BLOCKED'`) + + * `Deleted` (value: `'DELETED'`) + + diff --git a/docs/customer/models/Error.md b/docs/customer/models/Error.md new file mode 100644 index 0000000..58a1a10 --- /dev/null +++ b/docs/customer/models/Error.md @@ -0,0 +1,13 @@ +# ModelError + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | ✅ | | +**message** | string | ✅ | | +**errors** | []object | | | + + diff --git a/docs/customer/models/GetCustomerByReferenceId200Response.md b/docs/customer/models/GetCustomerByReferenceId200Response.md new file mode 100644 index 0000000..fb8b207 --- /dev/null +++ b/docs/customer/models/GetCustomerByReferenceId200Response.md @@ -0,0 +1,12 @@ +# GetCustomerByReferenceID200Response + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **hasMore** | boolean | | | +**data** | [[]Customer](Customer.md) | | | + + diff --git a/docs/customer/models/GetCustomerByReferenceId400Response.md b/docs/customer/models/GetCustomerByReferenceId400Response.md new file mode 100644 index 0000000..2ee98f1 --- /dev/null +++ b/docs/customer/models/GetCustomerByReferenceId400Response.md @@ -0,0 +1,13 @@ +# GetCustomerByReferenceID400Response + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | ✅ | | +**message** | any | ✅ | | +**errors** | []object | | | + + diff --git a/docs/customer/models/GetCustomerByReferenceId400ResponseAllOf.md b/docs/customer/models/GetCustomerByReferenceId400ResponseAllOf.md new file mode 100644 index 0000000..55f08c1 --- /dev/null +++ b/docs/customer/models/GetCustomerByReferenceId400ResponseAllOf.md @@ -0,0 +1,12 @@ +# GetCustomerByReferenceID400ResponseAllOf + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | | | +**message** | any | | | + + diff --git a/docs/customer/models/IdentityAccountRequest.md b/docs/customer/models/IdentityAccountRequest.md new file mode 100644 index 0000000..78191b3 --- /dev/null +++ b/docs/customer/models/IdentityAccountRequest.md @@ -0,0 +1,15 @@ +# IdentityAccountRequest + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **type** | [IdentityAccountType](IdentityAccountType.md) | | | +**company** | string | | The issuing institution associated with the account (e.g., OCBC, GOPAY, 7-11). If adding financial accounts that Xendit supports, we recommend you use the channel_name found at https://xendit.github.io/apireference/#payment-channels for this field | +**description** | string | | Free text description of this account | +**country** | string | | ISO3166-2 country code | +**properties** | [IdentityAccountRequestProperties](IdentityAccountRequestProperties.md) | | | + + diff --git a/docs/customer/models/IdentityAccountRequestProperties.md b/docs/customer/models/IdentityAccountRequestProperties.md new file mode 100644 index 0000000..9cf165e --- /dev/null +++ b/docs/customer/models/IdentityAccountRequestProperties.md @@ -0,0 +1,21 @@ +# IdentityAccountRequestProperties + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **accountNumber** | string | | Unique account identifier as per the bank records. | +**accountHolderName** | string | | Name of account holder as per the cardless credit account. | +**swiftCode** | string | | The SWIFT code for international payments | +**accountType** | string | | Free text account type, e.g., Savings, Transaction, Virtual Account. | +**accountDetails** | string | | Potentially masked account detail, for display purposes only. | +**currency** | string | | | +**tokenId** | string | | The token id returned in tokenisation | +**accountId** | string | | Alphanumeric string identifying this account. Usually an email address or phone number. | +**paymentCode** | string | | Complete fixed payment code (including prefix) | +**expiresAt** | string | | YYYY-MM-DD string with expiry date for the payment code | +**qrString** | string | | String representation of the QR Code image | + + diff --git a/docs/customer/models/IdentityAccountResponse.md b/docs/customer/models/IdentityAccountResponse.md new file mode 100644 index 0000000..2003e13 --- /dev/null +++ b/docs/customer/models/IdentityAccountResponse.md @@ -0,0 +1,19 @@ +# IdentityAccountResponse + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **id** | string | | | +**code** | string | | | +**company** | string | ✅ | | +**description** | string | ✅ | | +**country** | string | ✅ | ISO3166-2 country code | +**holderName** | string | | | +**type** | string | ✅ | | +**properties** | [IdentityAccountResponseProperties](IdentityAccountResponseProperties.md) | ✅ | | +**created** | Date | | | + + diff --git a/docs/customer/models/IdentityAccountResponseProperties.md b/docs/customer/models/IdentityAccountResponseProperties.md new file mode 100644 index 0000000..85f1889 --- /dev/null +++ b/docs/customer/models/IdentityAccountResponseProperties.md @@ -0,0 +1,21 @@ +# IdentityAccountResponseProperties + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **accountNumber** | string | | Unique account identifier as per the bank records. | +**accountHolderName** | string | | Name of account holder as per the cardless credit account. | +**swiftCode** | string | | The SWIFT code for international payments | +**accountType** | string | | Free text account type, e.g., Savings, Transaction, Virtual Account. | +**accountDetails** | string | | Potentially masked account detail, for display purposes only. | +**currency** | string | | | +**tokenId** | string | | The token id returned in tokenisation | +**paymentCode** | string | | Complete fixed payment code (including prefix) | +**expiresAt** | string | | YYYY-MM-DD string with expiry date for the payment code | +**qrString** | string | | String representation of the QR Code image | +**accountId** | string | | Alphanumeric string identifying this account. Usually an email address or phone number. | + + diff --git a/docs/customer/models/IdentityAccountType.md b/docs/customer/models/IdentityAccountType.md new file mode 100644 index 0000000..6a24388 --- /dev/null +++ b/docs/customer/models/IdentityAccountType.md @@ -0,0 +1,21 @@ +# IdentityAccountType + + + + +## Enum + + + * `BankAccount` (value: `'BANK_ACCOUNT'`) + + * `Ewallet` (value: `'EWALLET'`) + + * `CreditCard` (value: `'CREDIT_CARD'`) + + * `PayLater` (value: `'PAY_LATER'`) + + * `Otc` (value: `'OTC'`) + + * `QrCode` (value: `'QR_CODE'`) + + diff --git a/docs/customer/models/IndividualDetail.md b/docs/customer/models/IndividualDetail.md new file mode 100644 index 0000000..ee28442 --- /dev/null +++ b/docs/customer/models/IndividualDetail.md @@ -0,0 +1,21 @@ +# IndividualDetail + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **givenNames** | string | | | +**givenNamesNonRoman** | string | | | +**middleName** | string | | | +**surname** | string | | | +**surnameNonRoman** | string | | | +**motherMaidenName** | string | | | +**gender** | string | | | +**dateOfBirth** | string | | | +**nationality** | string | | ISO3166-2 country code | +**placeOfBirth** | string | | | +**employment** | [EmploymentDetail](EmploymentDetail.md) | | | + + diff --git a/docs/customer/models/KycDocumentRequest.md b/docs/customer/models/KycDocumentRequest.md new file mode 100644 index 0000000..cf2d8c4 --- /dev/null +++ b/docs/customer/models/KycDocumentRequest.md @@ -0,0 +1,18 @@ +# KYCDocumentRequest + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **country** | string | | ISO3166-2 country code | +**type** | [KYCDocumentType](KYCDocumentType.md) | | | +**subType** | [KYCDocumentSubType](KYCDocumentSubType.md) | | | +**documentName** | string | | | +**documentNumber** | string | | | +**expiresAt** | string | | | +**holderName** | string | | | +**documentImages** | []string | | | + + diff --git a/docs/customer/models/KycDocumentResponse.md b/docs/customer/models/KycDocumentResponse.md new file mode 100644 index 0000000..88b84da --- /dev/null +++ b/docs/customer/models/KycDocumentResponse.md @@ -0,0 +1,18 @@ +# KYCDocumentResponse + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **country** | string | ✅ | | +**type** | [KYCDocumentType](KYCDocumentType.md) | ✅ | | +**subType** | [KYCDocumentSubType](KYCDocumentSubType.md) | ✅ | | +**documentName** | string | ✅ | | +**documentNumber** | string | ✅ | | +**expiresAt** | string | ✅ | | +**holderName** | string | ✅ | | +**documentImages** | []string | ✅ | | + + diff --git a/docs/customer/models/KycDocumentSubType.md b/docs/customer/models/KycDocumentSubType.md new file mode 100644 index 0000000..604b5fd --- /dev/null +++ b/docs/customer/models/KycDocumentSubType.md @@ -0,0 +1,29 @@ +# KYCDocumentSubType + + + + +## Enum + + + * `NationalId` (value: `'NATIONAL_ID'`) + + * `ConsularId` (value: `'CONSULAR_ID'`) + + * `VoterId` (value: `'VOTER_ID'`) + + * `PostalId` (value: `'POSTAL_ID'`) + + * `ResidencePermit` (value: `'RESIDENCE_PERMIT'`) + + * `TaxId` (value: `'TAX_ID'`) + + * `StudentId` (value: `'STUDENT_ID'`) + + * `MilitaryId` (value: `'MILITARY_ID'`) + + * `MedicalId` (value: `'MEDICAL_ID'`) + + * `Others` (value: `'OTHERS'`) + + diff --git a/docs/customer/models/KycDocumentType.md b/docs/customer/models/KycDocumentType.md new file mode 100644 index 0000000..6bc9275 --- /dev/null +++ b/docs/customer/models/KycDocumentType.md @@ -0,0 +1,25 @@ +# KYCDocumentType + + + + +## Enum + + + * `BirthCertificate` (value: `'BIRTH_CERTIFICATE'`) + + * `BankStatement` (value: `'BANK_STATEMENT'`) + + * `DrivingLicense` (value: `'DRIVING_LICENSE'`) + + * `IdentityCard` (value: `'IDENTITY_CARD'`) + + * `Passport` (value: `'PASSPORT'`) + + * `Visa` (value: `'VISA'`) + + * `BusinessRegistration` (value: `'BUSINESS_REGISTRATION'`) + + * `BusinessLicense` (value: `'BUSINESS_LICENSE'`) + + diff --git a/docs/customer/models/PatchCustomer.md b/docs/customer/models/PatchCustomer.md new file mode 100644 index 0000000..b1ddf91 --- /dev/null +++ b/docs/customer/models/PatchCustomer.md @@ -0,0 +1,23 @@ +# PatchCustomer + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **clientName** | string | | Entity\'s name for this client | +**referenceId** | string | | Merchant\'s reference of this end customer, eg Merchant\'s user\'s id. Must be unique. | +**individualDetail** | [IndividualDetail](IndividualDetail.md) | | | +**businessDetail** | [BusinessDetail](BusinessDetail.md) | | | +**description** | string | | | +**email** | string | | | +**mobileNumber** | string | | | +**phoneNumber** | string | | | +**metadata** | object | | | +**addresses** | [[]AddressRequest](AddressRequest.md) | | | +**identityAccounts** | [[]IdentityAccountRequest](IdentityAccountRequest.md) | | | +**kycDocuments** | [[]KYCDocumentRequest](KYCDocumentRequest.md) | | | +**status** | [EndCustomerStatus](EndCustomerStatus.md) | | | + + diff --git a/docs/customer/models/ResponseDataNotFound.md b/docs/customer/models/ResponseDataNotFound.md new file mode 100644 index 0000000..e16d096 --- /dev/null +++ b/docs/customer/models/ResponseDataNotFound.md @@ -0,0 +1,12 @@ +# ResponseDataNotFound + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | | | +**message** | any | | | + + diff --git a/docs/customer/models/UpdateCustomer400Response.md b/docs/customer/models/UpdateCustomer400Response.md new file mode 100644 index 0000000..c9484a4 --- /dev/null +++ b/docs/customer/models/UpdateCustomer400Response.md @@ -0,0 +1,13 @@ +# UpdateCustomer400Response + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | ✅ | | +**message** | any | ✅ | | +**errors** | []object | | | + + diff --git a/docs/customer/models/UpdateCustomer400ResponseAllOf.md b/docs/customer/models/UpdateCustomer400ResponseAllOf.md new file mode 100644 index 0000000..9980774 --- /dev/null +++ b/docs/customer/models/UpdateCustomer400ResponseAllOf.md @@ -0,0 +1,12 @@ +# UpdateCustomer400ResponseAllOf + + + +## Properties + +| Name | Type | Required | Description | +| ------------ | ------------- | ------------- | ------------- | +| **errorCode** | string | | | +**message** | any | | | + + diff --git a/docs/payment_method/models/ChannelAmountLimits.md b/docs/payment_method/models/ChannelAmountLimits.md deleted file mode 100644 index e9fecfe..0000000 --- a/docs/payment_method/models/ChannelAmountLimits.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChannelAmountLimits - - - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **currency** | string | | Currency supported by the payment channel | -**minLimit** | number | | The minimum allowed transaction amount for the payment channel | -**maxLimit** | number | | The minimum allowed transaction amount for the payment channel | - - diff --git a/docs/payment_method/models/ChannelAmountLimitsAllOf.md b/docs/payment_method/models/ChannelAmountLimitsAllOf.md deleted file mode 100644 index 36fda92..0000000 --- a/docs/payment_method/models/ChannelAmountLimitsAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChannelAmountLimitsAllOf - -Contains objects of the support currencies and its respective limits per transaction - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **currency** | string | | Currency supported by the payment channel | -**minLimit** | number | | The minimum allowed transaction amount for the payment channel | -**maxLimit** | number | | The minimum allowed transaction amount for the payment channel | - - diff --git a/docs/payment_method/models/ChannelProperty.md b/docs/payment_method/models/ChannelProperty.md deleted file mode 100644 index f6f5f58..0000000 --- a/docs/payment_method/models/ChannelProperty.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChannelProperty - - - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **name** | string | | The corresponding parameter name | -**type** | string | | Data type of the parameter | -**isRequired** | boolean | | Indicates whether or not the parameter is required | - - diff --git a/docs/payment_method/models/ChannelPropertyAllOf.md b/docs/payment_method/models/ChannelPropertyAllOf.md deleted file mode 100644 index 3b9c909..0000000 --- a/docs/payment_method/models/ChannelPropertyAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ -# ChannelPropertyAllOf - -Objects that enumerate the parameters needed as `channel_properties` when creating a Payment Method - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **name** | string | | The corresponding parameter name | -**type** | string | | Data type of the parameter | -**isRequired** | boolean | | Indicates whether or not the parameter is required | - - diff --git a/docs/payment_method/models/PaymentChannel.md b/docs/payment_method/models/PaymentChannel.md deleted file mode 100644 index ae9e0e4..0000000 --- a/docs/payment_method/models/PaymentChannel.md +++ /dev/null @@ -1,17 +0,0 @@ -# PaymentChannel - - - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **channelCode** | string | | The specific Xendit code used to identify the partner channel | -**type** | string | | The payment method type | -**country** | string | | The country where the channel operates in ISO 3166-2 country code | -**channelName** | string | | Official parter name of the payment channel | -**channelProperties** | [[]ChannelProperty](ChannelProperty.md) | | | -**logoUrl** | string | | If available, this contains a URL to the logo of the partner channel | -**amountLimits** | [[]ChannelAmountLimits](ChannelAmountLimits.md) | | | - - diff --git a/docs/payment_method/models/PaymentChannelAllOf.md b/docs/payment_method/models/PaymentChannelAllOf.md deleted file mode 100644 index 7abc604..0000000 --- a/docs/payment_method/models/PaymentChannelAllOf.md +++ /dev/null @@ -1,17 +0,0 @@ -# PaymentChannelAllOf - - - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **channelCode** | string | | The specific Xendit code used to identify the partner channel | -**type** | string | | The payment method type | -**country** | string | | The country where the channel operates in ISO 3166-2 country code | -**channelName** | string | | Official parter name of the payment channel | -**channelProperties** | [[]ChannelProperty](ChannelProperty.md) | | | -**logoUrl** | string | | If available, this contains a URL to the logo of the partner channel | -**amountLimits** | [[]ChannelAmountLimits](ChannelAmountLimits.md) | | | - - diff --git a/docs/payment_method/models/PaymentChannelList.md b/docs/payment_method/models/PaymentChannelList.md deleted file mode 100644 index fb5c3df..0000000 --- a/docs/payment_method/models/PaymentChannelList.md +++ /dev/null @@ -1,13 +0,0 @@ -# PaymentChannelList - - - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **data** | [[]PaymentChannel](PaymentChannel.md) | | Array of resources that match the provided filters | -**links** | [[]PaymentChannelListLinksInner](PaymentChannelListLinksInner.md) | | Array of objects that can be used to assist on navigating through the data | -**hasMore** | boolean | | Indicates whether there are more items in the list | - - diff --git a/docs/payment_method/models/PaymentChannelListLinksInner.md b/docs/payment_method/models/PaymentChannelListLinksInner.md deleted file mode 100644 index 7a3644b..0000000 --- a/docs/payment_method/models/PaymentChannelListLinksInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# PaymentChannelListLinksInner - - - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **href** | string | | Target URI that should contain a target to Internationalized Resource Identifiers (IRI) | -**rel** | string | | The link relation type described how the current context (source) is related to target resource | -**method** | string | | The HTTP method to be used to call `href` | - - diff --git a/docs/payment_method/models/PaymentChannelListLinksInnerAllOf.md b/docs/payment_method/models/PaymentChannelListLinksInnerAllOf.md deleted file mode 100644 index f496404..0000000 --- a/docs/payment_method/models/PaymentChannelListLinksInnerAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ -# PaymentChannelListLinksInnerAllOf - - - -## Properties - -| Name | Type | Required | Description | -| ------------ | ------------- | ------------- | ------------- | -| **href** | string | | Target URI that should contain a target to Internationalized Resource Identifiers (IRI) | -**rel** | string | | The link relation type described how the current context (source) is related to target resource | -**method** | string | | The HTTP method to be used to call `href` | - - diff --git a/docs/payment_request/models/EWalletChannelProperties.md b/docs/payment_request/models/EWalletChannelProperties.md index d81de17..f5896f7 100644 --- a/docs/payment_request/models/EWalletChannelProperties.md +++ b/docs/payment_request/models/EWalletChannelProperties.md @@ -10,7 +10,7 @@ Ewallet Channel Properties **failureReturnUrl** | string | | URL where the end-customer is redirected if the authorization failed | **cancelReturnUrl** | string | | URL where the end-customer is redirected if the authorization cancelled | **redeemPoints** | string | | REDEEM_NONE will not use any point, REDEEM_ALL will use all available points before cash balance is used. For OVO and ShopeePay tokenized payment use only. | -**mobilenumber** | string | | | +**mobileNumber** | string | | | **cashtag** | string | | | diff --git a/index.ts b/index.ts index 22712f4..39b640f 100644 --- a/index.ts +++ b/index.ts @@ -2,15 +2,6 @@ /* eslint-disable */ export * from './runtime'; -import { Transaction, Balance } from './balance_and_transaction'; -export { Transaction, Balance } from './balance_and_transaction'; - -import { PaymentRequest } from './payment_request'; -export { PaymentRequest } from './payment_request'; - -import { PaymentMethod } from './payment_method'; -export { PaymentMethod } from './payment_method'; - import { Refund } from './refund'; export { Refund } from './refund'; @@ -20,6 +11,18 @@ export { Invoice } from './invoice'; import { Payout } from './payout'; export { Payout } from './payout'; +import { PaymentMethod } from './payment_method'; +export { PaymentMethod } from './payment_method'; + +import { PaymentRequest } from './payment_request'; +export { PaymentRequest } from './payment_request'; + +import { Customer } from './customer'; +export { Customer } from './customer'; + +import { Transaction, Balance } from './balance_and_transaction'; +export { Transaction, Balance } from './balance_and_transaction'; + export interface XenditOpts { secretKey: string; @@ -27,13 +30,14 @@ export interface XenditOpts { } export class Xendit { opts: XenditOpts; - Transaction: Transaction; - Balance: Balance; - PaymentRequest: PaymentRequest; - PaymentMethod: PaymentMethod; Refund: Refund; Invoice: Invoice; Payout: Payout; + PaymentMethod: PaymentMethod; + PaymentRequest: PaymentRequest; + Customer: Customer; + Transaction: Transaction; + Balance: Balance; constructor({ secretKey: _secretKey, xenditURL: _xenditURL }: XenditOpts) { @@ -54,18 +58,20 @@ export class Xendit { } - this.Transaction = new Transaction(this.opts); - this.Balance = new Balance(this.opts); + this.Refund = new Refund(this.opts); - this.PaymentRequest = new PaymentRequest(this.opts); + this.Invoice = new Invoice(this.opts); + + this.Payout = new Payout(this.opts); this.PaymentMethod = new PaymentMethod(this.opts); - this.Refund = new Refund(this.opts); + this.PaymentRequest = new PaymentRequest(this.opts); - this.Invoice = new Invoice(this.opts); + this.Customer = new Customer(this.opts); - this.Payout = new Payout(this.opts); + this.Transaction = new Transaction(this.opts); + this.Balance = new Balance(this.opts); } } diff --git a/package.json b/package.json index d669b59..aa9a8ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xendit-node", - "version": "3.2.0", + "version": "3.3.0", "description": "OpenAPI client for xendit-node", "author": "OpenAPI-Generator", "repository": { @@ -8,12 +8,13 @@ "url": "https://github.com/xendit/xendit-node.git" }, "files": [ - "balance_and_transaction/**", - "payment_request/**", - "payment_method/**", "refund/**", "invoice/**", "payout/**", + "payment_method/**", + "payment_request/**", + "customer/**", + "balance_and_transaction/**", "docs/**", "images/**", "README.md", @@ -30,6 +31,9 @@ "prepare": "npm run build", "custom-publish": "cp README.md dist/ && cp -R docs dist/ && cp -R images dist/ && cp package.json dist && cd dist && npm publish" }, + "engines": { + "node": ">=18.0.0" + }, "devDependencies": { "typescript": "^4.0" } diff --git a/payment_method/apis/PaymentMethod.ts b/payment_method/apis/PaymentMethod.ts index cd38e71..ffae4e4 100644 --- a/payment_method/apis/PaymentMethod.ts +++ b/payment_method/apis/PaymentMethod.ts @@ -15,7 +15,6 @@ import type { GetAllPaymentMethods403Response, GetAllPaymentMethods404Response, GetAllPaymentMethodsDefaultResponse, - PaymentChannelList, PaymentMethod, PaymentMethodAuthParameters, PaymentMethodExpireParameters, @@ -40,8 +39,6 @@ import { GetAllPaymentMethods404ResponseToJSON, GetAllPaymentMethodsDefaultResponseFromJSON, GetAllPaymentMethodsDefaultResponseToJSON, - PaymentChannelListFromJSON, - PaymentChannelListToJSON, PaymentMethodFromJSON, PaymentMethodToJSON, PaymentMethodAuthParametersFromJSON, @@ -80,12 +77,6 @@ export interface ExpirePaymentMethodRequest { data?: PaymentMethodExpireParameters | null; } -export interface GetAllPaymentChannelsRequest { - isActivated?: GetAllPaymentChannelsIsActivatedEnum; - type?: string; - idempotencyKey?: string; -} - export interface GetAllPaymentMethodsRequest { id?: Array; type?: Array; @@ -261,47 +252,6 @@ export class PaymentMethodApi extends runtime.BaseAPI { return await response.value(); } - /** - * Get all payment channels - * Get all payment channels - */ - private async getAllPaymentChannelsRaw(requestParameters: GetAllPaymentChannelsRequest): Promise> { - const queryParameters: any = {}; - - if (requestParameters.isActivated !== undefined) { - queryParameters['is_activated'] = requestParameters.isActivated; - } - - if (requestParameters.type !== undefined) { - queryParameters['type'] = requestParameters.type; - } - - const headerParameters: runtime.HTTPHeaders = {}; - headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":"); - - if (requestParameters.idempotencyKey !== undefined && requestParameters.idempotencyKey !== null) { - headerParameters['idempotency-key'] = String(requestParameters.idempotencyKey); - } - - const response = await this.request({ - path: `/v2/payment_methods/channels`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => PaymentChannelListFromJSON(jsonValue)); - } - - /** - * Get all payment channels - * Get all payment channels - */ - async getAllPaymentChannels(requestParameters: GetAllPaymentChannelsRequest = {}): Promise { - const response = await this.getAllPaymentChannelsRaw(requestParameters); - return await response.value(); - } - /** * Get all payment methods by filters * Get all payment methods by filters @@ -573,12 +523,3 @@ export class PaymentMethodApi extends runtime.BaseAPI { } } - -/** - * @export - */ -export const GetAllPaymentChannelsIsActivatedEnum = { - True: true, - False: false -} as const; -export type GetAllPaymentChannelsIsActivatedEnum = typeof GetAllPaymentChannelsIsActivatedEnum[keyof typeof GetAllPaymentChannelsIsActivatedEnum]; diff --git a/payment_method/models/ChannelAmountLimits.ts b/payment_method/models/ChannelAmountLimits.ts deleted file mode 100644 index 3c4b970..0000000 --- a/payment_method/models/ChannelAmountLimits.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -/** - * - * @export - * @interface ChannelAmountLimits - */ -export interface ChannelAmountLimits { - /** - * Currency supported by the payment channel - * @type {string} - * @memberof ChannelAmountLimits - */ - currency?: string; - /** - * The minimum allowed transaction amount for the payment channel - * @type {number} - * @memberof ChannelAmountLimits - */ - minLimit?: number; - /** - * The minimum allowed transaction amount for the payment channel - * @type {number} - * @memberof ChannelAmountLimits - */ - maxLimit?: number; -} - -/** - * Check if a given object implements the ChannelAmountLimits interface. - */ -export function instanceOfChannelAmountLimits(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelAmountLimitsFromJSON(json: any): ChannelAmountLimits { - return ChannelAmountLimitsFromJSONTyped(json, false); -} - -export function ChannelAmountLimitsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelAmountLimits { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'currency': !exists(json, 'currency') ? undefined : json['currency'], - 'minLimit': !exists(json, 'min_limit') ? undefined : json['min_limit'], - 'maxLimit': !exists(json, 'max_limit') ? undefined : json['max_limit'], - }; -} - -export function ChannelAmountLimitsToJSON(value?: ChannelAmountLimits | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'currency': value.currency, - 'min_limit': value.minLimit, - 'max_limit': value.maxLimit, - }; -} - diff --git a/payment_method/models/ChannelAmountLimitsAllOf.ts b/payment_method/models/ChannelAmountLimitsAllOf.ts deleted file mode 100644 index ce07085..0000000 --- a/payment_method/models/ChannelAmountLimitsAllOf.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -/** - * Contains objects of the support currencies and its respective limits per transaction - * @export - * @interface ChannelAmountLimitsAllOf - */ -export interface ChannelAmountLimitsAllOf { - /** - * Currency supported by the payment channel - * @type {string} - * @memberof ChannelAmountLimitsAllOf - */ - currency?: string; - /** - * The minimum allowed transaction amount for the payment channel - * @type {number} - * @memberof ChannelAmountLimitsAllOf - */ - minLimit?: number; - /** - * The minimum allowed transaction amount for the payment channel - * @type {number} - * @memberof ChannelAmountLimitsAllOf - */ - maxLimit?: number; -} - -/** - * Check if a given object implements the ChannelAmountLimitsAllOf interface. - */ -export function instanceOfChannelAmountLimitsAllOf(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelAmountLimitsAllOfFromJSON(json: any): ChannelAmountLimitsAllOf { - return ChannelAmountLimitsAllOfFromJSONTyped(json, false); -} - -export function ChannelAmountLimitsAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelAmountLimitsAllOf { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'currency': !exists(json, 'currency') ? undefined : json['currency'], - 'minLimit': !exists(json, 'min_limit') ? undefined : json['min_limit'], - 'maxLimit': !exists(json, 'max_limit') ? undefined : json['max_limit'], - }; -} - -export function ChannelAmountLimitsAllOfToJSON(value?: ChannelAmountLimitsAllOf | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'currency': value.currency, - 'min_limit': value.minLimit, - 'max_limit': value.maxLimit, - }; -} - diff --git a/payment_method/models/ChannelProperty.ts b/payment_method/models/ChannelProperty.ts deleted file mode 100644 index 0c62ad4..0000000 --- a/payment_method/models/ChannelProperty.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -/** - * - * @export - * @interface ChannelProperty - */ -export interface ChannelProperty { - /** - * The corresponding parameter name - * @type {string} - * @memberof ChannelProperty - */ - name?: string; - /** - * Data type of the parameter - * @type {string} - * @memberof ChannelProperty - */ - type?: string; - /** - * Indicates whether or not the parameter is required - * @type {boolean} - * @memberof ChannelProperty - */ - isRequired?: boolean; -} - -/** - * Check if a given object implements the ChannelProperty interface. - */ -export function instanceOfChannelProperty(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelPropertyFromJSON(json: any): ChannelProperty { - return ChannelPropertyFromJSONTyped(json, false); -} - -export function ChannelPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelProperty { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'name': !exists(json, 'name') ? undefined : json['name'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'isRequired': !exists(json, 'is_required') ? undefined : json['is_required'], - }; -} - -export function ChannelPropertyToJSON(value?: ChannelProperty | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'type': value.type, - 'is_required': value.isRequired, - }; -} - diff --git a/payment_method/models/ChannelPropertyAllOf.ts b/payment_method/models/ChannelPropertyAllOf.ts deleted file mode 100644 index a1eda0e..0000000 --- a/payment_method/models/ChannelPropertyAllOf.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -/** - * Objects that enumerate the parameters needed as `channel_properties` when creating a Payment Method - * @export - * @interface ChannelPropertyAllOf - */ -export interface ChannelPropertyAllOf { - /** - * The corresponding parameter name - * @type {string} - * @memberof ChannelPropertyAllOf - */ - name?: string; - /** - * Data type of the parameter - * @type {string} - * @memberof ChannelPropertyAllOf - */ - type?: string; - /** - * Indicates whether or not the parameter is required - * @type {boolean} - * @memberof ChannelPropertyAllOf - */ - isRequired?: boolean; -} - -/** - * Check if a given object implements the ChannelPropertyAllOf interface. - */ -export function instanceOfChannelPropertyAllOf(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ChannelPropertyAllOfFromJSON(json: any): ChannelPropertyAllOf { - return ChannelPropertyAllOfFromJSONTyped(json, false); -} - -export function ChannelPropertyAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelPropertyAllOf { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'name': !exists(json, 'name') ? undefined : json['name'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'isRequired': !exists(json, 'is_required') ? undefined : json['is_required'], - }; -} - -export function ChannelPropertyAllOfToJSON(value?: ChannelPropertyAllOf | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'type': value.type, - 'is_required': value.isRequired, - }; -} - diff --git a/payment_method/models/PaymentChannel.ts b/payment_method/models/PaymentChannel.ts deleted file mode 100644 index 90cd4b3..0000000 --- a/payment_method/models/PaymentChannel.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -import type { ChannelAmountLimits } from './ChannelAmountLimits'; -import { - ChannelAmountLimitsFromJSON, - ChannelAmountLimitsFromJSONTyped, - ChannelAmountLimitsToJSON, -} from './ChannelAmountLimits'; -import type { ChannelProperty } from './ChannelProperty'; -import { - ChannelPropertyFromJSON, - ChannelPropertyFromJSONTyped, - ChannelPropertyToJSON, -} from './ChannelProperty'; - -/** - * - * @export - * @interface PaymentChannel - */ -export interface PaymentChannel { - /** - * The specific Xendit code used to identify the partner channel - * @type {string} - * @memberof PaymentChannel - */ - channelCode?: string; - /** - * The payment method type - * @type {string} - * @memberof PaymentChannel - */ - type?: string; - /** - * The country where the channel operates in ISO 3166-2 country code - * @type {string} - * @memberof PaymentChannel - */ - country?: string; - /** - * Official parter name of the payment channel - * @type {string} - * @memberof PaymentChannel - */ - channelName?: string; - /** - * - * @type {Array} - * @memberof PaymentChannel - */ - channelProperties?: Array; - /** - * If available, this contains a URL to the logo of the partner channel - * @type {string} - * @memberof PaymentChannel - */ - logoUrl?: string; - /** - * - * @type {Array} - * @memberof PaymentChannel - */ - amountLimits?: Array; -} - -/** - * Check if a given object implements the PaymentChannel interface. - */ -export function instanceOfPaymentChannel(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function PaymentChannelFromJSON(json: any): PaymentChannel { - return PaymentChannelFromJSONTyped(json, false); -} - -export function PaymentChannelFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentChannel { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'channelCode': !exists(json, 'channel_code') ? undefined : json['channel_code'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'country': !exists(json, 'country') ? undefined : json['country'], - 'channelName': !exists(json, 'channel_name') ? undefined : json['channel_name'], - 'channelProperties': !exists(json, 'channel_properties') ? undefined : ((json['channel_properties'] as Array).map(ChannelPropertyFromJSON)), - 'logoUrl': !exists(json, 'logo_url') ? undefined : json['logo_url'], - 'amountLimits': !exists(json, 'amount_limits') ? undefined : ((json['amount_limits'] as Array).map(ChannelAmountLimitsFromJSON)), - }; -} - -export function PaymentChannelToJSON(value?: PaymentChannel | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'channel_code': value.channelCode, - 'type': value.type, - 'country': value.country, - 'channel_name': value.channelName, - 'channel_properties': value.channelProperties === undefined ? undefined : ((value.channelProperties as Array).map(ChannelPropertyToJSON)), - 'logo_url': value.logoUrl, - 'amount_limits': value.amountLimits === undefined ? undefined : ((value.amountLimits as Array).map(ChannelAmountLimitsToJSON)), - }; -} - diff --git a/payment_method/models/PaymentChannelAllOf.ts b/payment_method/models/PaymentChannelAllOf.ts deleted file mode 100644 index 115c478..0000000 --- a/payment_method/models/PaymentChannelAllOf.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -import type { ChannelAmountLimits } from './ChannelAmountLimits'; -import { - ChannelAmountLimitsFromJSON, - ChannelAmountLimitsFromJSONTyped, - ChannelAmountLimitsToJSON, -} from './ChannelAmountLimits'; -import type { ChannelProperty } from './ChannelProperty'; -import { - ChannelPropertyFromJSON, - ChannelPropertyFromJSONTyped, - ChannelPropertyToJSON, -} from './ChannelProperty'; - -/** - * - * @export - * @interface PaymentChannelAllOf - */ -export interface PaymentChannelAllOf { - /** - * The specific Xendit code used to identify the partner channel - * @type {string} - * @memberof PaymentChannelAllOf - */ - channelCode?: string; - /** - * The payment method type - * @type {string} - * @memberof PaymentChannelAllOf - */ - type?: string; - /** - * The country where the channel operates in ISO 3166-2 country code - * @type {string} - * @memberof PaymentChannelAllOf - */ - country?: string; - /** - * Official parter name of the payment channel - * @type {string} - * @memberof PaymentChannelAllOf - */ - channelName?: string; - /** - * - * @type {Array} - * @memberof PaymentChannelAllOf - */ - channelProperties?: Array; - /** - * If available, this contains a URL to the logo of the partner channel - * @type {string} - * @memberof PaymentChannelAllOf - */ - logoUrl?: string; - /** - * - * @type {Array} - * @memberof PaymentChannelAllOf - */ - amountLimits?: Array; -} - -/** - * Check if a given object implements the PaymentChannelAllOf interface. - */ -export function instanceOfPaymentChannelAllOf(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function PaymentChannelAllOfFromJSON(json: any): PaymentChannelAllOf { - return PaymentChannelAllOfFromJSONTyped(json, false); -} - -export function PaymentChannelAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentChannelAllOf { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'channelCode': !exists(json, 'channel_code') ? undefined : json['channel_code'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'country': !exists(json, 'country') ? undefined : json['country'], - 'channelName': !exists(json, 'channel_name') ? undefined : json['channel_name'], - 'channelProperties': !exists(json, 'channel_properties') ? undefined : ((json['channel_properties'] as Array).map(ChannelPropertyFromJSON)), - 'logoUrl': !exists(json, 'logo_url') ? undefined : json['logo_url'], - 'amountLimits': !exists(json, 'amount_limits') ? undefined : ((json['amount_limits'] as Array).map(ChannelAmountLimitsFromJSON)), - }; -} - -export function PaymentChannelAllOfToJSON(value?: PaymentChannelAllOf | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'channel_code': value.channelCode, - 'type': value.type, - 'country': value.country, - 'channel_name': value.channelName, - 'channel_properties': value.channelProperties === undefined ? undefined : ((value.channelProperties as Array).map(ChannelPropertyToJSON)), - 'logo_url': value.logoUrl, - 'amount_limits': value.amountLimits === undefined ? undefined : ((value.amountLimits as Array).map(ChannelAmountLimitsToJSON)), - }; -} - diff --git a/payment_method/models/PaymentChannelList.ts b/payment_method/models/PaymentChannelList.ts deleted file mode 100644 index 38e36fe..0000000 --- a/payment_method/models/PaymentChannelList.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -import type { PaymentChannel } from './PaymentChannel'; -import { - PaymentChannelFromJSON, - PaymentChannelFromJSONTyped, - PaymentChannelToJSON, -} from './PaymentChannel'; -import type { PaymentChannelListLinksInner } from './PaymentChannelListLinksInner'; -import { - PaymentChannelListLinksInnerFromJSON, - PaymentChannelListLinksInnerFromJSONTyped, - PaymentChannelListLinksInnerToJSON, -} from './PaymentChannelListLinksInner'; - -/** - * - * @export - * @interface PaymentChannelList - */ -export interface PaymentChannelList { - /** - * Array of resources that match the provided filters - * @type {Array} - * @memberof PaymentChannelList - */ - data?: Array; - /** - * Array of objects that can be used to assist on navigating through the data - * @type {Array} - * @memberof PaymentChannelList - */ - links?: Array; - /** - * Indicates whether there are more items in the list - * @type {boolean} - * @memberof PaymentChannelList - */ - hasMore?: boolean; -} - -/** - * Check if a given object implements the PaymentChannelList interface. - */ -export function instanceOfPaymentChannelList(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function PaymentChannelListFromJSON(json: any): PaymentChannelList { - return PaymentChannelListFromJSONTyped(json, false); -} - -export function PaymentChannelListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentChannelList { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'data': !exists(json, 'data') ? undefined : ((json['data'] as Array).map(PaymentChannelFromJSON)), - 'links': !exists(json, 'links') ? undefined : ((json['links'] as Array).map(PaymentChannelListLinksInnerFromJSON)), - 'hasMore': !exists(json, 'has_more') ? undefined : json['has_more'], - }; -} - -export function PaymentChannelListToJSON(value?: PaymentChannelList | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'data': value.data === undefined ? undefined : ((value.data as Array).map(PaymentChannelToJSON)), - 'links': value.links === undefined ? undefined : ((value.links as Array).map(PaymentChannelListLinksInnerToJSON)), - 'has_more': value.hasMore, - }; -} - diff --git a/payment_method/models/PaymentChannelListLinksInner.ts b/payment_method/models/PaymentChannelListLinksInner.ts deleted file mode 100644 index 229784f..0000000 --- a/payment_method/models/PaymentChannelListLinksInner.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -/** - * - * @export - * @interface PaymentChannelListLinksInner - */ -export interface PaymentChannelListLinksInner { - /** - * Target URI that should contain a target to Internationalized Resource Identifiers (IRI) - * @type {string} - * @memberof PaymentChannelListLinksInner - */ - href?: string; - /** - * The link relation type described how the current context (source) is related to target resource - * @type {string} - * @memberof PaymentChannelListLinksInner - */ - rel?: PaymentChannelListLinksInnerRelEnum; - /** - * The HTTP method to be used to call `href` - * @type {string} - * @memberof PaymentChannelListLinksInner - */ - method?: string; -} - - -/** - * @export - */ -export const PaymentChannelListLinksInnerRelEnum = { - First: 'first', - Last: 'last', - Next: 'next', - Prev: 'prev' -} as const; -export type PaymentChannelListLinksInnerRelEnum = typeof PaymentChannelListLinksInnerRelEnum[keyof typeof PaymentChannelListLinksInnerRelEnum]; - - -/** - * Check if a given object implements the PaymentChannelListLinksInner interface. - */ -export function instanceOfPaymentChannelListLinksInner(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function PaymentChannelListLinksInnerFromJSON(json: any): PaymentChannelListLinksInner { - return PaymentChannelListLinksInnerFromJSONTyped(json, false); -} - -export function PaymentChannelListLinksInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentChannelListLinksInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'href': !exists(json, 'href') ? undefined : json['href'], - 'rel': !exists(json, 'rel') ? undefined : json['rel'], - 'method': !exists(json, 'method') ? undefined : json['method'], - }; -} - -export function PaymentChannelListLinksInnerToJSON(value?: PaymentChannelListLinksInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'href': value.href, - 'rel': value.rel, - 'method': value.method, - }; -} - diff --git a/payment_method/models/PaymentChannelListLinksInnerAllOf.ts b/payment_method/models/PaymentChannelListLinksInnerAllOf.ts deleted file mode 100644 index cc67df5..0000000 --- a/payment_method/models/PaymentChannelListLinksInnerAllOf.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * NOTE: This file is auto generated by Xendit. - * Do not edit the class manually. - * Improvements? Share your ideas at https://github.com/xendit/xendit-node - */ - -import { exists, mapValues } from '../../runtime'; -/** - * - * @export - * @interface PaymentChannelListLinksInnerAllOf - */ -export interface PaymentChannelListLinksInnerAllOf { - /** - * Target URI that should contain a target to Internationalized Resource Identifiers (IRI) - * @type {string} - * @memberof PaymentChannelListLinksInnerAllOf - */ - href?: string; - /** - * The link relation type described how the current context (source) is related to target resource - * @type {string} - * @memberof PaymentChannelListLinksInnerAllOf - */ - rel?: PaymentChannelListLinksInnerAllOfRelEnum; - /** - * The HTTP method to be used to call `href` - * @type {string} - * @memberof PaymentChannelListLinksInnerAllOf - */ - method?: string; -} - - -/** - * @export - */ -export const PaymentChannelListLinksInnerAllOfRelEnum = { - First: 'first', - Last: 'last', - Next: 'next', - Prev: 'prev' -} as const; -export type PaymentChannelListLinksInnerAllOfRelEnum = typeof PaymentChannelListLinksInnerAllOfRelEnum[keyof typeof PaymentChannelListLinksInnerAllOfRelEnum]; - - -/** - * Check if a given object implements the PaymentChannelListLinksInnerAllOf interface. - */ -export function instanceOfPaymentChannelListLinksInnerAllOf(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function PaymentChannelListLinksInnerAllOfFromJSON(json: any): PaymentChannelListLinksInnerAllOf { - return PaymentChannelListLinksInnerAllOfFromJSONTyped(json, false); -} - -export function PaymentChannelListLinksInnerAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentChannelListLinksInnerAllOf { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'href': !exists(json, 'href') ? undefined : json['href'], - 'rel': !exists(json, 'rel') ? undefined : json['rel'], - 'method': !exists(json, 'method') ? undefined : json['method'], - }; -} - -export function PaymentChannelListLinksInnerAllOfToJSON(value?: PaymentChannelListLinksInnerAllOf | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'href': value.href, - 'rel': value.rel, - 'method': value.method, - }; -} - diff --git a/payment_method/models/index.ts b/payment_method/models/index.ts index 8141ce8..7858a93 100644 --- a/payment_method/models/index.ts +++ b/payment_method/models/index.ts @@ -7,10 +7,6 @@ export * from './CardParameters'; export * from './CardParametersCardInformation'; export * from './CardVerificationResults'; export * from './CardVerificationResultsThreeDSecure'; -export * from './ChannelAmountLimits'; -export * from './ChannelAmountLimitsAllOf'; -export * from './ChannelProperty'; -export * from './ChannelPropertyAllOf'; export * from './CreatePaymentMethod409Response'; export * from './CreatePaymentMethod503Response'; export * from './DirectDebit'; @@ -36,11 +32,6 @@ export * from './OverTheCounterChannelProperties'; export * from './OverTheCounterChannelPropertiesUpdate'; export * from './OverTheCounterParameters'; export * from './OverTheCounterUpdateParameters'; -export * from './PaymentChannel'; -export * from './PaymentChannelAllOf'; -export * from './PaymentChannelList'; -export * from './PaymentChannelListLinksInner'; -export * from './PaymentChannelListLinksInnerAllOf'; export * from './PaymentMethod'; export * from './PaymentMethodAction'; export * from './PaymentMethodAuthParameters'; diff --git a/payment_request/models/EWalletChannelProperties.ts b/payment_request/models/EWalletChannelProperties.ts index 761c547..cda041e 100644 --- a/payment_request/models/EWalletChannelProperties.ts +++ b/payment_request/models/EWalletChannelProperties.ts @@ -42,7 +42,7 @@ export interface EWalletChannelProperties { * @type {string} * @memberof EWalletChannelProperties */ - mobilenumber?: string; + mobileNumber?: string; /** * * @type {string} @@ -74,7 +74,7 @@ export function EWalletChannelPropertiesFromJSONTyped(json: any, ignoreDiscrimin 'failureReturnUrl': !exists(json, 'failure_return_url') ? undefined : json['failure_return_url'], 'cancelReturnUrl': !exists(json, 'cancel_return_url') ? undefined : json['cancel_return_url'], 'redeemPoints': !exists(json, 'redeem_points') ? undefined : json['redeem_points'], - 'mobilenumber': !exists(json, 'mobile:number') ? undefined : json['mobile:number'], + 'mobileNumber': !exists(json, 'mobile_number') ? undefined : json['mobile_number'], 'cashtag': !exists(json, 'cashtag') ? undefined : json['cashtag'], }; } @@ -92,7 +92,7 @@ export function EWalletChannelPropertiesToJSON(value?: EWalletChannelProperties 'failure_return_url': value.failureReturnUrl, 'cancel_return_url': value.cancelReturnUrl, 'redeem_points': value.redeemPoints, - 'mobile:number': value.mobilenumber, + 'mobile_number': value.mobileNumber, 'cashtag': value.cashtag, }; } diff --git a/runtime.ts b/runtime.ts index 704bccb..b5f738e 100644 --- a/runtime.ts +++ b/runtime.ts @@ -136,7 +136,7 @@ export class BaseAPI { const headers = Object.assign({}, this.configuration.headers, context.headers); Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); headers['xendit-lib'] = 'node'; - headers['xendit-lib-ver'] = '3.2.0'; + headers['xendit-lib-ver'] = '3.3.0'; const initParams = { method: context.method,