Adds a new customer account.
The request payload for adding an account.
A promise that resolves to the newly added customer account.
If the HTTP request fails.
// Example usage:
profileService.addAccount()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error adding customer account.`);
});
Retrieves customer accounts.
A Promise that resolves to the retrieved customer accounts.
If the HTTP request fails.
// Example usage:
profileService.getAccounts()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching customer accounts.`);
});
Retrieves customer information. By default, limited information is returned (include param is empty array). Use include parameter to add additional information into the response: ACCOUNTS - include account balance information RESTRICTIONS - include restriction information ADDRESS - include address information CONTACTINFO - include contact information
The list of additional information to include in the response.
A Promise that resolves to the retrieved customer information.
If the HTTP request fails.
// Example usage:
profileService.getProfile()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching customer information.`);
});
Retrieves customer account.
The ID of the account to retrieve.
A Promise that resolves to the retrieved customer account.
If the HTTP request fails.
// Example usage:
profileService.getSingleAccount()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching customer account.`);
});
Updates customer personal information.
Updating the following customer details might result in customer restriction and require new KYC Verification:
To update the following details, the customer must be non-KYC verified. If the customer is KYC verified, you cannot update these details:
The customer personal information which we want to update.
A Promise that resolves to the updated customer information.
// Example usage:
profileService.updateProfile(updateCustomerRequest)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error updating customer information.`);
});
Static
getRetrieves the singleton instance of the ProfileService class.
The singleton instance of the ProfileService class.
// Usage:
const profileService = ProfileService.getInstance();
Service class for managing user related operations.