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 Apr 1, 2024
1 parent f2aeb00 commit 85c741b
Show file tree
Hide file tree
Showing 60 changed files with 663 additions and 97 deletions.
6 changes: 6 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ docs/payment_request/Capture.md
docs/payment_request/CaptureListResponse.md
docs/payment_request/CaptureParameters.md
docs/payment_request/Card.md
docs/payment_request/CardChannelCode.md
docs/payment_request/CardChannelProperties.md
docs/payment_request/CardInformation.md
docs/payment_request/CardParameters.md
docs/payment_request/CardVerificationResults.md
docs/payment_request/CardVerificationResultsThreeDSecure.md
docs/payment_request/DirectDebit.md
Expand Down Expand Up @@ -59,6 +61,7 @@ docs/payment_request/PaymentRequestParametersChannelProperties.md
docs/payment_request/PaymentRequestParametersChannelPropertiesAllOf.md
docs/payment_request/PaymentRequestShippingInformation.md
docs/payment_request/PaymentRequestStatus.md
docs/payment_request/PaymentSimulation.md
docs/payment_request/QrCode.md
docs/payment_request/QrCodeChannelCode.md
docs/payment_request/QrCodeChannelProperties.md
Expand All @@ -80,8 +83,10 @@ payment_request/models/Capture.ts
payment_request/models/CaptureListResponse.ts
payment_request/models/CaptureParameters.ts
payment_request/models/Card.ts
payment_request/models/CardChannelCode.ts
payment_request/models/CardChannelProperties.ts
payment_request/models/CardInformation.ts
payment_request/models/CardParameters.ts
payment_request/models/CardVerificationResults.ts
payment_request/models/CardVerificationResultsThreeDSecure.ts
payment_request/models/DirectDebit.ts
Expand Down Expand Up @@ -131,6 +136,7 @@ payment_request/models/PaymentRequestParametersChannelProperties.ts
payment_request/models/PaymentRequestParametersChannelPropertiesAllOf.ts
payment_request/models/PaymentRequestShippingInformation.ts
payment_request/models/PaymentRequestStatus.ts
payment_request/models/PaymentSimulation.ts
payment_request/models/QRCode.ts
payment_request/models/QRCodeChannelCode.ts
payment_request/models/QRCodeChannelProperties.ts
Expand Down
2 changes: 1 addition & 1 deletion 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.3.0
* Package version: 5.0.0

# Getting Started

Expand Down
5 changes: 5 additions & 0 deletions balance_and_transaction/apis/Balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
export interface GetBalanceRequest {
accountType?: GetBalanceAccountTypeEnum;
currency?: string;
atTimestamp?: Date;
forUserId?: string;
}

Expand Down Expand Up @@ -59,6 +60,10 @@ export class BalanceApi extends runtime.BaseAPI {
queryParameters['currency'] = requestParameters.currency;
}

if (requestParameters.atTimestamp !== undefined) {
queryParameters['at_timestamp'] = (requestParameters.atTimestamp as any).toISOString();
}

const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":");

Expand Down
3 changes: 2 additions & 1 deletion balance_and_transaction/models/FeeResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export const FeeResponseStatusEnum = {
Pending: 'PENDING',
Completed: 'COMPLETED',
Canceled: 'CANCELED',
Reversed: 'REVERSED'
Reversed: 'REVERSED',
NotApplicable: 'NOT_APPLICABLE'
} as const;
export type FeeResponseStatusEnum = typeof FeeResponseStatusEnum[keyof typeof FeeResponseStatusEnum];

Expand Down
1 change: 1 addition & 0 deletions docs/Balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ All URIs are relative to https://api.xendit.co, except if the operation defines
|-----------|:----------:|:----------:|-----------|
| **accountType** | [CASH, HOLDING, TAX] | | ['CASH'] |
| **currency** | **string** | | |
| **atTimestamp** | **Date** | | |
| **forUserId** | **string** | | |

