1 /**
2 * @schema StoreCartShippingOption
3 * type: object
4 * description: The shipping option's details.
5 * x-schemaName: StoreCartShippingOption
6 * required:
7 * - id
8 * - name
9 * - price_type
10 * - service_zone_id
11 * - shipping_profile_id
12 * - provider_id
13 * - data
14 * - type
15 * - provider
16 * - amount
17 * - prices
18 * - calculated_price
19 * - insufficient_inventory
20 * properties:
21 * id:
22 * type: string
23 * title: id
24 * description: The shipping option's ID.
25 * name:
26 * type: string
27 * title: name
28 * description: The shipping option's name.
29 * price_type:
30 * type: string
31 * description: The shipping option's price type. If it's `flat`, the price is fixed and is set in the `prices` property. If it's `calculated`, the price is calculated on checkout by the associated
32 * fulfillment provider.
33 * enum:
34 * - flat
35 * - calculated
36 * service_zone_id:
37 * type: string
38 * title: service_zone_id
39 * description: The ID of the service zone the shipping option belongs to.
40 * provider_id:
41 * type: string
42 * title: provider_id
43 * description: The ID of the fulfillment provider handling this option.
44 * provider:
45 * type: object
46 * description: The fulfillment provider's details.
47 * required:
48 * - id
49 * - is_enabled
50 * properties:
51 * id:
52 * type: string
53 * title: id
54 * description: The provider's ID.
55 * is_enabled:
56 * type: boolean
57 * title: is_enabled
58 * description: Whether the provider is enabled.
59 * type:
60 * type: object
61 * description: The shipping option type's details.
62 * required:
63 * - id
64 * - label
65 * - description
66 * - code
67 * properties:
68 * id:
69 * type: string
70 * title: id
71 * description: The type's ID.
72 * label:
73 * type: string
74 * title: label
75 * description: The type's label.
76 * description:
77 * type: string
78 * title: description
79 * description: The type's description.
80 * code:
81 * type: string
82 * title: code
83 * description: The type's code.
84 * shipping_profile_id:
85 * type: string
86 * title: shipping_profile_id
87 * description: The ID of the associated shipping profile.
88 * amount:
89 * type: number
90 * title: amount
91 * description: The shipping option's amount for the cart. For a shipping option whose `price_type` is `calculated`, this amount is computed on the fly by the fulfillment provider against the cart.
92 * data:
93 * type: object
94 * description: The shipping option's data, useful for the provider handling fulfillment.
95 * externalDocs:
96 * url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property
97 * prices:
98 * type: array
99 * description: The shipping option's prices.
100 * items:
101 * $ref: "#/components/schemas/StorePrice"
102 * calculated_price:
103 * $ref: "#/components/schemas/StoreCalculatedPrice"
104 * insufficient_inventory:
105 * type: boolean
106 * title: insufficient_inventory
107 * description: Whether the shipping option's location doesn't have sufficient quantity for any of the cart's items.
108 *
109 */
110