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:
53
docs/content/references/js-client/classes/SwapsResource.md
Normal file
53
docs/content/references/js-client/classes/SwapsResource.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# Class: SwapsResource
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `default`
|
||||
|
||||
↳ **`SwapsResource`**
|
||||
|
||||
## Methods
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreSwapsRes`](../modules/internal.md#storeswapsres)\>
|
||||
|
||||
**`description`** Creates a swap from a cart
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`StorePostSwapsReq`](internal.StorePostSwapsReq.md) |
|
||||
| `customHeaders` | [`Record`](../modules/internal.md#record)<`string`, `any`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreSwapsRes`](../modules/internal.md#storeswapsres)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa-js/src/resources/swaps.ts:12](https://github.com/medusajs/medusa/blob/2eb2126f/packages/medusa-js/src/resources/swaps.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
### retrieveByCartId
|
||||
|
||||
▸ **retrieveByCartId**(`cart_id`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreSwapsRes`](../modules/internal.md#storeswapsres)\>
|
||||
|
||||
**`description`** Retrieves a swap by cart id
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `cart_id` | `string` | id of cart |
|
||||
| `customHeaders` | [`Record`](../modules/internal.md#record)<`string`, `any`\> | |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreSwapsRes`](../modules/internal.md#storeswapsres)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/medusa-js/src/resources/swaps.ts:23](https://github.com/medusajs/medusa/blob/2eb2126f/packages/medusa-js/src/resources/swaps.ts#L23)
|
||||
Reference in New Issue
Block a user