quidax-node 3.0.1 → 3.0.3

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 CHANGED
@@ -220,7 +220,7 @@ var WithdrawalsModule = class {
220
220
  }
221
221
  /**
222
222
  * Fetches a paginated list of all withdrawals for a user.
223
- *
223
+ *
224
224
  * @param userId - The unique ID of the user.
225
225
  * @returns A promise resolving to a paginated list of Withdrawal objects.
226
226
  */
@@ -229,7 +229,7 @@ var WithdrawalsModule = class {
229
229
  }
230
230
  /**
231
231
  * Fetches the details of a specific withdrawal.
232
- *
232
+ *
233
233
  * @param userId - The unique ID of the user.
234
234
  * @param withdrawalId - The ID of the withdrawal to retrieve.
235
235
  * @returns A promise resolving to a single Withdrawal object.
@@ -239,7 +239,7 @@ var WithdrawalsModule = class {
239
239
  }
240
240
  /**
241
241
  * Fetches a withdrawal by its unique reference string.
242
- *
242
+ *
243
243
  * @param userId - The unique ID of the user.
244
244
  * @param reference - The withdrawal reference string.
245
245
  * @returns A promise resolving to a single Withdrawal object.
@@ -249,7 +249,7 @@ var WithdrawalsModule = class {
249
249
  }
250
250
  /**
251
251
  * Initiates a new cryptocurrency withdrawal.
252
- *
252
+ *
253
253
  * @param userId - The unique ID of the user.
254
254
  * @param data - The withdrawal details.
255
255
  * @param data.currency - The cryptocurrency ticker (e.g., 'btc').
@@ -262,8 +262,24 @@ var WithdrawalsModule = class {
262
262
  return this.client.post(`/users/${userId}/withdraws`, data);
263
263
  }
264
264
  /**
265
+ * Initiates a new ngn withdrawal to merchant.
266
+ *
267
+ * @param userId - The unique ID of the user.
268
+ * @param amount - The amount to withdraw.
269
+ * @param merchantId - The ID of the merchant.
270
+ * @returns A promise resolving to the created Withdrawal object.
271
+ */
272
+ async ngn_to_merchant(userId, amount, merchantId) {
273
+ const payload = {
274
+ currency: "ngn",
275
+ amount,
276
+ fund_uid: merchantId
277
+ };
278
+ return this.client.post(`/users/${userId}/withdraws`, payload);
279
+ }
280
+ /**
265
281
  * Cancels a pending withdrawal.
266
- *
282
+ *
267
283
  * @param userId - The unique ID of the user.
268
284
  * @param withdrawalId - The ID of the withdrawal to cancel.
269
285
  * @returns A promise resolving to the canceled Withdrawal object.
package/dist/index.d.cts CHANGED
@@ -256,6 +256,15 @@ declare class WithdrawalsModule {
256
256
  fund_uid: string;
257
257
  transaction_note?: string;
258
258
  }): Promise<QuidaxResponse<Withdrawal>>;
259
+ /**
260
+ * Initiates a new ngn withdrawal to merchant.
261
+ *
262
+ * @param userId - The unique ID of the user.
263
+ * @param amount - The amount to withdraw.
264
+ * @param merchantId - The ID of the merchant.
265
+ * @returns A promise resolving to the created Withdrawal object.
266
+ */
267
+ ngn_to_merchant(userId: string, amount: string, merchantId: string): Promise<QuidaxResponse<Withdrawal>>;
259
268
  /**
260
269
  * Cancels a pending withdrawal.
261
270
  *
package/dist/index.d.mts CHANGED
@@ -256,6 +256,15 @@ declare class WithdrawalsModule {
256
256
  fund_uid: string;
257
257
  transaction_note?: string;
258
258
  }): Promise<QuidaxResponse<Withdrawal>>;
259
+ /**
260
+ * Initiates a new ngn withdrawal to merchant.
261
+ *
262
+ * @param userId - The unique ID of the user.
263
+ * @param amount - The amount to withdraw.
264
+ * @param merchantId - The ID of the merchant.
265
+ * @returns A promise resolving to the created Withdrawal object.
266
+ */
267
+ ngn_to_merchant(userId: string, amount: string, merchantId: string): Promise<QuidaxResponse<Withdrawal>>;
259
268
  /**
260
269
  * Cancels a pending withdrawal.
261
270
  *
package/dist/index.mjs CHANGED
@@ -193,7 +193,7 @@ var WithdrawalsModule = class {
193
193
  }
194
194
  /**
195
195
  * Fetches a paginated list of all withdrawals for a user.
196
- *
196
+ *
197
197
  * @param userId - The unique ID of the user.
198
198
  * @returns A promise resolving to a paginated list of Withdrawal objects.
199
199
  */
@@ -202,7 +202,7 @@ var WithdrawalsModule = class {
202
202
  }
203
203
  /**
204
204
  * Fetches the details of a specific withdrawal.
205
- *
205
+ *
206
206
  * @param userId - The unique ID of the user.
207
207
  * @param withdrawalId - The ID of the withdrawal to retrieve.
208
208
  * @returns A promise resolving to a single Withdrawal object.
@@ -212,7 +212,7 @@ var WithdrawalsModule = class {
212
212
  }
213
213
  /**
214
214
  * Fetches a withdrawal by its unique reference string.
215
- *
215
+ *
216
216
  * @param userId - The unique ID of the user.
217
217
  * @param reference - The withdrawal reference string.
218
218
  * @returns A promise resolving to a single Withdrawal object.
@@ -222,7 +222,7 @@ var WithdrawalsModule = class {
222
222
  }
223
223
  /**
224
224
  * Initiates a new cryptocurrency withdrawal.
225
- *
225
+ *
226
226
  * @param userId - The unique ID of the user.
227
227
  * @param data - The withdrawal details.
228
228
  * @param data.currency - The cryptocurrency ticker (e.g., 'btc').
@@ -235,8 +235,24 @@ var WithdrawalsModule = class {
235
235
  return this.client.post(`/users/${userId}/withdraws`, data);
236
236
  }
237
237
  /**
238
+ * Initiates a new ngn withdrawal to merchant.
239
+ *
240
+ * @param userId - The unique ID of the user.
241
+ * @param amount - The amount to withdraw.
242
+ * @param merchantId - The ID of the merchant.
243
+ * @returns A promise resolving to the created Withdrawal object.
244
+ */
245
+ async ngn_to_merchant(userId, amount, merchantId) {
246
+ const payload = {
247
+ currency: "ngn",
248
+ amount,
249
+ fund_uid: merchantId
250
+ };
251
+ return this.client.post(`/users/${userId}/withdraws`, payload);
252
+ }
253
+ /**
238
254
  * Cancels a pending withdrawal.
239
- *
255
+ *
240
256
  * @param userId - The unique ID of the user.
241
257
  * @param withdrawalId - The ID of the withdrawal to cancel.
242
258
  * @returns A promise resolving to the canceled Withdrawal object.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidax-node",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "files": [