new ShopAPI(rest)
This class is used to interact with the Shop in TidyHQ.
Parameters:
Name | Type | Description |
---|---|---|
rest | Rest | The rest instance to use for requests. |
- Source
Methods
(async) getOrder(order_id, optionsopt) → {Promise.<TidyAPI_V1_ShopOrder>}
Get a single order.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
order_id | string | The ID of the order. | ||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The order.
- Type:
- Promise.<TidyAPI_V1_ShopOrder>
(async) getOrders(optionsopt) → {Promise.<TidyAPI_V1_ShopOrders>}
Get a list of all orders.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The list of orders.
- Type:
- Promise.<TidyAPI_V1_ShopOrders>
(async) getProduct(product_id, optionsopt) → {Promise.<TidyAPI_V1_ShopProduct>}
Get a single shop product.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
product_id | string | The ID of the product. | ||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The product.
- Type:
- Promise.<TidyAPI_V1_ShopProduct>
(async) getProducts(optionsopt) → {Promise.<TidyAPI_V1_ShopProducts>}
Get a list of all shop products.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The list of products.
- Type:
- Promise.<TidyAPI_V1_ShopProducts>
(async) getShippingOption(shipping_option_id, optionsopt) → {Promise.<TidyAPI_V1_ShippingOption>}
Get a single shipping option.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
shipping_option_id | string | The ID of the shipping option. | ||||||||||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The shipping option.
- Type:
- Promise.<TidyAPI_V1_ShippingOption>
(async) getShippingOptions(optionsopt) → {Promise.<TidyAPI_V1_ShippingOptions>}
Get a list of all shipping options.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The list of shipping options.
- Type:
- Promise.<TidyAPI_V1_ShippingOptions>