Confirms a transfer for execution (processing state).
The transfer confirm request.
A promise that resolve to the updated transfer.
If the HTTP request fails.
// Example usage:
transferService.confirm(transferConfirm)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error processing transfer`);
});
Requests a transfer creation (pending state).
The transfer create request.
A promise that resolve to the updated transfer.
If the HTTP request fails.
// Example usage:
transferService.create(transferCreate)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error creating transfer`);
});
Retrieves a transfer by id.
The id of the transfer.
A promise that resolves to a transfer.
If the HTTP request fails.
// Example usage:
transferService.get(transferId)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching transfer.`);
});
Retrieves user transfers with pagination metadata.
Optional
getTransferParameters: GetTransferParametersFilter parameters.
A promise that resolves to a transfer list.
If the HTTP request fails.
// Example usage:
transferService.getAll({ limit: 5 })
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching transfers.`);
});
Creates a transfer preview.
The request payload for creating a transfer preview.
A promise that resolves to the newly created transfer preview.
If the HTTP request fails.
// Example usage:
transferService.preview(transferPreviewRequest)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error creating transfer.`);
});
Static
getRetrieves the singleton instance of the TransferService class.
The singleton instance of the TransferService class.
// Usage:
const transferService = TransferService.getInstance();
Service class for managing transfers related operations.