Files
medusa-store/docs/content/references/js-client/classes/AddressesResource.md
Shahed Nasser a8293af8e1 fix: overlapping branch names for generated PRs of references (#2097)
* fix overlapping branch names of generated references

* regenerate references
2022-08-25 17:47:58 +03:00

78 lines
2.5 KiB
Markdown

# Class: AddressesResource
## Hierarchy
- `default`
**`AddressesResource`**
## Methods
### addAddress
**addAddress**(`payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
Adds an address to a customers saved addresses
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `payload` | [`StorePostCustomersCustomerAddressesReq`](internal.StorePostCustomersCustomerAddressesReq.md) | contains information to create an address |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
#### Defined in
[medusa-js/src/resources/addresses.ts:16](https://github.com/medusajs/medusa/blob/f7a63f178/packages/medusa-js/src/resources/addresses.ts#L16)
___
### deleteAddress
**deleteAddress**(`address_id`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
Deletes an address of a customer
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `address_id` | `string` | id of the address to delete |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
#### Defined in
[medusa-js/src/resources/addresses.ts:30](https://github.com/medusajs/medusa/blob/f7a63f178/packages/medusa-js/src/resources/addresses.ts#L30)
___
### updateAddress
**updateAddress**(`address_id`, `payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
Update an address of a customer
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `address_id` | `string` | id of customer |
| `payload` | [`StorePostCustomersCustomerAddressesAddressReq`](internal.StorePostCustomersCustomerAddressesAddressReq.md) | address update |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
#### Defined in
[medusa-js/src/resources/addresses.ts:45](https://github.com/medusajs/medusa/blob/f7a63f178/packages/medusa-js/src/resources/addresses.ts#L45)