Customer account management
Get customer account information
Use this method to get a Customer’s account information.
Declared In
lib/modules/client/client_impl.dart
Related
lib/model/client/client_account_information.dart
Method
Future<ClientAccountInformation> getAccount() async {
Return Value
ClientAccountInformation
Example
final ClientAccountInformation clientAccountInformation = await Synerise.client.getAccount().catchError((error)
Update customer account information
Use this method to update a Customer’s account information.
This method requires the ClientAccountUpdateContext
object with the Customer’s account information. Omitted fields are not modified.
Declared In
lib/modules/client/client_impl.dart
Related
lib/model/client/client_account_update_context.dart
Method
Future<void> updateAccount(ClientAccountUpdateContext clientAccountUpdateContext)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientAccountUpdateContext |
ClientAccountUpdateContext | no | - | Object with the Customer’s update data |
Return Value
There is no return value.
Example
ClientAccountUpdateContext clientAccountUpdateContext = ClientAccountUpdateContext(
email: email,
password: password,
firstName: firstName,
lastName: lastName,
sex: sex,
phone: phone,
company: company,
address: address,
city: city,
zipcode: zipcode,
countrycode: countrycode,
province: province);
await Synerise.client.updateAccount(clientAccountUpdateContext).catchError((error)
Change customer’s account password
Use this method to change a Customer’s password.
Returns the HTTP 403 status code if the provided old password is invalid.
Declared In
lib/modules/client/client_impl.dart
Method
Future<void> changePassword(String oldPassword, String password)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
newPassword |
String | yes | - | Customer’s new password |
oldPassword |
String | yes | - | Customer’s old password |
Return Value
There is no return value.
Example
await Synerise.client.changePassword(oldPassword, password).catchError((error)
Request password reset for customer account
Request a Customer’s password reset with email. The Customer will receive a token at the provided email address. That token is then used for Synerise.Client.confirmResetPassword
.
This method requires the Customer’s email. This method is a global operation and does not require authorization.
Declared In
lib/modules/client/client_impl.dart
Method
Future<void> requestPasswordReset(String email)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
email |
String | yes | - | Customer’s email |
Return Value
There is no return value.
Example
await Synerise.client.requestPasswordReset(email).catchError((error)
Confirm password reset for customer account
Confirm a Customer’s password reset with the new password and token provided by Synerise.Client.requestPasswordReset
.
This method requires the Customer’s new password and the confirmation token received by e-mail.
This method is a global operation and does not require authorization.
Declared In
lib/modules/client/client_impl.dart
Method
Future<void> confirmPasswordReset(String password, String token)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
email |
String | yes | - | Customer’s email |
token |
String | yes | - | Customer’s token provided by email |
Return Value
There is no return value.
Example
await Synerise.client.confirmPasswordReset(email, token).catchError((error)
Delete Customer account by Identity Provider
Declared In
lib/modules/client/client_impl.dart