xendit-node
Advanced tools
Comparing version 1.13.0 to 1.14.0
{ | ||
"name": "xendit-node", | ||
"version": "1.13.0", | ||
"version": "1.14.0", | ||
"description": "NodeJS client for Xendit API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -179,3 +179,3 @@ # Xendit API Node.js Client | ||
```ts | ||
card.getCharge(data: { chargeID: string }) | ||
card.getCharge(data: { chargeID: string; forUserID?: string }) | ||
``` | ||
@@ -182,0 +182,0 @@ |
@@ -23,2 +23,5 @@ export function createCharge(data: { | ||
export function getCharge(data: { chargeID: string }): Promise<object>; | ||
export function getCharge(data: { | ||
chargeID: string; | ||
forUserID?: string; | ||
}): Promise<object>; |
@@ -72,2 +72,11 @@ const { Validate, Auth, fetchWithHTTPErr, promWithJsErr } = require('../utils'); | ||
let headers = { | ||
Authorization: Auth.basicAuthHeader(this.opts.secretKey), | ||
'Content-Type': 'application/json', | ||
}; | ||
if (data && data.forUserID) { | ||
headers['for-user-id'] = data.forUserID; | ||
} | ||
fetchWithHTTPErr( | ||
@@ -77,3 +86,3 @@ `${this.API_ENDPOINT}/credit_card_charges/${data.chargeID}`, | ||
method: 'GET', | ||
headers: { Authorization: Auth.basicAuthHeader(this.opts.secretKey) }, | ||
headers, | ||
}, | ||
@@ -80,0 +89,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
166790
4529