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
Name | Type | Description |
---|---|---|
payload | StorePostCustomersReq | information of customer |
customHeaders | Record <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
Name | Type | Description |
---|---|---|
payload | StorePostCustomersCustomerPasswordTokenReq | info used to generate token |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<any
>
Defined in
medusa-js/src/resources/customers.ts:101
listOrders
▸ listOrders(params?
, customHeaders?
): ResponsePromise
<StoreCustomersListOrdersRes
>
Retrieve customer orders
Parameters
Name | Type | Description |
---|---|---|
params? | StoreGetCustomersCustomerOrdersParams | optional params to retrieve orders |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<StoreCustomersListOrdersRes
>
Defined in
medusa-js/src/resources/customers.ts:66
resetPassword
▸ resetPassword(payload
, customHeaders?
): ResponsePromise
<StoreCustomersRes
>
Resets customer password
Parameters
Name | Type | Description |
---|---|---|
payload | StorePostCustomersResetPasswordReq | info used to reset customer password |
customHeaders | Record <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
Name | Type |
---|---|
customHeaders | Record <string , any > |
Returns
ResponsePromise
<StoreCustomersRes
>
Defined in
medusa-js/src/resources/customers.ts:39
update
▸ update(payload
, customHeaders?
): ResponsePromise
<StoreCustomersRes
>
Updates a customer
Parameters
Name | Type | Description |
---|---|---|
payload | StorePostCustomersCustomerReq | information to update customer with |
customHeaders | Record <string , any > |
Returns
ResponsePromise
<StoreCustomersRes
>