projects/apttus/ecommerce/src/lib/modules/crm/services/account.service.ts
The account service provides methods for interacting with the accounts the user has access to.
AObjectService
Properties |
Methods |
| getAccountById | ||||||
getAccountById(accountId: string)
|
||||||
|
Retrieves the Account information based on the accound id passed.
Parameters :
Returns :
Observable<Array<Account>>
an observable containing the account record. |
| getCurrentAccount |
getCurrentAccount()
|
|
Retrieves the current active account (used for order-on-behalf functions) Example:
Returns :
Observable<Account>
an observable containing the account record |
| getMyAccount |
getMyAccount()
|
|
Retrieves the account associated with the current user. For guest user it retrieves the account associated with the storefront object. Example:
Returns :
Observable<Account>
an observable containing the account record |
| setAccount | |||||||||||||||
setAccount(account: Account | string, useLocalStorage: boolean)
|
|||||||||||||||
|
Sets the selected account to be the current active account for order-on-behalf functions. Will store the selected account record in local storage Example:
Parameters :
Returns :
Observable<Account>
an observable containing the account record that was set to active |
| type |
Default value : Account
|