1 /**
2 * @schema AdminCreateFlatRateShippingOption
3 * type: object
4 * description: The flat rate shipping option's details.
5 * x-schemaName: AdminCreateFlatRateShippingOption
6 * required:
7 * - price_type
8 * - prices
9 * - name
10 * - service_zone_id
11 * - shipping_profile_id
12 * - provider_id
13 * properties:
14 * name:
15 * type: string
16 * title: name
17 * description: The flat-rate shipping option's name.
18 * service_zone_id:
19 * type: string
20 * title: service_zone_id
21 * description: The ID of the associated service zone.
22 * shipping_profile_id:
23 * type: string
24 * title: shipping_profile_id
25 * description: The ID of the associated shipping profile.
26 * data:
27 * type: object
28 * description: The flat-rate shipping option's data, useful for the fulfillment provider handling its processing.
29 * externalDocs:
30 * url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property
31 * price_type:
32 * type: string
33 * description: The shipping option's price type. If `flat`, the shipping option has a fixed price set in `prices`. Otherwise, the shipping option's price is calculated by the fulfillment provider.
34 * enum:
35 * - flat
36 * - calculated
37 * provider_id:
38 * type: string
39 * title: provider_id
40 * description: The ID of the fulfillment provider handling this shipping option.
41 * type:
42 * $ref: "#/components/schemas/AdminCreateShippingOptionType"
43 * prices:
44 * type: array
45 * description: The shipping option's prices.
46 * items:
47 * oneOf:
48 * - type: object
49 * description: The price's details.
50 * x-schemaName: AdminCreateShippingOptionPriceWithCurrency
51 * required:
52 * - currency_code
53 * - amount
54 * properties:
55 * currency_code:
56 * type: string
57 * title: currency_code
58 * description: The price's currency code.
59 * example: usd
60 * amount:
61 * type: number
62 * title: amount
63 * description: The price's amount.
64 * rules:
65 * type: array
66 * description: The price's rules.
67 * items:
68 * type: object
69 * description: The rule's details.
70 * x-schemaName: PriceRule
71 * required:
72 * - attribute
73 * - operator
74 * - value
75 * properties:
76 * attribute:
77 * type: string
78 * title: attribute
79 * description: The rule's attribute.
80 * operator:
81 * type: string
82 * description: The rule's operator.
83 * enum:
84 * - gt
85 * - lt
86 * - eq
87 * - lte
88 * - gte
89 * value:
90 * type: number
91 * title: value
92 * description: The rule's value.
93 * - type: object
94 * description: The price's details.
95 * x-schemaName: AdminCreateShippingOptionPriceWithRegion
96 * required:
97 * - region_id
98 * - amount
99 * properties:
100 * region_id:
101 * type: string
102 * title: region_id
103 * description: The ID of the region this price is used in.
104 * amount:
105 * type: number
106 * title: amount
107 * description: The price's amount.
108 * rules:
109 * type: array
110 * description: The price's rules.
111 * items:
112 * type: object
113 * description: The rule's details.
114 * x-schemaName: PriceRule
115 * required:
116 * - attribute
117 * - operator
118 * - value
119 * properties:
120 * attribute:
121 * type: string
122 * title: attribute
123 * description: The rule's attribute.
124 * operator:
125 * type: string
126 * description: The rule's operator.
127 * enum:
128 * - gt
129 * - lt
130 * - eq
131 * - lte
132 * - gte
133 * value:
134 * type: number
135 * title: value
136 * description: The rule's value.
137 * type_id:
138 * type: string
139 * title: type_id
140 * description: The ID of the shipping option type that this shipping option belongs to.
141 * rules:
142 * type: array
143 * description: The shipping option's rules.
144 * items:
145 * $ref: "#/components/schemas/AdminCreateShippingOptionRule"
146 * metadata:
147 * type: object
148 * description: The shipping option's metadata.
149 *
150 */
151