### Usage Example
Expand Down
24 changes: 24 additions & 0 deletions docs/PaymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ All URIs are relative to https://api.xendit.co, except if the operation defines
| [**capturePaymentRequest()**](PaymentRequest.md#capturepaymentrequest-function) | **POST** /payment_requests/{paymentRequestId}/captures | Payment Request Capture |
| [**authorizePaymentRequest()**](PaymentRequest.md#authorizepaymentrequest-function) | **POST** /payment_requests/{paymentRequestId}/auth | Payment Request Authorize |
| [**resendPaymentRequestAuth()**](PaymentRequest.md#resendpaymentrequestauth-function) | **POST** /payment_requests/{paymentRequestId}/auth/resend | Payment Request Resend Auth |
| [**simulatePaymentRequestPayment()**](PaymentRequest.md#simulatepaymentrequestpayment-function) | **POST** /payment_requests/{paymentRequestId}/payments/simulate | Payment Request Simulate Payment |


## `createPaymentRequest()` Function
Expand Down Expand Up @@ -317,6 +318,29 @@ const response: PaymentRequest = await xenditPaymentRequestClient.resendPaymentR
paymentRequestId: "pr-1fdaf346-dd2e-4b6c-b938-124c7167a822",
)
```
## `simulatePaymentRequestPayment()` Function
### Function Signature
| Name | Value |
|--------------------|:-------------:|
| Function Name | `simulatePaymentRequestPayment` |
| Request Parameters | [SimulatePaymentRequestPaymentRequest](#request-parameters--SimulatePaymentRequestPaymentRequest) |
| Return Type | [PaymentSimulation](payment_request/PaymentSimulation.md) |
### Request Parameters - SimulatePaymentRequestPaymentRequest
| Field Name | Type | Required | Default |
|-----------|:----------:|:----------:|-----------|
| **paymentRequestId** | **string** | ☑️ | |
### Usage Example
```typescript
import { PaymentSimulation } from 'xendit-node/payment_request/models'

const response: PaymentSimulation = await xenditPaymentRequestClient.simulatePaymentRequestPayment({
paymentRequestId: "pr-1fdaf346-dd2e-4b6c-b938-124c7167a822",
)
```
## Callback Objects
Use the following callback objects provided by Xendit to receive callbacks (also known as webhooks) that Xendit sends you on events, such as successful payments. Note that the example is meant to illustrate the contents of the callback object -- you will not need to instantiate these objects in practice
Expand Down
3 changes: 2 additions & 1 deletion docs/payment_method/Card.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Card Payment Method Details

| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **currency** |string | ☑️ | | | |
| **channelCode** |[CardChannelCode](CardChannelCode.md) | | | | |
| **currency** |string | | | | |
| **channelProperties** |[CardChannelProperties](CardChannelProperties.md) | ☑️ | | | |
| **cardInformation** |[TokenizedCardInformation](TokenizedCardInformation.md) | | | | |
| **cardVerificationResults** |[CardVerificationResults](CardVerificationResults.md) | | | | |
Expand Down
16 changes: 16 additions & 0 deletions docs/payment_method/CardChannelCode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CardChannelCode

Card Channel Code


## Enum


* `Gpn` (value: `'GPN'`)

* `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.


[[Back to README]](../../README.md)
1 change: 1 addition & 0 deletions docs/payment_method/CardChannelProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Card Channel Properties
| **successReturnUrl** |string | | URL where the end-customer is redirected if the authorization is successful | | |
| **failureReturnUrl** |string | | URL where the end-customer is redirected if the authorization failed | | |
| **cardonfileType** |string | | Type of “credential-on-file” / “card-on-file” payment being made. Indicate that this payment uses a previously linked Payment Method for charging. | | |
| **expiresAt** |Date | | | | |



Expand Down
6 changes: 6 additions & 0 deletions docs/payment_method/DirectDebitChannelCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Direct Debit Channel Code

* `Bpi` (value: `'BPI'`)

* `AutodebitBpi` (value: `'AUTODEBIT_BPI'`)

* `BpiRecurring` (value: `'BPI_RECURRING'`)

* `Bri` (value: `'BRI'`)

* `Bni` (value: `'BNI'`)
Expand Down Expand Up @@ -52,6 +56,8 @@ Direct Debit Channel Code

* `AutodebitUbp` (value: `'AUTODEBIT_UBP'`)

* `UbpDebitPull` (value: `'UBP_DEBIT_PULL'`)

* `AffinFpx` (value: `'AFFIN_FPX'`)

* `AgroFpx` (value: `'AGRO_FPX'`)
Expand Down
2 changes: 1 addition & 1 deletion docs/payment_method/EWalletChannelCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ EWallet Channel Code

* `Alipay` (value: `'ALIPAY'`)

* `Touchandgo` (value: `'TOUCHANDGO'`)
* `Touchngo` (value: `'TOUCHNGO'`)

* `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`)

Expand Down
1 change: 1 addition & 0 deletions docs/payment_method/EWalletChannelProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ EWallet Channel Properties
| **successReturnUrl** |string | | URL where the end-customer is redirected if the authorization is successful | | |
| **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 | | |
| **pendingReturnUrl** |string | | URL where the end-customer is redirected if the authorization is pending | | |
| **mobileNumber** |string | | Mobile number of customer in E.164 format (e.g. +628123123123). For OVO one time payment use only. | | |
| **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. | | |
| **cashtag** |string | | Available for JENIUSPAY only | | |
Expand Down
2 changes: 2 additions & 0 deletions docs/payment_method/QrCodeChannelCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ QR Code Channel Code

* `Linkaja` (value: `'LINKAJA'`)

* `Xendit` (value: `'XENDIT'`)

* `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
20 changes: 11 additions & 9 deletions docs/payment_method/TokenizedCardInformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ Tokenized Card Information

| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **tokenId** |string | ☑️ | | | |
| **maskedCardNumber** |string | ☑️ | 1st 6 and last 4 digits of the card | | |
| **tokenId** |string | | | | |
| **maskedCardNumber** |string | | 1st 6 and last 4 digits of the card | | |
| **cardholderName** |string | | Cardholder name is optional but recommended for 3DS 2 / AVS verification | | |
| **expiryMonth** |string | ☑️ | Card expiry month in MM format | | |
| **expiryYear** |string | ☑️ | Card expiry month in YY format | | |
| **fingerprint** |string | ☑️ | Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. | | |
| **type** |string | ☑️ | Whether the card is a credit or debit card | | |
| **network** |string | ☑️ | Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA | | |
| **country** |string | ☑️ | Country where the card was issued ISO 3166-1 Alpha-2 | | |
| **issuer** |string | ☑️ | Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” | | |
| **expiryMonth** |string | | Card expiry month in MM format | | |
| **expiryYear** |string | | Card expiry month in YY format | | |
| **fingerprint** |string | | Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. | | |
| **type** |string | | Whether the card is a credit or debit card | | |
| **network** |string | | Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA | | |
| **country** |string | | Country where the card was issued ISO 3166-1 Alpha-2 | | |
| **issuer** |string | | Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” | | |
| **cardNumber** |string | | | | |
| **oneTimeToken** |string | | | | |



Expand Down
6 changes: 6 additions & 0 deletions docs/payment_method/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
5 changes: 3 additions & 2 deletions docs/payment_request/Card.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **currency** |[PaymentRequestCurrency](PaymentRequestCurrency.md) | ☑️ | | | |
| **channelCode** |[CardChannelCode](CardChannelCode.md) | | | | |
| **currency** |[PaymentRequestCurrency](PaymentRequestCurrency.md) | | | | |
| **channelProperties** |[CardChannelProperties](CardChannelProperties.md) | ☑️ | | | |
| **cardInformation** |[CardInformation](CardInformation.md) | ☑️ | | | |
| **cardInformation** |[CardInformation](CardInformation.md) | | | | |
| **cardVerificationResults** |[CardVerificationResults](CardVerificationResults.md) | | | | |


Expand Down
16 changes: 16 additions & 0 deletions docs/payment_request/CardChannelCode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CardChannelCode

Card Channel Code


## Enum


* `Gpn` (value: `'GPN'`)

* `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.


[[Back to README]](../../README.md)
1 change: 1 addition & 0 deletions docs/payment_request/CardChannelProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Card Channel Properties
| **failureReturnUrl** |string | | URL where the end-customer is redirected if the authorization failed | | |
| **cardonfileType** |string | | Type of “credential-on-file” / “card-on-file” payment being made. Indicate that this payment uses a previously linked Payment Method for charging. | | |
| **merchantIdTag** |string | | Tag for a Merchant ID that you want to associate this payment with. For merchants using their own MIDs to specify which MID they want to use | | |
| **expiresAt** |Date | | | | |



Expand Down
10 changes: 6 additions & 4 deletions docs/payment_request/CardInformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ Card Information

| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **tokenId** |string | ☑️ | | | |
| **maskedCardNumber** |string | ☑️ | 1st 6 and last 4 digits of the card | | |
| **expiryMonth** |string | ☑️ | Card expiry month in MM format | | |
| **expiryYear** |string | ☑️ | Card expiry month in YY format | | |
| **tokenId** |string | | | | |
| **maskedCardNumber** |string | | 1st 6 and last 4 digits of the card | | |
| **expiryMonth** |string | | Card expiry month in MM format | | |
| **expiryYear** |string | | Card expiry month in YY format | | |
| **cardholderName** |string | | Cardholder name | | |
| **fingerprint** |string | | | | |
| **type** |string | | | | |
| **network** |string | | | | |
| **country** |string | | | | |
| **issuer** |string | | | | |
| **cardNumber** |string | | | | |
| **oneTimeToken** |string | | | | |



Expand Down
14 changes: 14 additions & 0 deletions docs/payment_request/CardParameters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CardParameters



## Properties

| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **channelProperties** |[CardChannelProperties](CardChannelProperties.md) | ☑️ | | | |
| **cardInformation** |[CardInformation](CardInformation.md) | | | | |



[[Back to README]](../../README.md)
36 changes: 35 additions & 1 deletion docs/payment_request/DirectDebitChannelCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Direct Debit Channel Code

* `Bpi` (value: `'BPI'`)

* `BpiRecurring` (value: `'BPI_RECURRING'`)

* `Bdo` (value: `'BDO'`)

* `Cimbniaga` (value: `'CIMBNIAGA'`)
Expand All @@ -28,7 +30,9 @@ Direct Debit Channel Code

* `Ubp` (value: `'UBP'`)

* `AutodebitUbp` (value: `'AUTODEBIT_UBP'`)
* `UbpEada` (value: `'UBP_EADA'`)

* `UbpDebitPull` (value: `'UBP_DEBIT_PULL'`)

* `Chinabank` (value: `'CHINABANK'`)

Expand Down Expand Up @@ -132,6 +136,36 @@ Direct Debit Channel Code

* `UobFpxBusiness` (value: `'UOB_FPX_BUSINESS'`)

* `BdoOnlineBanking` (value: `'BDO_ONLINE_BANKING'`)

* `BpiOnlineBanking` (value: `'BPI_ONLINE_BANKING'`)

* `UnionbankOnlineBanking` (value: `'UNIONBANK_ONLINE_BANKING'`)

* `BocOnlineBanking` (value: `'BOC_ONLINE_BANKING'`)

* `ChinabankOnlineBanking` (value: `'CHINABANK_ONLINE_BANKING'`)

* `InstapayOnlineBanking` (value: `'INSTAPAY_ONLINE_BANKING'`)

* `LandbankOnlineBanking` (value: `'LANDBANK_ONLINE_BANKING'`)

* `MaybankOnlineBanking` (value: `'MAYBANK_ONLINE_BANKING'`)

* `MetrobankOnlineBanking` (value: `'METROBANK_ONLINE_BANKING'`)

* `PnbOnlineBanking` (value: `'PNB_ONLINE_BANKING'`)

* `PsbankOnlineBanking` (value: `'PSBANK_ONLINE_BANKING'`)

* `PesonetOnlineBanking` (value: `'PESONET_ONLINE_BANKING'`)

* `RcbcOnlineBanking` (value: `'RCBC_ONLINE_BANKING'`)

* `RobinsonsBankOnlineBanking` (value: `'ROBINSONS_BANK_ONLINE_BANKING'`)

* `SecurityBankOnlineBanking` (value: `'SECURITY_BANK_ONLINE_BANKING'`)

* `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/DirectDebitChannelProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

| Name | Type | Required | Description | Examples |
|------------|:-------------:|:-------------:|-------------|:-------------:|
| **email** |string | | Email address of the customer that is registered to the partner channel | | |
| **mobileNumber** |string | | Mobile number of the customer registered to the partner channel | | |
| **successReturnUrl** |string | | | | |
| **failureReturnUrl** |string | | | | |
| **identityDocumentNumber** |string | | | | |
| **accountNumber** |string | | | | |
| **cardLastFour** |string | | Last four digits of the debit card | | |
| **cardExpiry** |string | | Expiry month and year of the debit card (in MM/YY format) | | |
| **email** |string | | Email address of the customer that is registered to the partner channel | | |



Expand Down
Loading

0 comments on commit 85c741b

Please sign in to comment.