Requests a deposit status update.
The deposit confirm request.
A promise that resolves to the updated deposit.
If the HTTP request fails.
// Example usage:
depositService.confirm(depositId)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error processing deposit.`);
});
Requests a deposit creation.
The deposit create request.
A promise that resolves to the updated deposit.
If the HTTP request fails.
// Example usage:
depositService.create(depositCreate)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error creating deposit.`);
});
Retrieves a deposit by id.
The id of the deposit.
A promise that resolves to a deposit.
If the HTTP request fails.
// Example usage:
depositService.get(depositId)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching deposit.`);
});
Retrieves user deposits with pagination metadata.
Optional
depositParameters: GetDepositParametersFilter parameters.
A promise that resolves to a deposit list.
If the HTTP request fails.
// Example usage:
depositService.getAll({ limit: 5 })
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching deposits.`);
});
Retrieves all deposit options.
A promise that resolves to a list of deposit options.
If the HTTP request fails.
// Example usage:
depositService.getOptions()
.then((options) => {
console.log(options);
})
.catch((error) => {
console.error(`Error fetching deposit options.`);
});
Retrieves all paysafecash locations filtered by the parameters in the request.
The paysafecash locations get request.
A promise that resolves to a list of deposit options.
If the HTTP request fails.
// Example usage:
depositService.getPaysafecashLocations(paysafecashLocationRequest)
.then((locations) => {
console.log(locations);
})
.catch((error) => {
console.error(`Error fetching paysafecash locations.`);
});
Creates a deposit preview.
The request payload for creating a deposit preview.
A promise that resolves to the newly created deposit preview.
If the HTTP request fails.
// Example usage:
depositService.preview(depositRequest)
.then((deposit) => {
console.log(deposit);
})
.catch((error) => {
console.error(`Error creating deposit.`);
});
Static
getRetrieves the singleton instance of the DepositService class.
The singleton instance of the DepositService class.
// Usage:
const depositService = DepositService.getInstance();
Service class for managing deposit related operations.