GitHub

DaffCustomerInMemoryDriver

import { DaffCustomerInMemoryDriver } from '@daffodil/customer/driver/in-memory'

The customer inmemory driver to mock the customer backend service.

@Injectable()
class DaffCustomerInMemoryDriver extends DaffInMemoryDriverBase implements DaffCustomerDriverInterface {
  changeEmail(
    email: string
    password: string
  ): Observable<DaffCustomer>
  changePassword(
    oldPassword: string
    newPassword: string
  ): Observable<void>
  get(): Observable<DaffCustomer>
  update(customer: Partial<DaffCustomer>): Observable<DaffCustomer>
}

() Methods

changeEmail
Observable<DaffCustomer>

Change the currently logged-in customer's email.

Parameters
Parameteremail: string
Description
Parameterpassword: string
Description
changePassword
Observable<void>

Change the currently logged-in customer's password.

Parameters
ParameteroldPassword: string
Description
ParameternewPassword: string
Description
get
Observable<DaffCustomer>

Get the currently logged-in customer.

update
Observable<DaffCustomer>

Update the currently logged-in customer.

@param customer The customer info to update.

Parameters
Parametercustomer: Partial<DaffCustomer>
Description