Skip to main content

Class: CustomerResource

Hierarchy

  • default

    CustomerResource

Properties

addresses

addresses: AddressesResource

Defined in

medusa-js/src/resources/customers.ts:18


paymentMethods

paymentMethods: PaymentMethodsResource

Defined in

medusa-js/src/resources/customers.ts:17

Methods

create

create(payload, customHeaders?): ResponsePromise<StoreCustomersRes>

Creates a customer

Parameters

NameTypeDescription
payloadStorePostCustomersReqinformation of customer
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreCustomersRes>

Defined in

medusa-js/src/resources/customers.ts:26


generatePasswordToken

generatePasswordToken(payload, customHeaders?): ResponsePromise<any>

Generates a reset password token, which can be used to reset the password. The token is not returned but should be sent out to the customer in an email.

Parameters

NameTypeDescription
payloadStorePostCustomersCustomerPasswordTokenReqinfo used to generate token
customHeadersRecord<string, any>

Returns

ResponsePromise<any>

Defined in

medusa-js/src/resources/customers.ts:101


listOrders

listOrders(params?, customHeaders?): ResponsePromise<StoreCustomersListOrdersRes>

Retrieve customer orders

Parameters

NameTypeDescription
params?StoreGetCustomersCustomerOrdersParamsoptional params to retrieve orders
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreCustomersListOrdersRes>

Defined in

medusa-js/src/resources/customers.ts:66


resetPassword

resetPassword(payload, customHeaders?): ResponsePromise<StoreCustomersRes>

Resets customer password

Parameters

NameTypeDescription
payloadStorePostCustomersResetPasswordReqinfo used to reset customer password
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreCustomersRes>

Defined in

medusa-js/src/resources/customers.ts:86


retrieve

retrieve(customHeaders?): ResponsePromise<StoreCustomersRes>

Retrieves the customer that is currently logged

Parameters

NameType
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreCustomersRes>

Defined in

medusa-js/src/resources/customers.ts:39


update

update(payload, customHeaders?): ResponsePromise<StoreCustomersRes>

Updates a customer

Parameters

NameTypeDescription
payloadStorePostCustomersCustomerReqinformation to update customer with
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreCustomersRes>

Defined in

medusa-js/src/resources/customers.ts:52