Files
medusa-store/docs/content/references/js-client/classes/AdminCustomersResource.md
Shahed Nasser 02d5c1da88 docs: update Typedoc and regenerate references (#1994)
* generated new services reference

* changed from automatic push to automated pull request

* updated typedoc, regenerated JS Client reference

* regenerated the reference after updating typedoc

* added action for js client
2022-08-04 17:29:52 +03:00

101 lines
3.1 KiB
Markdown

# Class: AdminCustomersResource
## Hierarchy
- `default`
**`AdminCustomersResource`**
## Methods
### create
**create**(`payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersRes`](../modules/internal-5.md#admincustomersres)\>
Creates a customer
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `payload` | [`AdminPostCustomersReq`](internal-5.AdminPostCustomersReq.md) | information of customer |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersRes`](../modules/internal-5.md#admincustomersres)\>
#### Defined in
[medusa-js/src/resources/admin/customers.ts:18](https://github.com/medusajs/medusa/blob/e38dd7f6/packages/medusa-js/src/resources/admin/customers.ts#L18)
___
### list
**list**(`query?`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersListRes`](../modules/internal-4.md#admincustomerslistres)\>
Lists customers
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `query?` | [`AdminGetCustomersParams`](internal-4.AdminGetCustomersParams.md) | optional |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersListRes`](../modules/internal-4.md#admincustomerslistres)\>
#### Defined in
[medusa-js/src/resources/admin/customers.ts:59](https://github.com/medusajs/medusa/blob/e38dd7f6/packages/medusa-js/src/resources/admin/customers.ts#L59)
___
### retrieve
**retrieve**(`id`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersRes`](../modules/internal-5.md#admincustomersres)\>
Retrieves a customer
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `id` | `string` | customer id |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersRes`](../modules/internal-5.md#admincustomersres)\>
#### Defined in
[medusa-js/src/resources/admin/customers.ts:46](https://github.com/medusajs/medusa/blob/e38dd7f6/packages/medusa-js/src/resources/admin/customers.ts#L46)
___
### update
**update**(`id`, `payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersRes`](../modules/internal-5.md#admincustomersres)\>
Updates a customer
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `id` | `string` | customer id |
| `payload` | [`AdminPostCustomersCustomerReq`](internal-5.AdminPostCustomersCustomerReq.md) | data to update customer with |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminCustomersRes`](../modules/internal-5.md#admincustomersres)\>
#### Defined in
[medusa-js/src/resources/admin/customers.ts:32](https://github.com/medusajs/medusa/blob/e38dd7f6/packages/medusa-js/src/resources/admin/customers.ts#L32)