Files
2025-01-17 19:05:02 +02:00

12 lines
4.1 KiB
Plaintext

---
displayed_sidebar: fulfillmentReference
---
import { TypeList } from "docs-ui"
# CalculateShippingOptionPriceDTO
The data needed for the associated fulfillment provider to calculate the price of a shipping option.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionData","type":"`Record<string, unknown>`","description":"The `data` property of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The shipping method's `data` property with custom data passed from the frontend.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[CartPropsForFulfillment](../../types/fulfillment.CartPropsForFulfillment/page.mdx) & `object`","description":"The calculation context needed for the associated fulfillment provider to calculate the price of a shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"[CartDTO](../fulfillment.CartDTO/page.mdx)[`\"id\"`]","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[CartDTO](../fulfillment.CartDTO/page.mdx)[`\"shipping_address\"`]","description":"The cart's shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CartDTO](../fulfillment.CartDTO/page.mdx)[`\"items\"`] & `object`","description":"The cart's items","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant","type":"`object`","description":"The item's variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`object`","description":"The item's product.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"from_location","type":"[StockLocationDTO](../../types/fulfillment.StockLocationDTO/page.mdx)","description":"The location that the items will be shipped from.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../types/fulfillment.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CalculateShippingOptionPriceDTO"/>