Skip to content

Commit

Permalink
Generated Xendit node SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
xendit-devx-bot committed Mar 8, 2024
1 parent 06a1626 commit f2aeb00
Show file tree
Hide file tree
Showing 23 changed files with 349 additions and 37 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions docs/invoice/BankCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 13 additions & 0 deletions docs/invoice/ChannelProperties.md
Original file line number Diff line number Diff line change
@@ -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)
13 changes: 13 additions & 0 deletions docs/invoice/ChannelPropertiesCards.md
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions docs/invoice/CreateInvoiceRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) | | | | |



Expand Down
78 changes: 78 additions & 0 deletions docs/invoice/DirectDebitType.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions docs/invoice/EwalletType.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions docs/invoice/Invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) | | | | |



Expand Down
2 changes: 2 additions & 0 deletions docs/invoice/InvoicePaymentMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion docs/invoice/NotificationPreference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | | |


Expand Down
40 changes: 20 additions & 20 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@
/* 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';

import { Payout } from './payout';
export { Payout } from './payout';

import { Customer } from './customer';
export { Customer } from './customer';


export interface XenditOpts {
secretKey: string;
xenditURL?: string;
}
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) {
Expand All @@ -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);

}
}

Expand Down
2 changes: 2 additions & 0 deletions invoice/models/BankCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
66 changes: 66 additions & 0 deletions invoice/models/ChannelProperties.ts
Original file line number Diff line number Diff line change
@@ -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),
};
}

Loading

0 comments on commit f2aeb00

Please sign in to comment.