docs: added reference for JS Client (#1629)

* added reference for JS Client

* added reference for JS Client

* added reference for JS Client
This commit is contained in:
Shahed Nasser
2022-07-08 18:21:46 +03:00
committed by GitHub
parent 371682b4f7
commit 3b28f46705
357 changed files with 32911 additions and 3 deletions

View File

@@ -0,0 +1,77 @@
# 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`](../modules/internal.md#record)<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
#### Defined in
[packages/medusa-js/src/resources/addresses.ts:16](https://github.com/medusajs/medusa/blob/2eb2126f/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`](../modules/internal.md#record)<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
#### Defined in
[packages/medusa-js/src/resources/addresses.ts:29](https://github.com/medusajs/medusa/blob/2eb2126f/packages/medusa-js/src/resources/addresses.ts#L29)
___
### 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`](../modules/internal.md#record)<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCustomersRes`](../modules/internal.md#storecustomersres)\>
#### Defined in
[packages/medusa-js/src/resources/addresses.ts:41](https://github.com/medusajs/medusa/blob/2eb2126f/packages/medusa-js/src/resources/addresses.ts#L41)