From f2aeb0085040fe5aa8da555d24e9bd5dbf246f58 Mon Sep 17 00:00:00 2001 From: xendit-devx-bot Date: Fri, 8 Mar 2024 06:19:29 +0000 Subject: [PATCH] Generated Xendit node SDK --- README.md | 4 +- docs/invoice/BankCode.md | 4 ++ docs/invoice/ChannelProperties.md | 13 ++++ docs/invoice/ChannelPropertiesCards.md | 13 ++++ docs/invoice/CreateInvoiceRequest.md | 1 + docs/invoice/DirectDebitType.md | 78 ++++++++++++++++++++++++ docs/invoice/EwalletType.md | 8 +++ docs/invoice/Invoice.md | 1 + docs/invoice/InvoicePaymentMethod.md | 2 + docs/invoice/NotificationPreference.md | 1 - index.ts | 40 ++++++------ invoice/models/BankCode.ts | 2 + invoice/models/ChannelProperties.ts | 66 ++++++++++++++++++++ invoice/models/ChannelPropertiesCards.ts | 59 ++++++++++++++++++ invoice/models/CreateInvoiceRequest.ts | 14 +++++ invoice/models/DirectDebitType.ts | 39 ++++++++++++ invoice/models/EwalletType.ts | 4 ++ invoice/models/Invoice.ts | 14 +++++ invoice/models/InvoicePaymentMethod.ts | 1 + invoice/models/NotificationPreference.ts | 8 --- invoice/models/index.ts | 2 + package.json | 10 +-- runtime.ts | 2 +- 23 files changed, 349 insertions(+), 37 deletions(-) create mode 100644 docs/invoice/ChannelProperties.md create mode 100644 docs/invoice/ChannelPropertiesCards.md create mode 100644 invoice/models/ChannelProperties.ts create mode 100644 invoice/models/ChannelPropertiesCards.ts diff --git a/README.md b/README.md index 976a4f66..db3e4c30 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: 4.2.0 +* Package version: 4.3.0 # Getting Started @@ -53,8 +53,8 @@ Find detailed API information and examples for each of our product’s by clicki * [PaymentRequest](docs/PaymentRequest.md) * [PaymentMethod](docs/PaymentMethod.md) * [Refund](docs/Refund.md) -* [Balance](docs/Balance.md) * [Transaction](docs/Transaction.md) +* [Balance](docs/Balance.md) * [Customer](docs/Customer.md) * [Payout](docs/Payout.md) diff --git a/docs/invoice/BankCode.md b/docs/invoice/BankCode.md index 4f829c17..f4a940c2 100644 --- a/docs/invoice/BankCode.md +++ b/docs/invoice/BankCode.md @@ -26,6 +26,10 @@ Representing the available bank channels used for invoice-related transactions. * `Bnc` (value: `'BNC'`) + * `Hana` (value: `'HANA'`) + + * `Muamalat` (value: `'MUAMALAT'`) + * `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/invoice/ChannelProperties.md b/docs/invoice/ChannelProperties.md new file mode 100644 index 00000000..da8b701d --- /dev/null +++ b/docs/invoice/ChannelProperties.md @@ -0,0 +1,13 @@ +# ChannelProperties + +An object representing channel-specific properties. + +## Properties + +| Name | Type | Required | Description | Examples | +|------------|:-------------:|:-------------:|-------------|:-------------:| +| **cards** |[ChannelPropertiesCards](ChannelPropertiesCards.md) | | | | | + + + +[[Back to README]](../../README.md) \ No newline at end of file diff --git a/docs/invoice/ChannelPropertiesCards.md b/docs/invoice/ChannelPropertiesCards.md new file mode 100644 index 00000000..20523309 --- /dev/null +++ b/docs/invoice/ChannelPropertiesCards.md @@ -0,0 +1,13 @@ +# ChannelPropertiesCards + +An object representing properties specific for credit card payment method. + +## Properties + +| Name | Type | Required | Description | Examples | +|------------|:-------------:|:-------------:|-------------|:-------------:| +| **allowedBins** |string[] | | An array of allowed BINs (6 or 8 digits) for credit card payments. | | | + + + +[[Back to README]](../../README.md) \ No newline at end of file diff --git a/docs/invoice/CreateInvoiceRequest.md b/docs/invoice/CreateInvoiceRequest.md index 8de07eed..e650c3f7 100644 --- a/docs/invoice/CreateInvoiceRequest.md +++ b/docs/invoice/CreateInvoiceRequest.md @@ -26,6 +26,7 @@ An object representing for an invoice creation request. | **reminderTimeUnit** |string | | The unit of the reminder time. | | | | **items** |[InvoiceItem[]](InvoiceItem.md) | | An array of items included in the invoice. | | | | **fees** |[InvoiceFee[]](InvoiceFee.md) | | An array of fees associated with the invoice. | | | +| **channelProperties** |[ChannelProperties](ChannelProperties.md) | | | | | diff --git a/docs/invoice/DirectDebitType.md b/docs/invoice/DirectDebitType.md index 6c2e1581..373abf5b 100644 --- a/docs/invoice/DirectDebitType.md +++ b/docs/invoice/DirectDebitType.md @@ -44,6 +44,84 @@ Representing the available Direct Debit channels used for invoice-related transa * `DcChinabank` (value: `'DC_CHINABANK'`) + * `DdPublicFpx` (value: `'DD_PUBLIC_FPX'`) + + * `DdAmbankFpx` (value: `'DD_AMBANK_FPX'`) + + * `DdKfhFpx` (value: `'DD_KFH_FPX'`) + + * `DdAgroFpx` (value: `'DD_AGRO_FPX'`) + + * `DdAffinFpx` (value: `'DD_AFFIN_FPX'`) + + * `DdAllianceFpx` (value: `'DD_ALLIANCE_FPX'`) + + * `DdMuamalatFpx` (value: `'DD_MUAMALAT_FPX'`) + + * `DdHlbFpx` (value: `'DD_HLB_FPX'`) + + * `DdIslamFpx` (value: `'DD_ISLAM_FPX'`) + + * `DdRakyatFpx` (value: `'DD_RAKYAT_FPX'`) + + * `DdCimbFpx` (value: `'DD_CIMB_FPX'`) + + * `DdUobFpx` (value: `'DD_UOB_FPX'`) + + * `DdBocFpx` (value: `'DD_BOC_FPX'`) + + * `DdBsnFpx` (value: `'DD_BSN_FPX'`) + + * `DdOcbcFpx` (value: `'DD_OCBC_FPX'`) + + * `DdHsbcFpx` (value: `'DD_HSBC_FPX'`) + + * `DdSchFpx` (value: `'DD_SCH_FPX'`) + + * `DdMayb2UFpx` (value: `'DD_MAYB2U_FPX'`) + + * `DdRhbFpx` (value: `'DD_RHB_FPX'`) + + * `DdUobFpxBusiness` (value: `'DD_UOB_FPX_BUSINESS'`) + + * `DdAgroFpxBusiness` (value: `'DD_AGRO_FPX_BUSINESS'`) + + * `DdAllianceFpxBusiness` (value: `'DD_ALLIANCE_FPX_BUSINESS'`) + + * `DdAmbankFpxBusiness` (value: `'DD_AMBANK_FPX_BUSINESS'`) + + * `DdIslamFpxBusiness` (value: `'DD_ISLAM_FPX_BUSINESS'`) + + * `DdMuamalatFpxBusiness` (value: `'DD_MUAMALAT_FPX_BUSINESS'`) + + * `DdHlbFpxBusiness` (value: `'DD_HLB_FPX_BUSINESS'`) + + * `DdHsbcFpxBusiness` (value: `'DD_HSBC_FPX_BUSINESS'`) + + * `DdRakyatFpxBusiness` (value: `'DD_RAKYAT_FPX_BUSINESS'`) + + * `DdKfhFpxBusiness` (value: `'DD_KFH_FPX_BUSINESS'`) + + * `DdOcbcFpxBusiness` (value: `'DD_OCBC_FPX_BUSINESS'`) + + * `DdPublicFpxBusiness` (value: `'DD_PUBLIC_FPX_BUSINESS'`) + + * `DdRhbFpxBusiness` (value: `'DD_RHB_FPX_BUSINESS'`) + + * `DdSchFpxBusiness` (value: `'DD_SCH_FPX_BUSINESS'`) + + * `DdCitibankFpxBusiness` (value: `'DD_CITIBANK_FPX_BUSINESS'`) + + * `DdBnpFpxBusiness` (value: `'DD_BNP_FPX_BUSINESS'`) + + * `DdDeutscheFpxBusiness` (value: `'DD_DEUTSCHE_FPX_BUSINESS'`) + + * `DdMayb2EFpxBusiness` (value: `'DD_MAYB2E_FPX_BUSINESS'`) + + * `DdCimbFpxBusiness` (value: `'DD_CIMB_FPX_BUSINESS'`) + + * `DdAffinFpxBusiness` (value: `'DD_AFFIN_FPX_BUSINESS'`) + * `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/invoice/EwalletType.md b/docs/invoice/EwalletType.md index 4903a6e7..cef1b26e 100644 --- a/docs/invoice/EwalletType.md +++ b/docs/invoice/EwalletType.md @@ -36,6 +36,14 @@ Representing the available eWallet channels used for invoice-related transaction * `Appota` (value: `'APPOTA'`) + * `Linepay` (value: `'LINEPAY'`) + + * `Truemoney` (value: `'TRUEMONEY'`) + + * `Wechatpay` (value: `'WECHATPAY'`) + + * `Touchngo` (value: `'TOUCHNGO'`) + * `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/invoice/Invoice.md b/docs/invoice/Invoice.md index 4cd8c317..550a7b74 100644 --- a/docs/invoice/Invoice.md +++ b/docs/invoice/Invoice.md @@ -39,6 +39,7 @@ An object representing details for an invoice. | **customer** |[CustomerObject](CustomerObject.md) | | | | | | **customerNotificationPreference** |[NotificationPreference](NotificationPreference.md) | | | | | | **fees** |[InvoiceFee[]](InvoiceFee.md) | | An array of fees associated with the invoice. | | | +| **channelProperties** |[ChannelProperties](ChannelProperties.md) | | | | | diff --git a/docs/invoice/InvoicePaymentMethod.md b/docs/invoice/InvoicePaymentMethod.md index 5811b1b9..b02fc66d 100644 --- a/docs/invoice/InvoicePaymentMethod.md +++ b/docs/invoice/InvoicePaymentMethod.md @@ -26,6 +26,8 @@ Representing the payment method used for an invoice. * `Paylater` (value: `'PAYLATER'`) + * `Cryptocurrency` (value: `'CRYPTOCURRENCY'`) + * `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/invoice/NotificationPreference.md b/docs/invoice/NotificationPreference.md index 351d2007..13fe74f0 100644 --- a/docs/invoice/NotificationPreference.md +++ b/docs/invoice/NotificationPreference.md @@ -8,7 +8,6 @@ An object representing notification preferences for different invoice events. |------------|:-------------:|:-------------:|-------------|:-------------:| | **invoiceCreated** |[NotificationChannel[]](NotificationChannel.md) | | Notification channels for when an invoice is created. | | | | **invoiceReminder** |[NotificationChannel[]](NotificationChannel.md) | | Notification channels for invoice reminders. | | | -| **invoiceExpired** |[NotificationChannel[]](NotificationChannel.md) | | Notification channels for expired invoices. | | | | **invoicePaid** |[NotificationChannel[]](NotificationChannel.md) | | Notification channels for when an invoice is paid. | | | diff --git a/index.ts b/index.ts index 3c7206fd..2cbaa132 100644 --- a/index.ts +++ b/index.ts @@ -2,20 +2,17 @@ /* eslint-disable */ export * from './runtime'; -import { Refund } from './refund'; -export { Refund } from './refund'; - -import { Balance, Transaction } from './balance_and_transaction'; -export { Balance, Transaction } from './balance_and_transaction'; +import { PaymentRequest } from './payment_request'; +export { PaymentRequest } from './payment_request'; import { Invoice } from './invoice'; export { Invoice } from './invoice'; -import { PaymentRequest } from './payment_request'; -export { PaymentRequest } from './payment_request'; +import { Transaction, Balance } from './balance_and_transaction'; +export { Transaction, Balance } from './balance_and_transaction'; -import { Customer } from './customer'; -export { Customer } from './customer'; +import { Refund } from './refund'; +export { Refund } from './refund'; import { PaymentMethod } from './payment_method'; export { PaymentMethod } from './payment_method'; @@ -23,6 +20,9 @@ export { PaymentMethod } from './payment_method'; import { Payout } from './payout'; export { Payout } from './payout'; +import { Customer } from './customer'; +export { Customer } from './customer'; + export interface XenditOpts { secretKey: string; @@ -30,14 +30,14 @@ export interface XenditOpts { } export class Xendit { opts: XenditOpts; - Refund: Refund; - Balance: Balance; - Transaction: Transaction; - Invoice: Invoice; PaymentRequest: PaymentRequest; - Customer: Customer; + Invoice: Invoice; + Transaction: Transaction; + Balance: Balance; + Refund: Refund; PaymentMethod: PaymentMethod; Payout: Payout; + Customer: Customer; constructor({ secretKey: _secretKey, xenditURL: _xenditURL }: XenditOpts) { @@ -58,21 +58,21 @@ export class Xendit { } - this.Refund = new Refund(this.opts); - - this.Balance = new Balance(this.opts); - this.Transaction = new Transaction(this.opts); + this.PaymentRequest = new PaymentRequest(this.opts); this.Invoice = new Invoice(this.opts); - this.PaymentRequest = new PaymentRequest(this.opts); + this.Transaction = new Transaction(this.opts); + this.Balance = new Balance(this.opts); - this.Customer = new Customer(this.opts); + this.Refund = new Refund(this.opts); this.PaymentMethod = new PaymentMethod(this.opts); this.Payout = new Payout(this.opts); + this.Customer = new Customer(this.opts); + } } diff --git a/invoice/models/BankCode.ts b/invoice/models/BankCode.ts index 72a1e01e..76db0f85 100644 --- a/invoice/models/BankCode.ts +++ b/invoice/models/BankCode.ts @@ -22,6 +22,8 @@ export const BankCode = { SahabatSampoerna: 'SAHABAT_SAMPOERNA', Cimb: 'CIMB', Bnc: 'BNC', + Hana: 'HANA', + Muamalat: 'MUAMALAT', XenditEnumDefaultFallback: "UNKNOWN_ENUM_VALUE" } as const; export type BankCode = typeof BankCode[keyof typeof BankCode]; diff --git a/invoice/models/ChannelProperties.ts b/invoice/models/ChannelProperties.ts new file mode 100644 index 00000000..8940310d --- /dev/null +++ b/invoice/models/ChannelProperties.ts @@ -0,0 +1,66 @@ +/* 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 { ChannelPropertiesCards } from './ChannelPropertiesCards'; +import { + ChannelPropertiesCardsFromJSON, + ChannelPropertiesCardsFromJSONTyped, + ChannelPropertiesCardsToJSON, +} from './ChannelPropertiesCards'; + +/** + * An object representing channel-specific properties. + * @export + * @interface ChannelProperties + */ +export interface ChannelProperties { + /** + * + * @type {ChannelPropertiesCards} + * @memberof ChannelProperties + */ + cards?: ChannelPropertiesCards; +} + +/** + * Check if a given object implements the ChannelProperties interface. + */ +export function instanceOfChannelProperties(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ChannelPropertiesFromJSON(json: any): ChannelProperties { + return ChannelPropertiesFromJSONTyped(json, false); +} + +export function ChannelPropertiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelProperties { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'cards': !exists(json, 'cards') ? undefined : ChannelPropertiesCardsFromJSON(json['cards']), + }; +} + +export function ChannelPropertiesToJSON(value?: ChannelProperties | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'cards': ChannelPropertiesCardsToJSON(value.cards), + }; +} + diff --git a/invoice/models/ChannelPropertiesCards.ts b/invoice/models/ChannelPropertiesCards.ts new file mode 100644 index 00000000..ce2ee702 --- /dev/null +++ b/invoice/models/ChannelPropertiesCards.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'; +/** + * An object representing properties specific for credit card payment method. + * @export + * @interface ChannelPropertiesCards + */ +export interface ChannelPropertiesCards { + /** + * An array of allowed BINs (6 or 8 digits) for credit card payments. + * @type {Array} + * @memberof ChannelPropertiesCards + */ + allowedBins?: Array; +} + +/** + * Check if a given object implements the ChannelPropertiesCards interface. + */ +export function instanceOfChannelPropertiesCards(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ChannelPropertiesCardsFromJSON(json: any): ChannelPropertiesCards { + return ChannelPropertiesCardsFromJSONTyped(json, false); +} + +export function ChannelPropertiesCardsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChannelPropertiesCards { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'allowedBins': !exists(json, 'allowed_bins') ? undefined : json['allowed_bins'], + }; +} + +export function ChannelPropertiesCardsToJSON(value?: ChannelPropertiesCards | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'allowed_bins': value.allowedBins, + }; +} + diff --git a/invoice/models/CreateInvoiceRequest.ts b/invoice/models/CreateInvoiceRequest.ts index a013c2c0..51354e41 100644 --- a/invoice/models/CreateInvoiceRequest.ts +++ b/invoice/models/CreateInvoiceRequest.ts @@ -7,6 +7,12 @@ */ import { exists, mapValues } from '../../runtime'; +import type { ChannelProperties } from './ChannelProperties'; +import { + ChannelPropertiesFromJSON, + ChannelPropertiesFromJSONTyped, + ChannelPropertiesToJSON, +} from './ChannelProperties'; import type { CustomerObject } from './CustomerObject'; import { CustomerObjectFromJSON, @@ -158,6 +164,12 @@ export interface CreateInvoiceRequest { * @memberof CreateInvoiceRequest */ fees?: Array; + /** + * + * @type {ChannelProperties} + * @memberof CreateInvoiceRequest + */ + channelProperties?: ChannelProperties; } /** @@ -201,6 +213,7 @@ export function CreateInvoiceRequestFromJSONTyped(json: any, ignoreDiscriminator 'reminderTimeUnit': !exists(json, 'reminder_time_unit') ? undefined : json['reminder_time_unit'], 'items': !exists(json, 'items') ? undefined : ((json['items'] as Array).map(InvoiceItemFromJSON)), 'fees': !exists(json, 'fees') ? undefined : ((json['fees'] as Array).map(InvoiceFeeFromJSON)), + 'channelProperties': !exists(json, 'channel_properties') ? undefined : ChannelPropertiesFromJSON(json['channel_properties']), }; } @@ -233,6 +246,7 @@ export function CreateInvoiceRequestToJSON(value?: CreateInvoiceRequest | null): 'reminder_time_unit': value.reminderTimeUnit, 'items': value.items === undefined ? undefined : ((value.items as Array).map(InvoiceItemToJSON)), 'fees': value.fees === undefined ? undefined : ((value.fees as Array).map(InvoiceFeeToJSON)), + 'channel_properties': ChannelPropertiesToJSON(value.channelProperties), }; } diff --git a/invoice/models/DirectDebitType.ts b/invoice/models/DirectDebitType.ts index 271eca19..ebc08496 100644 --- a/invoice/models/DirectDebitType.ts +++ b/invoice/models/DirectDebitType.ts @@ -31,6 +31,45 @@ export const DirectDebitType = { DdChinabank: 'DD_CHINABANK', BaChinabank: 'BA_CHINABANK', DcChinabank: 'DC_CHINABANK', + DdPublicFpx: 'DD_PUBLIC_FPX', + DdAmbankFpx: 'DD_AMBANK_FPX', + DdKfhFpx: 'DD_KFH_FPX', + DdAgroFpx: 'DD_AGRO_FPX', + DdAffinFpx: 'DD_AFFIN_FPX', + DdAllianceFpx: 'DD_ALLIANCE_FPX', + DdMuamalatFpx: 'DD_MUAMALAT_FPX', + DdHlbFpx: 'DD_HLB_FPX', + DdIslamFpx: 'DD_ISLAM_FPX', + DdRakyatFpx: 'DD_RAKYAT_FPX', + DdCimbFpx: 'DD_CIMB_FPX', + DdUobFpx: 'DD_UOB_FPX', + DdBocFpx: 'DD_BOC_FPX', + DdBsnFpx: 'DD_BSN_FPX', + DdOcbcFpx: 'DD_OCBC_FPX', + DdHsbcFpx: 'DD_HSBC_FPX', + DdSchFpx: 'DD_SCH_FPX', + DdMayb2UFpx: 'DD_MAYB2U_FPX', + DdRhbFpx: 'DD_RHB_FPX', + DdUobFpxBusiness: 'DD_UOB_FPX_BUSINESS', + DdAgroFpxBusiness: 'DD_AGRO_FPX_BUSINESS', + DdAllianceFpxBusiness: 'DD_ALLIANCE_FPX_BUSINESS', + DdAmbankFpxBusiness: 'DD_AMBANK_FPX_BUSINESS', + DdIslamFpxBusiness: 'DD_ISLAM_FPX_BUSINESS', + DdMuamalatFpxBusiness: 'DD_MUAMALAT_FPX_BUSINESS', + DdHlbFpxBusiness: 'DD_HLB_FPX_BUSINESS', + DdHsbcFpxBusiness: 'DD_HSBC_FPX_BUSINESS', + DdRakyatFpxBusiness: 'DD_RAKYAT_FPX_BUSINESS', + DdKfhFpxBusiness: 'DD_KFH_FPX_BUSINESS', + DdOcbcFpxBusiness: 'DD_OCBC_FPX_BUSINESS', + DdPublicFpxBusiness: 'DD_PUBLIC_FPX_BUSINESS', + DdRhbFpxBusiness: 'DD_RHB_FPX_BUSINESS', + DdSchFpxBusiness: 'DD_SCH_FPX_BUSINESS', + DdCitibankFpxBusiness: 'DD_CITIBANK_FPX_BUSINESS', + DdBnpFpxBusiness: 'DD_BNP_FPX_BUSINESS', + DdDeutscheFpxBusiness: 'DD_DEUTSCHE_FPX_BUSINESS', + DdMayb2EFpxBusiness: 'DD_MAYB2E_FPX_BUSINESS', + DdCimbFpxBusiness: 'DD_CIMB_FPX_BUSINESS', + DdAffinFpxBusiness: 'DD_AFFIN_FPX_BUSINESS', XenditEnumDefaultFallback: "UNKNOWN_ENUM_VALUE" } as const; export type DirectDebitType = typeof DirectDebitType[keyof typeof DirectDebitType]; diff --git a/invoice/models/EwalletType.ts b/invoice/models/EwalletType.ts index a79924fe..50164565 100644 --- a/invoice/models/EwalletType.ts +++ b/invoice/models/EwalletType.ts @@ -27,6 +27,10 @@ export const EwalletType = { Viettelpay: 'VIETTELPAY', Vnptwallet: 'VNPTWALLET', Appota: 'APPOTA', + Linepay: 'LINEPAY', + Truemoney: 'TRUEMONEY', + Wechatpay: 'WECHATPAY', + Touchngo: 'TOUCHNGO', XenditEnumDefaultFallback: "UNKNOWN_ENUM_VALUE" } as const; export type EwalletType = typeof EwalletType[keyof typeof EwalletType]; diff --git a/invoice/models/Invoice.ts b/invoice/models/Invoice.ts index f08a1a31..2427a4bb 100644 --- a/invoice/models/Invoice.ts +++ b/invoice/models/Invoice.ts @@ -13,6 +13,12 @@ import { BankFromJSONTyped, BankToJSON, } from './Bank'; +import type { ChannelProperties } from './ChannelProperties'; +import { + ChannelPropertiesFromJSON, + ChannelPropertiesFromJSONTyped, + ChannelPropertiesToJSON, +} from './ChannelProperties'; import type { CustomerObject } from './CustomerObject'; import { CustomerObjectFromJSON, @@ -290,6 +296,12 @@ export interface Invoice { * @memberof Invoice */ fees?: Array; + /** + * + * @type {ChannelProperties} + * @memberof Invoice + */ + channelProperties?: ChannelProperties; } /** @@ -361,6 +373,7 @@ export function InvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): I 'customer': !exists(json, 'customer') ? undefined : CustomerObjectFromJSON(json['customer']), 'customerNotificationPreference': !exists(json, 'customer_notification_preference') ? undefined : NotificationPreferenceFromJSON(json['customer_notification_preference']), 'fees': !exists(json, 'fees') ? undefined : ((json['fees'] as Array).map(InvoiceFeeFromJSON)), + 'channelProperties': !exists(json, 'channel_properties') ? undefined : ChannelPropertiesFromJSON(json['channel_properties']), }; } @@ -406,6 +419,7 @@ export function InvoiceToJSON(value?: Invoice | null): any { 'customer': CustomerObjectToJSON(value.customer), 'customer_notification_preference': NotificationPreferenceToJSON(value.customerNotificationPreference), 'fees': value.fees === undefined ? undefined : ((value.fees as Array).map(InvoiceFeeToJSON)), + 'channel_properties': ChannelPropertiesToJSON(value.channelProperties), }; } diff --git a/invoice/models/InvoicePaymentMethod.ts b/invoice/models/InvoicePaymentMethod.ts index 72767776..2fc06cf3 100644 --- a/invoice/models/InvoicePaymentMethod.ts +++ b/invoice/models/InvoicePaymentMethod.ts @@ -22,6 +22,7 @@ export const InvoicePaymentMethod = { DirectDebit: 'DIRECT_DEBIT', BankTransfer: 'BANK_TRANSFER', Paylater: 'PAYLATER', + Cryptocurrency: 'CRYPTOCURRENCY', XenditEnumDefaultFallback: "UNKNOWN_ENUM_VALUE" } as const; export type InvoicePaymentMethod = typeof InvoicePaymentMethod[keyof typeof InvoicePaymentMethod]; diff --git a/invoice/models/NotificationPreference.ts b/invoice/models/NotificationPreference.ts index bdf3d1ff..463e2935 100644 --- a/invoice/models/NotificationPreference.ts +++ b/invoice/models/NotificationPreference.ts @@ -32,12 +32,6 @@ export interface NotificationPreference { * @memberof NotificationPreference */ invoiceReminder?: Array; - /** - * Notification channels for expired invoices. - * @type {Array} - * @memberof NotificationPreference - */ - invoiceExpired?: Array; /** * Notification channels for when an invoice is paid. * @type {Array} @@ -67,7 +61,6 @@ export function NotificationPreferenceFromJSONTyped(json: any, ignoreDiscriminat 'invoiceCreated': !exists(json, 'invoice_created') ? undefined : ((json['invoice_created'] as Array).map(NotificationChannelFromJSON)), 'invoiceReminder': !exists(json, 'invoice_reminder') ? undefined : ((json['invoice_reminder'] as Array).map(NotificationChannelFromJSON)), - 'invoiceExpired': !exists(json, 'invoice_expired') ? undefined : ((json['invoice_expired'] as Array).map(NotificationChannelFromJSON)), 'invoicePaid': !exists(json, 'invoice_paid') ? undefined : ((json['invoice_paid'] as Array).map(NotificationChannelFromJSON)), }; } @@ -83,7 +76,6 @@ export function NotificationPreferenceToJSON(value?: NotificationPreference | nu 'invoice_created': value.invoiceCreated === undefined ? undefined : ((value.invoiceCreated as Array).map(NotificationChannelToJSON)), 'invoice_reminder': value.invoiceReminder === undefined ? undefined : ((value.invoiceReminder as Array).map(NotificationChannelToJSON)), - 'invoice_expired': value.invoiceExpired === undefined ? undefined : ((value.invoiceExpired as Array).map(NotificationChannelToJSON)), 'invoice_paid': value.invoicePaid === undefined ? undefined : ((value.invoicePaid as Array).map(NotificationChannelToJSON)), }; } diff --git a/invoice/models/index.ts b/invoice/models/index.ts index 2e84391d..8c75b906 100644 --- a/invoice/models/index.ts +++ b/invoice/models/index.ts @@ -5,6 +5,8 @@ export * from './AlternativeDisplayItem'; export * from './BadRequestError'; export * from './Bank'; export * from './BankCode'; +export * from './ChannelProperties'; +export * from './ChannelPropertiesCards'; export * from './CreateInvoiceRequest'; export * from './CustomerObject'; export * from './DirectDebit'; diff --git a/package.json b/package.json index 95e7330f..9680b7ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xendit-node", - "version": "4.2.0", + "version": "4.3.0", "description": "OpenAPI client for xendit-node", "author": "OpenAPI-Generator", "repository": { @@ -8,13 +8,13 @@ "url": "https://github.com/xendit/xendit-node.git" }, "files": [ - "refund/**", - "balance_and_transaction/**", - "invoice/**", "payment_request/**", - "customer/**", + "invoice/**", + "balance_and_transaction/**", + "refund/**", "payment_method/**", "payout/**", + "customer/**", "docs/**", "images/**", "README.md", diff --git a/runtime.ts b/runtime.ts index db1f6b4c..48139cd8 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'] = '4.2.0'; + headers['xendit-lib-ver'] = '4.3.0'; const initParams = { method: context.method,