Requests a withdrawal status update.
The withdrawal confirm request.
A promise that resolves to the updated withdrawal.
If the HTTP request fails.
// Example usage:
withdrawalService.confirm(withdrawalId)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error processing withdrawal.`);
});
Requests a withdrawal creation.
The withdrawal create request.
A promise that resolves to the updated withdrawal.
If the HTTP request fails.
// Example usage:
withdrawalService.create(withdrawalCreate)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error creating withdrawal.`);
});
Retrieves a withdrawal by id.
The id of the withdrawal.
A promise that resolves to a withdrawal.
If the HTTP request fails.
// Example usage:
withdrawalService.get(withdrawalId)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching withdrawal.`);
});
Retrieves user withdrawals with pagination metadata.
Optional
getWithdrawalsParameters: GetWithdrawalParametersFilter parameters.
A promise that resolves to a withdrawal list.
If the HTTP request fails.
// Example usage:
withdrawalService.getAll({ limit: 5 })
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching withdrawals.`);
});
Retrieves all withdrawal options.
A promise that resolve to a list of withdrawal options.
If the HTTP request fails.
// Example usage:
withdrawalService.getOptions()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching withdrawal options.`);
});
Creates a withdrawal preview.
The request payload for creating a withdrawal preview.
A promise that resolve to the newly created withdrawal preview.
If the HTTP request fails.
// Example usage:
withdrawalService.preview(withdrawalRequest)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error creating withdrawal.`);
});
Static
getRetrieves the singleton instance of the WithdrawalService class.
The singleton instance of the WithdrawalService class.
// Usage:
const withdrawalService = WithdrawalService.getInstance();
Service class for managing withdrawals related operations.