quidax-node 3.0.7 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -2
- package/dist/index.d.cts +8 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.mjs +9 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -256,6 +256,9 @@ var WithdrawalsModule = class {
|
|
|
256
256
|
* @param data.amount - The amount to withdraw.
|
|
257
257
|
* @param data.fund_uid - The ID of the destination address/fund.
|
|
258
258
|
* @param data.transaction_note - Optional note for the transaction.
|
|
259
|
+
* @param data.reference - The withdrawal reference string.
|
|
260
|
+
* @param data.narration - Optional narration for the transaction.
|
|
261
|
+
* @param data.network - Required only for some blockchain withdrawals.
|
|
259
262
|
* @returns A promise resolving to the created Withdrawal object.
|
|
260
263
|
*/
|
|
261
264
|
async create(userId, data) {
|
|
@@ -267,13 +270,17 @@ var WithdrawalsModule = class {
|
|
|
267
270
|
* @param userId - The unique ID of the user.
|
|
268
271
|
* @param amount - The amount to withdraw.
|
|
269
272
|
* @param merchantId - The ID of the merchant.
|
|
273
|
+
* @param reference - The withdrawal reference string.
|
|
270
274
|
* @returns A promise resolving to the created Withdrawal object.
|
|
271
275
|
*/
|
|
272
|
-
async ngn_to_merchant(userId, amount, merchantId) {
|
|
276
|
+
async ngn_to_merchant(userId, amount, merchantId, reference) {
|
|
273
277
|
const payload = {
|
|
274
278
|
currency: "ngn",
|
|
275
279
|
amount,
|
|
276
|
-
fund_uid: merchantId
|
|
280
|
+
fund_uid: merchantId,
|
|
281
|
+
reference,
|
|
282
|
+
narration: `NGN ${amount} withdrawal from user`,
|
|
283
|
+
transaction_note: `NGN ${amount} withdrawal to merchant`
|
|
277
284
|
};
|
|
278
285
|
return this.client.post(`/users/${userId}/withdraws`, payload);
|
|
279
286
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -248,6 +248,9 @@ declare class WithdrawalsModule {
|
|
|
248
248
|
* @param data.amount - The amount to withdraw.
|
|
249
249
|
* @param data.fund_uid - The ID of the destination address/fund.
|
|
250
250
|
* @param data.transaction_note - Optional note for the transaction.
|
|
251
|
+
* @param data.reference - The withdrawal reference string.
|
|
252
|
+
* @param data.narration - Optional narration for the transaction.
|
|
253
|
+
* @param data.network - Required only for some blockchain withdrawals.
|
|
251
254
|
* @returns A promise resolving to the created Withdrawal object.
|
|
252
255
|
*/
|
|
253
256
|
create(userId: string, data: {
|
|
@@ -255,6 +258,9 @@ declare class WithdrawalsModule {
|
|
|
255
258
|
amount: string;
|
|
256
259
|
fund_uid: string;
|
|
257
260
|
transaction_note?: string;
|
|
261
|
+
reference?: string;
|
|
262
|
+
narration?: string;
|
|
263
|
+
network?: string;
|
|
258
264
|
}): Promise<QuidaxResponse<Withdrawal>>;
|
|
259
265
|
/**
|
|
260
266
|
* Initiates a new ngn withdrawal to merchant.
|
|
@@ -262,9 +268,10 @@ declare class WithdrawalsModule {
|
|
|
262
268
|
* @param userId - The unique ID of the user.
|
|
263
269
|
* @param amount - The amount to withdraw.
|
|
264
270
|
* @param merchantId - The ID of the merchant.
|
|
271
|
+
* @param reference - The withdrawal reference string.
|
|
265
272
|
* @returns A promise resolving to the created Withdrawal object.
|
|
266
273
|
*/
|
|
267
|
-
ngn_to_merchant(userId: string, amount: string, merchantId: string): Promise<QuidaxResponse<Withdrawal>>;
|
|
274
|
+
ngn_to_merchant(userId: string, amount: string, merchantId: string, reference: string): Promise<QuidaxResponse<Withdrawal>>;
|
|
268
275
|
/**
|
|
269
276
|
* Cancels a pending withdrawal.
|
|
270
277
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -248,6 +248,9 @@ declare class WithdrawalsModule {
|
|
|
248
248
|
* @param data.amount - The amount to withdraw.
|
|
249
249
|
* @param data.fund_uid - The ID of the destination address/fund.
|
|
250
250
|
* @param data.transaction_note - Optional note for the transaction.
|
|
251
|
+
* @param data.reference - The withdrawal reference string.
|
|
252
|
+
* @param data.narration - Optional narration for the transaction.
|
|
253
|
+
* @param data.network - Required only for some blockchain withdrawals.
|
|
251
254
|
* @returns A promise resolving to the created Withdrawal object.
|
|
252
255
|
*/
|
|
253
256
|
create(userId: string, data: {
|
|
@@ -255,6 +258,9 @@ declare class WithdrawalsModule {
|
|
|
255
258
|
amount: string;
|
|
256
259
|
fund_uid: string;
|
|
257
260
|
transaction_note?: string;
|
|
261
|
+
reference?: string;
|
|
262
|
+
narration?: string;
|
|
263
|
+
network?: string;
|
|
258
264
|
}): Promise<QuidaxResponse<Withdrawal>>;
|
|
259
265
|
/**
|
|
260
266
|
* Initiates a new ngn withdrawal to merchant.
|
|
@@ -262,9 +268,10 @@ declare class WithdrawalsModule {
|
|
|
262
268
|
* @param userId - The unique ID of the user.
|
|
263
269
|
* @param amount - The amount to withdraw.
|
|
264
270
|
* @param merchantId - The ID of the merchant.
|
|
271
|
+
* @param reference - The withdrawal reference string.
|
|
265
272
|
* @returns A promise resolving to the created Withdrawal object.
|
|
266
273
|
*/
|
|
267
|
-
ngn_to_merchant(userId: string, amount: string, merchantId: string): Promise<QuidaxResponse<Withdrawal>>;
|
|
274
|
+
ngn_to_merchant(userId: string, amount: string, merchantId: string, reference: string): Promise<QuidaxResponse<Withdrawal>>;
|
|
268
275
|
/**
|
|
269
276
|
* Cancels a pending withdrawal.
|
|
270
277
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -229,6 +229,9 @@ var WithdrawalsModule = class {
|
|
|
229
229
|
* @param data.amount - The amount to withdraw.
|
|
230
230
|
* @param data.fund_uid - The ID of the destination address/fund.
|
|
231
231
|
* @param data.transaction_note - Optional note for the transaction.
|
|
232
|
+
* @param data.reference - The withdrawal reference string.
|
|
233
|
+
* @param data.narration - Optional narration for the transaction.
|
|
234
|
+
* @param data.network - Required only for some blockchain withdrawals.
|
|
232
235
|
* @returns A promise resolving to the created Withdrawal object.
|
|
233
236
|
*/
|
|
234
237
|
async create(userId, data) {
|
|
@@ -240,13 +243,17 @@ var WithdrawalsModule = class {
|
|
|
240
243
|
* @param userId - The unique ID of the user.
|
|
241
244
|
* @param amount - The amount to withdraw.
|
|
242
245
|
* @param merchantId - The ID of the merchant.
|
|
246
|
+
* @param reference - The withdrawal reference string.
|
|
243
247
|
* @returns A promise resolving to the created Withdrawal object.
|
|
244
248
|
*/
|
|
245
|
-
async ngn_to_merchant(userId, amount, merchantId) {
|
|
249
|
+
async ngn_to_merchant(userId, amount, merchantId, reference) {
|
|
246
250
|
const payload = {
|
|
247
251
|
currency: "ngn",
|
|
248
252
|
amount,
|
|
249
|
-
fund_uid: merchantId
|
|
253
|
+
fund_uid: merchantId,
|
|
254
|
+
reference,
|
|
255
|
+
narration: `NGN ${amount} withdrawal from user`,
|
|
256
|
+
transaction_note: `NGN ${amount} withdrawal to merchant`
|
|
250
257
|
};
|
|
251
258
|
return this.client.post(`/users/${userId}/withdraws`, payload);
|
|
252
259
|
}
|