Skip to main content

Class: CustomerResource

Hierarchy

  • Copy to Clipboard

    Copy to Clipboard

Properties

addresses

addresses: Copy to Clipboard

Defined in

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


paymentMethods

paymentMethods: Copy to Clipboard

Defined in

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

Methods

create

create(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Creates a customer

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardinformation of customer
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


generatePasswordToken

generatePasswordToken(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

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
Copy to ClipboardCopy to Clipboardinfo used to generate token
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


listOrders

listOrders(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Retrieve customer orders

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardoptional params to retrieve orders
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


resetPassword

resetPassword(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Resets customer password

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardinfo used to reset customer password
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


retrieve

retrieve(Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Retrieves the customer that is currently logged

Parameters

NameType
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


update

update(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Updates a customer

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardinformation to update customer with
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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