xendit-node
Advanced tools
Comparing version 1.14.0 to 1.15.0
{ | ||
"name": "xendit-node", | ||
"version": "1.14.0", | ||
"version": "1.15.0", | ||
"description": "NodeJS client for Xendit API", | ||
@@ -54,3 +54,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"node-fetch": "^2.6.0" | ||
"node-fetch": "^2.6.1" | ||
}, | ||
@@ -57,0 +57,0 @@ "devDependencies": { |
@@ -660,3 +660,3 @@ # Xendit API Node.js Client | ||
channelCode?: ChannelCode; | ||
channelProperties?: OVOChannelProps | PaymayaChannelProps | OtherChannelProps; | ||
channelProperties?: ChannelProps; | ||
customerID?: string; | ||
@@ -663,0 +663,0 @@ basket?: Basket[]; |
@@ -34,16 +34,10 @@ import { XenditOptions } from '../xendit_opts'; | ||
interface OVOChannelProps { | ||
mobileNumber: string; | ||
interface ChannelProps { | ||
mobileNumber?: string; | ||
successRedirectURL?: string; | ||
failureRedirectURL?: string; | ||
cancelRedirectURL?: string; | ||
redeemPoints?: string; | ||
} | ||
interface PaymayaChannelProps { | ||
successRedirectURL: string; | ||
failureRedirectURL: string; | ||
cancelRedirectURL: string; | ||
} | ||
interface OtherChannelProps { | ||
successRedirectURL: string; | ||
} | ||
interface Basket { | ||
@@ -94,6 +88,3 @@ referenceID: string; | ||
channelCode?: ChannelCode; | ||
channelProperties?: | ||
| OVOChannelProps | ||
| PaymayaChannelProps | ||
| OtherChannelProps; | ||
channelProperties?: ChannelProps; | ||
customerID?: string; | ||
@@ -100,0 +91,0 @@ basket?: Basket[]; |
@@ -156,16 +156,11 @@ const { | ||
channel_code: data.channelCode, | ||
channel_properties: | ||
data.channelCode === 'ID_OVO' | ||
? { | ||
mobile_number: data.channelProperties.mobileNumber, | ||
} | ||
: data.channelCode === 'PH_PAYMAYA' | ||
? { | ||
success_redirect_url: data.channelProperties.successRedirectURL, | ||
failure_redirect_url: data.channelProperties.failureRedirectURL, | ||
cancel_redirect_url: data.channelProperties.cancelRedirectURL, | ||
} | ||
: { | ||
success_redirect_url: data.channelProperties.successRedirectURL, | ||
}, | ||
channel_properties: data.channelProperties | ||
? { | ||
mobile_number: data.channelProperties.mobileNumber, | ||
success_redirect_url: data.channelProperties.successRedirectURL, | ||
failure_redirect_url: data.channelProperties.failureRedirectURL, | ||
cancel_redirect_url: data.channelProperties.cancelRedirectURL, | ||
redeem_points: data.channelProperties.redeemPoints, | ||
} | ||
: data.channelProperties, | ||
customer_id: data.customerID, | ||
@@ -172,0 +167,0 @@ basket: data.basket |
@@ -43,2 +43,3 @@ enum Interval { | ||
missedPaymentAction?: Action; | ||
rescheduleAt?: Date; | ||
}): Promise<object>; |
@@ -80,2 +80,5 @@ const { promWithJsErr, Validate, fetchWithHTTPErr, Auth } = require('../utils'); | ||
missed_payment_action: data.missedPaymentAction, | ||
reschedule_at: data.rescheduleAt | ||
? data.rescheduleAt.toISOString() | ||
: undefined, | ||
}), | ||
@@ -82,0 +85,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166618
4521
Updatednode-fetch@^2.6.1