AccountEndpoint

Instance Methods

Method Name Description
subscribe(fn: Function): void Get updated account details any time the account is changed or updated.
get(): Promise<{ account: account }> Get the authenticated account details.
update(data: object): Promise<{ account: account }> Update the authenticated account.
login(email: string, password: string, rememberMe: boolean = false): Promise<{ account: account, redirect_to: string }> Login to an account.
logout(): Promise<{ account: null }> Logout of the authenticated account.
signup(data: object): Promise<{ redirect_to: string }> Signup for an account.
resetPassword(email: string): Promise<{ success: boolean }> Request a forgot your password email.
registerFromCart(cartId: string, password: string): Promise<{ account: account }> Signup for an account using only a cart id.

Properties

Property Name Type
Orders OrdersEndpoint instance
PaymentMethods PaymentMethodsEndpoint instance
Sponsorships SponsorshipsEndpoint instance
Subscriptions SubscriptionsEndpoint instance