Customers
Several methods are provided for managing the Customer within the SDK.
#
Create CustomerCreate a customer account using information from the user
#
ParamsName | Type | Example |
---|---|---|
customer | CustomerInfo | { name: 'Abdelkhalek Zellat', carType: 'Tesla', carColor: 'Silver', licensePlate: 'AB 0496', phone: '555-555-5555' } |
#
Example#
Login with Email/PasswordLogin the user in using existing credentials
#
ParamsName | Type | Example |
---|---|---|
Str | 'name@email.com' | |
password | Str | 'password' |
#
Example#
Login with TokenLogin the user with a previously obtained customer API token
#
ParamsName | Type | Example |
---|---|---|
token | Str | 'F69PGKM1QXCN7Dj3ybEXCpU4' |
#
Eample#
LogoutLogs out the current customer.
#
ParamsName | Type |
---|---|
None | None |
#
Example#
Update CustomerUpdate customer info for the logged in user
#
ParamsName | Type | Example |
---|---|---|
customer | CustomerInfo | { name: 'Abdelkhalek Zellat', carType: 'Tesla', carColor: 'Silver', licensePlate: 'AB 0496', phone: '555-555-5555' } |
#
Example#
SignUp a CustomerLink an email and password with the current anonymous logged in user.
#
ParamsName | Type | Example |
---|---|---|
Str | 'name@email.com' | |
password | Str | 'password' |
#
Example#
Get Current CustomerReturns an instance of the current customer
#
ParamsName | Type |
---|---|
None | None |