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 Dec 11, 2023
1 parent 2114b60 commit 6e25a69
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 30 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.0.0
* Package version: 4.1.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
10 changes: 10 additions & 0 deletions docs/invoice/EwalletType.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ Representing the available eWallet channels used for invoice-related transaction

* `Jeniuspay` (value: `'JENIUSPAY'`)

* `Momo` (value: `'MOMO'`)

* `Zalopay` (value: `'ZALOPAY'`)

* `Viettelpay` (value: `'VIETTELPAY'`)

* `Vnptwallet` (value: `'VNPTWALLET'`)

* `Appota` (value: `'APPOTA'`)

* `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
2 changes: 1 addition & 1 deletion docs/payment_request/PaymentCallbackData.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Represents the actual funds transaction/attempt made to a payment method
| **paymentMethod** |[PaymentMethod](PaymentMethod.md) | ☑️ | | | |
| **channelProperties** |[PaymentRequestChannelProperties](PaymentRequestChannelProperties.md) | | | | |
| **paymentDetail** |object | | | | |
| **failureCode** |object | | | | |
| **failureCode** |string | | | | |
| **created** |string | ☑️ | | | |
| **updated** |string | ☑️ | | | |
| **metadata** |object | | | | |
Expand Down
2 changes: 2 additions & 0 deletions docs/payment_request/QrCodeChannelCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ QR Code Channel Code
## Enum


* `Qris` (value: `'QRIS'`)

* `Dana` (value: `'DANA'`)

* `Rcbc` (value: `'RCBC'`)
Expand Down
6 changes: 6 additions & 0 deletions docs/payment_request/VirtualAccountChannelCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Virtual Account Channel Code

* `Ambank` (value: `'AMBANK'`)

* `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
40 changes: 20 additions & 20 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ export * from './runtime';
import { Invoice } from './invoice';
export { Invoice } from './invoice';

import { Balance, Transaction } from './balance_and_transaction';
export { Balance, Transaction } from './balance_and_transaction';

import { Refund } from './refund';
export { Refund } from './refund';

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

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';

import { PaymentMethod } from './payment_method';
export { PaymentMethod } from './payment_method';

import { PaymentRequest } from './payment_request';
export { PaymentRequest } from './payment_request';

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


export interface XenditOpts {
secretKey: string;
Expand All @@ -31,13 +31,13 @@ export interface XenditOpts {
export class Xendit {
opts: XenditOpts;
Invoice: Invoice;
Balance: Balance;
Transaction: Transaction;
Refund: Refund;
Payout: Payout;
PaymentRequest: PaymentRequest;
Customer: Customer;
Transaction: Transaction;
Balance: Balance;
PaymentMethod: PaymentMethod;
PaymentRequest: PaymentRequest;
Payout: Payout;


constructor({ secretKey: _secretKey, xenditURL: _xenditURL }: XenditOpts) {
Expand All @@ -60,19 +60,19 @@ export class Xendit {

this.Invoice = new Invoice(this.opts);

this.Balance = new Balance(this.opts);
this.Transaction = new Transaction(this.opts);

this.Refund = new Refund(this.opts);

this.Payout = new Payout(this.opts);

this.PaymentRequest = new PaymentRequest(this.opts);

this.Customer = new Customer(this.opts);

this.Transaction = new Transaction(this.opts);
this.Balance = new Balance(this.opts);

this.PaymentMethod = new PaymentMethod(this.opts);

this.PaymentRequest = new PaymentRequest(this.opts);

this.Payout = new Payout(this.opts);

}
}

Expand Down
5 changes: 5 additions & 0 deletions invoice/models/EwalletType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export const EwalletType = {
Astrapay: 'ASTRAPAY',
Nexcash: 'NEXCASH',
Jeniuspay: 'JENIUSPAY',
Momo: 'MOMO',
Zalopay: 'ZALOPAY',
Viettelpay: 'VIETTELPAY',
Vnptwallet: 'VNPTWALLET',
Appota: 'APPOTA',
XenditEnumDefaultFallback: "UNKNOWN_ENUM_VALUE"
} as const;
export type EwalletType = typeof EwalletType[keyof typeof EwalletType];
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xendit-node",
"version": "4.0.0",
"version": "4.1.0",
"description": "OpenAPI client for xendit-node",
"author": "OpenAPI-Generator",
"repository": {
Expand All @@ -9,12 +9,12 @@
},
"files": [
"invoice/**",
"balance_and_transaction/**",
"refund/**",
"payout/**",
"payment_request/**",
"customer/**",
"balance_and_transaction/**",
"payment_method/**",
"payment_request/**",
"payout/**",
"docs/**",
"images/**",
"README.md",
Expand Down
4 changes: 2 additions & 2 deletions payment_request/models/PaymentCallbackData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export interface PaymentCallbackData {
paymentDetail?: object | null;
/**
*
* @type {object}
* @type {string}
* @memberof PaymentCallbackData
*/
failureCode?: object | null;
failureCode?: string | null;
/**
*
* @type {string}
Expand Down
1 change: 1 addition & 0 deletions payment_request/models/QRCodeChannelCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @export
*/
export const QRCodeChannelCode = {
Qris: 'QRIS',
Dana: 'DANA',
Rcbc: 'RCBC',
Linkaja: 'LINKAJA',
Expand Down
3 changes: 3 additions & 0 deletions payment_request/models/VirtualAccountChannelCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export const VirtualAccountChannelCode = {
Msb: 'MSB',
StandardChartered: 'STANDARD_CHARTERED',
Ambank: 'AMBANK',
Bnc: 'BNC',
Hana: 'HANA',
Muamalat: 'MUAMALAT',
XenditEnumDefaultFallback: "UNKNOWN_ENUM_VALUE"
} as const;
export type VirtualAccountChannelCode = typeof VirtualAccountChannelCode[keyof typeof VirtualAccountChannelCode];
Expand Down
2 changes: 1 addition & 1 deletion runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.0';
headers['xendit-lib-ver'] = '4.1.0';

const initParams = {
method: context.method,
Expand Down

0 comments on commit 6e25a69

Please sign in to comment.