Skip to main content

ghl_models/v2/
store.rs

1//! `store` data models for GoHighLevel API V2 (40 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Store** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`store` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/store.md).
7//!
8//! Enable with `features = ["store"]`.
9// @generated by xtask/generate_models.py — do not edit by hand.
10// Source: https://github.com/GoHighLevel/highlevel-api-docs
11// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
12// they aren't held to rustdoc's markdown conventions.
13#![allow(
14    missing_docs,
15    clippy::doc_lazy_continuation,
16    clippy::doc_overindented_list_items
17)]
18
19use serde::{Deserialize, Serialize};
20
21/// `AvailableShippingRate` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct AvailableShippingRate {
24    /// Name of the shipping zone
25    /// Required by the API.
26    /// (Optional here so responses that omit it still parse.)
27    #[serde(default, skip_serializing_if = "Option::is_none")]
28    pub name: Option<String>,
29    /// Delivery description
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub description: Option<String>,
32    /// The currency of the amount of the rate / handling fee
33    /// Required by the API.
34    /// (Optional here so responses that omit it still parse.)
35    #[serde(default, skip_serializing_if = "Option::is_none")]
36    pub currency: Option<String>,
37    /// The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee
38    /// if it is a carrier rate (it will add to the carrier rate).
39    /// Required by the API.
40    /// (Optional here so responses that omit it still parse.)
41    #[serde(default, skip_serializing_if = "Option::is_none")]
42    pub amount: Option<f64>,
43    /// is this a carrier rate
44    #[serde(
45        rename = "isCarrierRate",
46        default,
47        skip_serializing_if = "Option::is_none"
48    )]
49    pub is_carrier_rate: Option<bool>,
50    /// Shipping carrier id
51    /// Required by the API.
52    /// (Optional here so responses that omit it still parse.)
53    #[serde(
54        rename = "shippingCarrierId",
55        default,
56        skip_serializing_if = "Option::is_none"
57    )]
58    pub shipping_carrier_id: Option<String>,
59    /// Percentage of rate fee if it is a carrier rate.
60    #[serde(
61        rename = "percentageOfRateFee",
62        default,
63        skip_serializing_if = "Option::is_none"
64    )]
65    pub percentage_of_rate_fee: Option<f64>,
66    /// An array of items
67    #[serde(
68        rename = "shippingCarrierServices",
69        default,
70        skip_serializing_if = "Vec::is_empty"
71    )]
72    pub shipping_carrier_services: Vec<ShippingCarrierServiceDto>,
73    /// The unique identifier for the product.
74    /// Required by the API.
75    /// (Optional here so responses that omit it still parse.)
76    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
77    pub id: Option<String>,
78    /// The unique identifier for the shipping zone.
79    /// Required by the API.
80    /// (Optional here so responses that omit it still parse.)
81    #[serde(
82        rename = "shippingZoneId",
83        default,
84        skip_serializing_if = "Option::is_none"
85    )]
86    pub shipping_zone_id: Option<String>,
87}
88
89/// `ContactAddress` from the GoHighLevel OpenAPI spec.
90#[derive(Debug, Clone, Default, Serialize, Deserialize)]
91pub struct ContactAddress {
92    /// Name of the customer
93    #[serde(default, skip_serializing_if = "Option::is_none")]
94    pub name: Option<String>,
95    /// Name of the Company
96    #[serde(
97        rename = "companyName",
98        default,
99        skip_serializing_if = "Option::is_none"
100    )]
101    pub company_name: Option<String>,
102    /// Address line 1 of the customer
103    #[serde(
104        rename = "addressLine1",
105        default,
106        skip_serializing_if = "Option::is_none"
107    )]
108    pub address_line1: Option<String>,
109    /// Country code of the customer
110    /// Allowed values: `US`, `CA`, `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`.
111    /// Required by the API.
112    pub country: String,
113    /// State code of the customer
114    /// Allowed values: `AL`, `AK`, `AS`, `AZ`, `AR`, `AA`, `AE`, `AP`, `CA`, `CO`, `CT`, `DE`.
115    #[serde(default, skip_serializing_if = "Option::is_none")]
116    pub state: Option<String>,
117    /// City of the customer
118    #[serde(default, skip_serializing_if = "Option::is_none")]
119    pub city: Option<String>,
120    /// Zip code of the customer
121    #[serde(default, skip_serializing_if = "Option::is_none")]
122    pub zip: Option<String>,
123    /// Phone number of the customer
124    #[serde(default, skip_serializing_if = "Option::is_none")]
125    pub phone: Option<String>,
126    /// Email of the customer
127    #[serde(default, skip_serializing_if = "Option::is_none")]
128    pub email: Option<String>,
129}
130
131/// `CreateShippingCarrierDto` from the GoHighLevel OpenAPI spec.
132#[derive(Debug, Clone, Default, Serialize, Deserialize)]
133pub struct CreateShippingCarrierDto {
134    /// Location Id or Agency Id
135    /// Required by the API.
136    #[serde(rename = "altId")]
137    pub alt_id: String,
138    /// Allowed values: `location`.
139    /// Required by the API.
140    #[serde(rename = "altType")]
141    pub alt_type: String,
142    /// Name of the shipping carrier
143    /// Required by the API.
144    pub name: String,
145    /// The URL endpoint that GHL needs to retrieve shipping rates. This must be a public URL.
146    /// Required by the API.
147    #[serde(rename = "callbackUrl")]
148    pub callback_url: String,
149    /// An array of available shipping carrier services
150    #[serde(default, skip_serializing_if = "Vec::is_empty")]
151    pub services: Vec<ShippingCarrierServiceDto>,
152    /// The seller can choose multiple services while creating shipping rates if this is true.
153    #[serde(
154        rename = "allowsMultipleServiceSelection",
155        default,
156        skip_serializing_if = "Option::is_none"
157    )]
158    pub allows_multiple_service_selection: Option<bool>,
159}
160
161/// `CreateShippingCarrierResponseDto` from the GoHighLevel OpenAPI spec.
162#[derive(Debug, Clone, Default, Serialize, Deserialize)]
163pub struct CreateShippingCarrierResponseDto {
164    /// Status of api action
165    /// Required by the API.
166    /// (Optional here so responses that omit it still parse.)
167    #[serde(default, skip_serializing_if = "Option::is_none")]
168    pub status: Option<bool>,
169    /// Success message
170    #[serde(default, skip_serializing_if = "Option::is_none")]
171    pub message: Option<String>,
172    /// Shipping carrier data
173    /// Required by the API.
174    /// (Optional here so responses that omit it still parse.)
175    #[serde(default, skip_serializing_if = "Option::is_none")]
176    pub data: Option<ShippingCarrierSchema>,
177}
178
179/// `CreateShippingRateDto` from the GoHighLevel OpenAPI spec.
180#[derive(Debug, Clone, Default, Serialize, Deserialize)]
181pub struct CreateShippingRateDto {
182    /// Location Id or Agency Id
183    /// Required by the API.
184    #[serde(rename = "altId")]
185    pub alt_id: String,
186    /// Allowed values: `location`.
187    /// Required by the API.
188    #[serde(rename = "altType")]
189    pub alt_type: String,
190    /// Name of the shipping zone
191    /// Required by the API.
192    pub name: String,
193    /// Delivery description
194    #[serde(default, skip_serializing_if = "Option::is_none")]
195    pub description: Option<String>,
196    /// The currency of the amount of the rate / handling fee
197    /// Required by the API.
198    pub currency: String,
199    /// The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee
200    /// if it is a carrier rate (it will add to the carrier rate).
201    /// Required by the API.
202    pub amount: f64,
203    /// Type of condition to provide the conditional pricing
204    /// Allowed values: `none`, `price`, `weight`.
205    /// Required by the API.
206    #[serde(rename = "conditionType")]
207    pub condition_type: String,
208    /// Minimum condition for applying this price. set 0 or null if there is no minimum
209    /// Required by the API.
210    #[serde(rename = "minCondition")]
211    pub min_condition: f64,
212    /// Maximum condition for applying this price. set 0 or null if there is no maximum
213    /// Required by the API.
214    #[serde(rename = "maxCondition")]
215    pub max_condition: f64,
216    /// is this a carrier rate
217    #[serde(
218        rename = "isCarrierRate",
219        default,
220        skip_serializing_if = "Option::is_none"
221    )]
222    pub is_carrier_rate: Option<bool>,
223    /// Shipping carrier id
224    /// Required by the API.
225    #[serde(rename = "shippingCarrierId")]
226    pub shipping_carrier_id: String,
227    /// Percentage of rate fee if it is a carrier rate.
228    #[serde(
229        rename = "percentageOfRateFee",
230        default,
231        skip_serializing_if = "Option::is_none"
232    )]
233    pub percentage_of_rate_fee: Option<f64>,
234    /// An array of items
235    #[serde(
236        rename = "shippingCarrierServices",
237        default,
238        skip_serializing_if = "Vec::is_empty"
239    )]
240    pub shipping_carrier_services: Vec<ShippingCarrierServiceDto>,
241}
242
243/// `CreateShippingRateResponseDto` from the GoHighLevel OpenAPI spec.
244#[derive(Debug, Clone, Default, Serialize, Deserialize)]
245pub struct CreateShippingRateResponseDto {
246    /// Status of api action
247    /// Required by the API.
248    /// (Optional here so responses that omit it still parse.)
249    #[serde(default, skip_serializing_if = "Option::is_none")]
250    pub status: Option<bool>,
251    /// Success message
252    #[serde(default, skip_serializing_if = "Option::is_none")]
253    pub message: Option<String>,
254    /// Shipping zone data
255    /// Required by the API.
256    /// (Optional here so responses that omit it still parse.)
257    #[serde(default, skip_serializing_if = "Option::is_none")]
258    pub data: Option<ShippingRateSchema>,
259}
260
261/// `CreateShippingZoneDto` from the GoHighLevel OpenAPI spec.
262#[derive(Debug, Clone, Default, Serialize, Deserialize)]
263pub struct CreateShippingZoneDto {
264    /// Location Id or Agency Id
265    /// Required by the API.
266    #[serde(rename = "altId")]
267    pub alt_id: String,
268    /// Allowed values: `location`.
269    /// Required by the API.
270    #[serde(rename = "altType")]
271    pub alt_type: String,
272    /// Name of the shipping zone
273    /// Required by the API.
274    pub name: String,
275    /// List of countries that are available
276    /// Required by the API.
277    #[serde(default, skip_serializing_if = "Vec::is_empty")]
278    pub countries: Vec<ShippingZoneCountryDto>,
279}
280
281/// `CreateShippingZoneResponseDto` from the GoHighLevel OpenAPI spec.
282#[derive(Debug, Clone, Default, Serialize, Deserialize)]
283pub struct CreateShippingZoneResponseDto {
284    /// Status of api action
285    /// Required by the API.
286    /// (Optional here so responses that omit it still parse.)
287    #[serde(default, skip_serializing_if = "Option::is_none")]
288    pub status: Option<bool>,
289    /// Success message
290    #[serde(default, skip_serializing_if = "Option::is_none")]
291    pub message: Option<String>,
292    /// Shipping zone data
293    /// Required by the API.
294    /// (Optional here so responses that omit it still parse.)
295    #[serde(default, skip_serializing_if = "Option::is_none")]
296    pub data: Option<ShippingZoneSchema>,
297}
298
299/// `CreateStoreSettingDto` from the GoHighLevel OpenAPI spec.
300#[derive(Debug, Clone, Default, Serialize, Deserialize)]
301pub struct CreateStoreSettingDto {
302    /// Location Id or Agency Id
303    /// Required by the API.
304    #[serde(rename = "altId")]
305    pub alt_id: String,
306    /// Allowed values: `location`.
307    /// Required by the API.
308    #[serde(rename = "altType")]
309    pub alt_type: String,
310    /// Shipping origin address
311    /// Required by the API.
312    #[serde(rename = "shippingOrigin")]
313    pub shipping_origin: StoreShippingOriginDto,
314    /// Store order notification email
315    #[serde(
316        rename = "storeOrderNotification",
317        default,
318        skip_serializing_if = "Option::is_none"
319    )]
320    pub store_order_notification: Option<StoreOrderNotificationDto>,
321    /// Store order fulfillment notification email
322    #[serde(
323        rename = "storeOrderFulfillmentNotification",
324        default,
325        skip_serializing_if = "Option::is_none"
326    )]
327    pub store_order_fulfillment_notification: Option<StoreOrderFulfillmentNotificationDto>,
328}
329
330/// `CreateStoreSettingResponseDto` from the GoHighLevel OpenAPI spec.
331#[derive(Debug, Clone, Default, Serialize, Deserialize)]
332pub struct CreateStoreSettingResponseDto {
333    /// Status of api action
334    /// Required by the API.
335    /// (Optional here so responses that omit it still parse.)
336    #[serde(default, skip_serializing_if = "Option::is_none")]
337    pub status: Option<bool>,
338    /// Success message
339    #[serde(default, skip_serializing_if = "Option::is_none")]
340    pub message: Option<String>,
341    /// Shipping carrier data
342    /// Required by the API.
343    /// (Optional here so responses that omit it still parse.)
344    #[serde(default, skip_serializing_if = "Option::is_none")]
345    pub data: Option<StoreSettingSchema>,
346}
347
348/// `DeleteShippingCarrierResponseDto` from the GoHighLevel OpenAPI spec.
349#[derive(Debug, Clone, Default, Serialize, Deserialize)]
350pub struct DeleteShippingCarrierResponseDto {
351    /// Status of api action
352    /// Required by the API.
353    /// (Optional here so responses that omit it still parse.)
354    #[serde(default, skip_serializing_if = "Option::is_none")]
355    pub status: Option<bool>,
356    /// Success message
357    #[serde(default, skip_serializing_if = "Option::is_none")]
358    pub message: Option<String>,
359}
360
361/// `DeleteShippingRateResponseDto` from the GoHighLevel OpenAPI spec.
362#[derive(Debug, Clone, Default, Serialize, Deserialize)]
363pub struct DeleteShippingRateResponseDto {
364    /// Status of api action
365    /// Required by the API.
366    /// (Optional here so responses that omit it still parse.)
367    #[serde(default, skip_serializing_if = "Option::is_none")]
368    pub status: Option<bool>,
369    /// Success message
370    #[serde(default, skip_serializing_if = "Option::is_none")]
371    pub message: Option<String>,
372}
373
374/// `DeleteShippingZoneResponseDto` from the GoHighLevel OpenAPI spec.
375#[derive(Debug, Clone, Default, Serialize, Deserialize)]
376pub struct DeleteShippingZoneResponseDto {
377    /// Status of api action
378    /// Required by the API.
379    /// (Optional here so responses that omit it still parse.)
380    #[serde(default, skip_serializing_if = "Option::is_none")]
381    pub status: Option<bool>,
382    /// Success message
383    #[serde(default, skip_serializing_if = "Option::is_none")]
384    pub message: Option<String>,
385}
386
387/// `GetAvailableShippingRates` from the GoHighLevel OpenAPI spec.
388#[derive(Debug, Clone, Default, Serialize, Deserialize)]
389pub struct GetAvailableShippingRates {
390    /// Location Id or Agency Id
391    /// Required by the API.
392    #[serde(rename = "altId")]
393    pub alt_id: String,
394    /// Allowed values: `location`.
395    /// Required by the API.
396    #[serde(rename = "altType")]
397    pub alt_type: String,
398    /// Country code of the customer
399    /// Allowed values: `US`, `CA`, `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`.
400    /// Required by the API.
401    pub country: String,
402    /// Address of the customer
403    #[serde(default, skip_serializing_if = "Option::is_none")]
404    pub address: Option<ContactAddress>,
405    /// it will not calculate the order amount form backend if it is true
406    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
407    #[serde(
408        rename = "amountAvailable",
409        default,
410        skip_serializing_if = "Option::is_none"
411    )]
412    pub amount_available: Option<String>,
413    /// The amount of the price. ( min: 0.01 )
414    /// Required by the API.
415    #[serde(rename = "totalOrderAmount")]
416    pub total_order_amount: f64,
417    /// Flag to pass when the weight is already calculated and should not calculate again
418    #[serde(
419        rename = "weightAvailable",
420        default,
421        skip_serializing_if = "Option::is_none"
422    )]
423    pub weight_available: Option<bool>,
424    /// Estimated weight of the order calculated from the order creation side in kg(s)
425    /// Required by the API.
426    #[serde(rename = "totalOrderWeight")]
427    pub total_order_weight: f64,
428    /// Source of the order
429    /// Required by the API.
430    pub source: OrderSource,
431    /// An array of price IDs and quantity
432    /// Required by the API.
433    #[serde(default, skip_serializing_if = "Vec::is_empty")]
434    pub products: Vec<ProductItem>,
435    /// Coupon code
436    #[serde(
437        rename = "couponCode",
438        default,
439        skip_serializing_if = "Option::is_none"
440    )]
441    pub coupon_code: Option<String>,
442}
443
444/// `GetAvailableShippingRatesResponseDto` from the GoHighLevel OpenAPI spec.
445#[derive(Debug, Clone, Default, Serialize, Deserialize)]
446pub struct GetAvailableShippingRatesResponseDto {
447    /// Status of api action
448    /// Required by the API.
449    /// (Optional here so responses that omit it still parse.)
450    #[serde(default, skip_serializing_if = "Option::is_none")]
451    pub status: Option<bool>,
452    /// Success message
453    #[serde(default, skip_serializing_if = "Option::is_none")]
454    pub message: Option<String>,
455    /// Shipping rate data
456    /// Required by the API.
457    /// (Optional here so responses that omit it still parse.)
458    #[serde(default, skip_serializing_if = "Vec::is_empty")]
459    pub data: Vec<AvailableShippingRate>,
460}
461
462/// `GetShippingCarrierResponseDto` from the GoHighLevel OpenAPI spec.
463#[derive(Debug, Clone, Default, Serialize, Deserialize)]
464pub struct GetShippingCarrierResponseDto {
465    /// Status of api action
466    /// Required by the API.
467    /// (Optional here so responses that omit it still parse.)
468    #[serde(default, skip_serializing_if = "Option::is_none")]
469    pub status: Option<bool>,
470    /// Success message
471    #[serde(default, skip_serializing_if = "Option::is_none")]
472    pub message: Option<String>,
473    /// Shipping carrier data
474    /// Required by the API.
475    /// (Optional here so responses that omit it still parse.)
476    #[serde(default, skip_serializing_if = "Option::is_none")]
477    pub data: Option<ShippingCarrierSchema>,
478}
479
480/// `GetShippingRateResponseDto` from the GoHighLevel OpenAPI spec.
481#[derive(Debug, Clone, Default, Serialize, Deserialize)]
482pub struct GetShippingRateResponseDto {
483    /// Status of api action
484    /// Required by the API.
485    /// (Optional here so responses that omit it still parse.)
486    #[serde(default, skip_serializing_if = "Option::is_none")]
487    pub status: Option<bool>,
488    /// Success message
489    #[serde(default, skip_serializing_if = "Option::is_none")]
490    pub message: Option<String>,
491    /// Shipping zone data
492    /// Required by the API.
493    /// (Optional here so responses that omit it still parse.)
494    #[serde(default, skip_serializing_if = "Option::is_none")]
495    pub data: Option<ShippingRateSchema>,
496}
497
498/// `GetShippingZoneResponseDto` from the GoHighLevel OpenAPI spec.
499#[derive(Debug, Clone, Default, Serialize, Deserialize)]
500pub struct GetShippingZoneResponseDto {
501    /// Status of api action
502    /// Required by the API.
503    /// (Optional here so responses that omit it still parse.)
504    #[serde(default, skip_serializing_if = "Option::is_none")]
505    pub status: Option<bool>,
506    /// Success message
507    #[serde(default, skip_serializing_if = "Option::is_none")]
508    pub message: Option<String>,
509    /// Shipping zone data
510    /// Required by the API.
511    /// (Optional here so responses that omit it still parse.)
512    #[serde(default, skip_serializing_if = "Option::is_none")]
513    pub data: Option<ShippingZoneSchema>,
514}
515
516/// `GetStoreSettingResponseDto` from the GoHighLevel OpenAPI spec.
517#[derive(Debug, Clone, Default, Serialize, Deserialize)]
518pub struct GetStoreSettingResponseDto {
519    /// Status of api action
520    /// Required by the API.
521    /// (Optional here so responses that omit it still parse.)
522    #[serde(default, skip_serializing_if = "Option::is_none")]
523    pub status: Option<bool>,
524    /// Success message
525    #[serde(default, skip_serializing_if = "Option::is_none")]
526    pub message: Option<String>,
527    /// Shipping carrier data
528    /// Required by the API.
529    /// (Optional here so responses that omit it still parse.)
530    #[serde(default, skip_serializing_if = "Option::is_none")]
531    pub data: Option<StoreSettingSchema>,
532}
533
534/// `ListShippingCarrierResponseDto` from the GoHighLevel OpenAPI spec.
535#[derive(Debug, Clone, Default, Serialize, Deserialize)]
536pub struct ListShippingCarrierResponseDto {
537    /// Status of api action
538    /// Required by the API.
539    /// (Optional here so responses that omit it still parse.)
540    #[serde(default, skip_serializing_if = "Option::is_none")]
541    pub status: Option<bool>,
542    /// Success message
543    #[serde(default, skip_serializing_if = "Option::is_none")]
544    pub message: Option<String>,
545    /// An array of items
546    /// Required by the API.
547    /// (Optional here so responses that omit it still parse.)
548    #[serde(default, skip_serializing_if = "Vec::is_empty")]
549    pub data: Vec<ShippingCarrierSchema>,
550}
551
552/// `ListShippingRateResponseDto` from the GoHighLevel OpenAPI spec.
553#[derive(Debug, Clone, Default, Serialize, Deserialize)]
554pub struct ListShippingRateResponseDto {
555    /// Total number of items
556    /// Required by the API.
557    /// (Optional here so responses that omit it still parse.)
558    #[serde(default, skip_serializing_if = "Option::is_none")]
559    pub total: Option<f64>,
560    /// An array of items
561    /// Required by the API.
562    /// (Optional here so responses that omit it still parse.)
563    #[serde(default, skip_serializing_if = "Vec::is_empty")]
564    pub data: Vec<ShippingRateSchema>,
565}
566
567/// `ListShippingZoneResponseDto` from the GoHighLevel OpenAPI spec.
568#[derive(Debug, Clone, Default, Serialize, Deserialize)]
569pub struct ListShippingZoneResponseDto {
570    /// Total number of items
571    /// Required by the API.
572    /// (Optional here so responses that omit it still parse.)
573    #[serde(default, skip_serializing_if = "Option::is_none")]
574    pub total: Option<f64>,
575    /// An array of items
576    /// Required by the API.
577    /// (Optional here so responses that omit it still parse.)
578    #[serde(default, skip_serializing_if = "Vec::is_empty")]
579    pub data: Vec<ShippingZoneSchema>,
580}
581
582/// `OrderSource` from the GoHighLevel OpenAPI spec.
583#[derive(Debug, Clone, Default, Serialize, Deserialize)]
584pub struct OrderSource {
585    /// Source of order
586    /// Allowed values: `funnel`, `website`, `invoice`, `calendar`, `text2Pay`,
587    /// `document_contracts`, `membership`, `mobile_app`, `communities`, `point_of_sale`,
588    /// `manual`, `form`.
589    /// Required by the API.
590    #[serde(rename = "type")]
591    pub type_: String,
592    /// Source subtype of order
593    /// Allowed values: `one_step_order_form`, `two_step_order_form`, `upsell`, `tap_to_pay`,
594    /// `card_payment`, `store`, `contact_view`, `email_campaign`, `payments_dashboard`,
595    /// `shopify`, `subscription_view`, `store_upsell`.
596    #[serde(rename = "subType", default, skip_serializing_if = "Option::is_none")]
597    pub sub_type: Option<String>,
598}
599
600/// `ProductItem` from the GoHighLevel OpenAPI spec.
601#[derive(Debug, Clone, Default, Serialize, Deserialize)]
602pub struct ProductItem {
603    /// id of product
604    /// Required by the API.
605    pub id: String,
606    /// No of quantities
607    /// Required by the API.
608    pub qty: f64,
609}
610
611/// `ShippingCarrierSchema` from the GoHighLevel OpenAPI spec.
612#[derive(Debug, Clone, Default, Serialize, Deserialize)]
613pub struct ShippingCarrierSchema {
614    /// Location Id or Agency Id
615    /// Required by the API.
616    /// (Optional here so responses that omit it still parse.)
617    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
618    pub alt_id: Option<String>,
619    /// Allowed values: `location`.
620    /// Required by the API.
621    /// (Optional here so responses that omit it still parse.)
622    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
623    pub alt_type: Option<String>,
624    /// Name of the shipping carrier
625    /// Required by the API.
626    /// (Optional here so responses that omit it still parse.)
627    #[serde(default, skip_serializing_if = "Option::is_none")]
628    pub name: Option<String>,
629    /// The URL endpoint that GHL needs to retrieve shipping rates. This must be a public URL.
630    /// Required by the API.
631    /// (Optional here so responses that omit it still parse.)
632    #[serde(
633        rename = "callbackUrl",
634        default,
635        skip_serializing_if = "Option::is_none"
636    )]
637    pub callback_url: Option<String>,
638    /// An array of available shipping carrier services
639    #[serde(default, skip_serializing_if = "Vec::is_empty")]
640    pub services: Vec<ShippingCarrierServiceDto>,
641    /// The seller can choose multiple services while creating shipping rates if this is true.
642    #[serde(
643        rename = "allowsMultipleServiceSelection",
644        default,
645        skip_serializing_if = "Option::is_none"
646    )]
647    pub allows_multiple_service_selection: Option<bool>,
648    /// The unique identifier for the product.
649    /// Required by the API.
650    /// (Optional here so responses that omit it still parse.)
651    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
652    pub id: Option<String>,
653    /// The unique identifier for the marketplace app.
654    /// Required by the API.
655    /// (Optional here so responses that omit it still parse.)
656    #[serde(
657        rename = "marketplaceAppId",
658        default,
659        skip_serializing_if = "Option::is_none"
660    )]
661    pub marketplace_app_id: Option<String>,
662    /// created at
663    /// Required by the API.
664    /// (Optional here so responses that omit it still parse.)
665    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
666    pub created_at: Option<String>,
667    /// updated at
668    /// Required by the API.
669    /// (Optional here so responses that omit it still parse.)
670    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
671    pub updated_at: Option<String>,
672}
673
674/// `ShippingCarrierServiceDto` from the GoHighLevel OpenAPI spec.
675#[derive(Debug, Clone, Default, Serialize, Deserialize)]
676pub struct ShippingCarrierServiceDto {
677    /// Name of the shipping carrier service
678    /// Required by the API.
679    /// (Optional here so responses that omit it still parse.)
680    #[serde(default, skip_serializing_if = "Option::is_none")]
681    pub name: Option<String>,
682    /// Value of the shipping carrier service
683    /// Required by the API.
684    /// (Optional here so responses that omit it still parse.)
685    #[serde(default, skip_serializing_if = "Option::is_none")]
686    pub value: Option<String>,
687}
688
689/// `ShippingRateSchema` from the GoHighLevel OpenAPI spec.
690#[derive(Debug, Clone, Default, Serialize, Deserialize)]
691pub struct ShippingRateSchema {
692    /// Location Id or Agency Id
693    /// Required by the API.
694    /// (Optional here so responses that omit it still parse.)
695    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
696    pub alt_id: Option<String>,
697    /// Allowed values: `location`.
698    /// Required by the API.
699    /// (Optional here so responses that omit it still parse.)
700    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
701    pub alt_type: Option<String>,
702    /// Name of the shipping zone
703    /// Required by the API.
704    /// (Optional here so responses that omit it still parse.)
705    #[serde(default, skip_serializing_if = "Option::is_none")]
706    pub name: Option<String>,
707    /// Delivery description
708    #[serde(default, skip_serializing_if = "Option::is_none")]
709    pub description: Option<String>,
710    /// The currency of the amount of the rate / handling fee
711    /// Required by the API.
712    /// (Optional here so responses that omit it still parse.)
713    #[serde(default, skip_serializing_if = "Option::is_none")]
714    pub currency: Option<String>,
715    /// The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee
716    /// if it is a carrier rate (it will add to the carrier rate).
717    /// Required by the API.
718    /// (Optional here so responses that omit it still parse.)
719    #[serde(default, skip_serializing_if = "Option::is_none")]
720    pub amount: Option<f64>,
721    /// Type of condition to provide the conditional pricing
722    /// Allowed values: `none`, `price`, `weight`.
723    /// Required by the API.
724    /// (Optional here so responses that omit it still parse.)
725    #[serde(
726        rename = "conditionType",
727        default,
728        skip_serializing_if = "Option::is_none"
729    )]
730    pub condition_type: Option<String>,
731    /// Minimum condition for applying this price. set 0 or null if there is no minimum
732    /// Required by the API.
733    /// (Optional here so responses that omit it still parse.)
734    #[serde(
735        rename = "minCondition",
736        default,
737        skip_serializing_if = "Option::is_none"
738    )]
739    pub min_condition: Option<f64>,
740    /// Maximum condition for applying this price. set 0 or null if there is no maximum
741    /// Required by the API.
742    /// (Optional here so responses that omit it still parse.)
743    #[serde(
744        rename = "maxCondition",
745        default,
746        skip_serializing_if = "Option::is_none"
747    )]
748    pub max_condition: Option<f64>,
749    /// is this a carrier rate
750    #[serde(
751        rename = "isCarrierRate",
752        default,
753        skip_serializing_if = "Option::is_none"
754    )]
755    pub is_carrier_rate: Option<bool>,
756    /// Shipping carrier id
757    /// Required by the API.
758    /// (Optional here so responses that omit it still parse.)
759    #[serde(
760        rename = "shippingCarrierId",
761        default,
762        skip_serializing_if = "Option::is_none"
763    )]
764    pub shipping_carrier_id: Option<String>,
765    /// Percentage of rate fee if it is a carrier rate.
766    #[serde(
767        rename = "percentageOfRateFee",
768        default,
769        skip_serializing_if = "Option::is_none"
770    )]
771    pub percentage_of_rate_fee: Option<f64>,
772    /// An array of items
773    #[serde(
774        rename = "shippingCarrierServices",
775        default,
776        skip_serializing_if = "Vec::is_empty"
777    )]
778    pub shipping_carrier_services: Vec<ShippingCarrierServiceDto>,
779    /// The unique identifier for the product.
780    /// Required by the API.
781    /// (Optional here so responses that omit it still parse.)
782    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
783    pub id: Option<String>,
784    /// The unique identifier for the shipping zone.
785    /// Required by the API.
786    /// (Optional here so responses that omit it still parse.)
787    #[serde(
788        rename = "shippingZoneId",
789        default,
790        skip_serializing_if = "Option::is_none"
791    )]
792    pub shipping_zone_id: Option<String>,
793    /// created at
794    /// Required by the API.
795    /// (Optional here so responses that omit it still parse.)
796    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
797    pub created_at: Option<String>,
798    /// updated at
799    /// Required by the API.
800    /// (Optional here so responses that omit it still parse.)
801    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
802    pub updated_at: Option<String>,
803}
804
805/// `ShippingZoneCountryDto` from the GoHighLevel OpenAPI spec.
806#[derive(Debug, Clone, Default, Serialize, Deserialize)]
807pub struct ShippingZoneCountryDto {
808    /// Country code
809    /// Allowed values: `['US', 'CA', 'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ',
810    /// 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ',
811    /// 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH',
812    /// 'CM', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK',
813    /// 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ',
814    /// 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE',
815    /// 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT',
816    /// 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT',
817    /// 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'XK', 'KW', 'KG', 'LA', 'LV', 'LB',
818    /// 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT',
819    /// 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ',
820    /// 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP',
821    /// 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR',
822    /// 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST',
823    /// 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'KR',
824    /// 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL',
825    /// 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'UM',
826    /// 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW']`.
827    /// Required by the API.
828    /// (Optional here so responses that omit it still parse.)
829    #[serde(default, skip_serializing_if = "Option::is_none")]
830    pub code: Option<String>,
831    /// List of states that are available. If states is empty, then all states are available
832    #[serde(default, skip_serializing_if = "Vec::is_empty")]
833    pub states: Vec<ShippingZoneCountryStateDto>,
834}
835
836/// `ShippingZoneCountryStateDto` from the GoHighLevel OpenAPI spec.
837#[derive(Debug, Clone, Default, Serialize, Deserialize)]
838pub struct ShippingZoneCountryStateDto {
839    /// State code
840    /// Allowed values: `AL`, `AK`, `AS`, `AZ`, `AR`, `AA`, `AE`, `AP`, `CA`, `CO`, `CT`, `DE`.
841    /// Required by the API.
842    /// (Optional here so responses that omit it still parse.)
843    #[serde(default, skip_serializing_if = "Option::is_none")]
844    pub code: Option<String>,
845}
846
847/// `ShippingZoneSchema` from the GoHighLevel OpenAPI spec.
848#[derive(Debug, Clone, Default, Serialize, Deserialize)]
849pub struct ShippingZoneSchema {
850    /// Location Id or Agency Id
851    /// Required by the API.
852    /// (Optional here so responses that omit it still parse.)
853    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
854    pub alt_id: Option<String>,
855    /// Allowed values: `location`.
856    /// Required by the API.
857    /// (Optional here so responses that omit it still parse.)
858    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
859    pub alt_type: Option<String>,
860    /// Name of the shipping zone
861    /// Required by the API.
862    /// (Optional here so responses that omit it still parse.)
863    #[serde(default, skip_serializing_if = "Option::is_none")]
864    pub name: Option<String>,
865    /// List of countries that are available
866    /// Required by the API.
867    /// (Optional here so responses that omit it still parse.)
868    #[serde(default, skip_serializing_if = "Vec::is_empty")]
869    pub countries: Vec<ShippingZoneCountryDto>,
870    /// The unique identifier for the product.
871    /// Required by the API.
872    /// (Optional here so responses that omit it still parse.)
873    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
874    pub id: Option<String>,
875    /// Array of shipping rates under this shipping zone
876    #[serde(
877        rename = "shippingRates",
878        default,
879        skip_serializing_if = "Vec::is_empty"
880    )]
881    pub shipping_rates: Vec<ShippingRateSchema>,
882    /// created at
883    /// Required by the API.
884    /// (Optional here so responses that omit it still parse.)
885    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
886    pub created_at: Option<String>,
887    /// updated at
888    /// Required by the API.
889    /// (Optional here so responses that omit it still parse.)
890    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
891    pub updated_at: Option<String>,
892}
893
894/// `StoreOrderFulfillmentNotificationDto` from the GoHighLevel OpenAPI spec.
895#[derive(Debug, Clone, Default, Serialize, Deserialize)]
896pub struct StoreOrderFulfillmentNotificationDto {
897    /// Store order fulfillment notification enabled
898    /// Required by the API.
899    /// (Optional here so responses that omit it still parse.)
900    #[serde(default, skip_serializing_if = "Option::is_none")]
901    pub enabled: Option<bool>,
902    /// Store order fulfillment email subject
903    /// Required by the API.
904    /// (Optional here so responses that omit it still parse.)
905    #[serde(default, skip_serializing_if = "Option::is_none")]
906    pub subject: Option<String>,
907    /// Email Template Id
908    /// Required by the API.
909    /// (Optional here so responses that omit it still parse.)
910    #[serde(
911        rename = "emailTemplateId",
912        default,
913        skip_serializing_if = "Option::is_none"
914    )]
915    pub email_template_id: Option<String>,
916    /// Default Email Template Id
917    /// Required by the API.
918    /// (Optional here so responses that omit it still parse.)
919    #[serde(
920        rename = "defaultEmailTemplateId",
921        default,
922        skip_serializing_if = "Option::is_none"
923    )]
924    pub default_email_template_id: Option<String>,
925}
926
927/// `StoreOrderNotificationDto` from the GoHighLevel OpenAPI spec.
928#[derive(Debug, Clone, Default, Serialize, Deserialize)]
929pub struct StoreOrderNotificationDto {
930    /// Store order notification enabled
931    /// Required by the API.
932    /// (Optional here so responses that omit it still parse.)
933    #[serde(default, skip_serializing_if = "Option::is_none")]
934    pub enabled: Option<bool>,
935    /// Store order email subject
936    /// Required by the API.
937    /// (Optional here so responses that omit it still parse.)
938    #[serde(default, skip_serializing_if = "Option::is_none")]
939    pub subject: Option<String>,
940    /// Email Template Id
941    /// Required by the API.
942    /// (Optional here so responses that omit it still parse.)
943    #[serde(
944        rename = "emailTemplateId",
945        default,
946        skip_serializing_if = "Option::is_none"
947    )]
948    pub email_template_id: Option<String>,
949    /// Default Email Template Id
950    /// Required by the API.
951    /// (Optional here so responses that omit it still parse.)
952    #[serde(
953        rename = "defaultEmailTemplateId",
954        default,
955        skip_serializing_if = "Option::is_none"
956    )]
957    pub default_email_template_id: Option<String>,
958}
959
960/// `StoreSettingSchema` from the GoHighLevel OpenAPI spec.
961#[derive(Debug, Clone, Default, Serialize, Deserialize)]
962pub struct StoreSettingSchema {
963    /// Location Id or Agency Id
964    /// Required by the API.
965    /// (Optional here so responses that omit it still parse.)
966    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
967    pub alt_id: Option<String>,
968    /// Allowed values: `location`.
969    /// Required by the API.
970    /// (Optional here so responses that omit it still parse.)
971    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
972    pub alt_type: Option<String>,
973    /// Shipping origin address
974    /// Required by the API.
975    /// (Optional here so responses that omit it still parse.)
976    #[serde(
977        rename = "shippingOrigin",
978        default,
979        skip_serializing_if = "Option::is_none"
980    )]
981    pub shipping_origin: Option<StoreShippingOriginDto>,
982    /// Store order notification email
983    #[serde(
984        rename = "storeOrderNotification",
985        default,
986        skip_serializing_if = "Option::is_none"
987    )]
988    pub store_order_notification: Option<StoreOrderNotificationDto>,
989    /// Store order fulfillment notification email
990    #[serde(
991        rename = "storeOrderFulfillmentNotification",
992        default,
993        skip_serializing_if = "Option::is_none"
994    )]
995    pub store_order_fulfillment_notification: Option<StoreOrderFulfillmentNotificationDto>,
996    /// The unique identifier for the settings.
997    /// Required by the API.
998    /// (Optional here so responses that omit it still parse.)
999    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
1000    pub id: Option<String>,
1001    /// created at
1002    /// Required by the API.
1003    /// (Optional here so responses that omit it still parse.)
1004    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1005    pub created_at: Option<String>,
1006    /// updated at
1007    /// Required by the API.
1008    /// (Optional here so responses that omit it still parse.)
1009    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1010    pub updated_at: Option<String>,
1011}
1012
1013/// `StoreShippingOriginDto` from the GoHighLevel OpenAPI spec.
1014#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1015pub struct StoreShippingOriginDto {
1016    /// Name of the store / company
1017    /// Required by the API.
1018    /// (Optional here so responses that omit it still parse.)
1019    #[serde(default, skip_serializing_if = "Option::is_none")]
1020    pub name: Option<String>,
1021    /// Country code
1022    /// Allowed values: `['US', 'CA', 'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ',
1023    /// 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ',
1024    /// 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH',
1025    /// 'CM', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK',
1026    /// 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ',
1027    /// 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE',
1028    /// 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT',
1029    /// 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT',
1030    /// 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'XK', 'KW', 'KG', 'LA', 'LV', 'LB',
1031    /// 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT',
1032    /// 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ',
1033    /// 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP',
1034    /// 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR',
1035    /// 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST',
1036    /// 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'KR',
1037    /// 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL',
1038    /// 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'UM',
1039    /// 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW']`.
1040    /// Required by the API.
1041    /// (Optional here so responses that omit it still parse.)
1042    #[serde(default, skip_serializing_if = "Option::is_none")]
1043    pub country: Option<String>,
1044    /// State code
1045    /// Allowed values: `AL`, `AK`, `AS`, `AZ`, `AR`, `AA`, `AE`, `AP`, `CA`, `CO`, `CT`, `DE`.
1046    #[serde(default, skip_serializing_if = "Option::is_none")]
1047    pub state: Option<String>,
1048    /// City name
1049    /// Required by the API.
1050    /// (Optional here so responses that omit it still parse.)
1051    #[serde(default, skip_serializing_if = "Option::is_none")]
1052    pub city: Option<String>,
1053    /// Street address line 1
1054    /// Required by the API.
1055    /// (Optional here so responses that omit it still parse.)
1056    #[serde(default, skip_serializing_if = "Option::is_none")]
1057    pub street1: Option<String>,
1058    /// Street address line 2
1059    #[serde(default, skip_serializing_if = "Option::is_none")]
1060    pub street2: Option<String>,
1061    /// Zip code
1062    /// Required by the API.
1063    /// (Optional here so responses that omit it still parse.)
1064    #[serde(default, skip_serializing_if = "Option::is_none")]
1065    pub zip: Option<String>,
1066    /// Business Phone Number
1067    #[serde(default, skip_serializing_if = "Option::is_none")]
1068    pub phone: Option<String>,
1069    /// Email
1070    #[serde(default, skip_serializing_if = "Option::is_none")]
1071    pub email: Option<String>,
1072}
1073
1074/// `UpdateShippingCarrierDto` from the GoHighLevel OpenAPI spec.
1075#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1076pub struct UpdateShippingCarrierDto {
1077    /// Location Id or Agency Id
1078    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1079    pub alt_id: Option<String>,
1080    /// Allowed values: `location`.
1081    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1082    pub alt_type: Option<String>,
1083    /// Name of the shipping carrier
1084    #[serde(default, skip_serializing_if = "Option::is_none")]
1085    pub name: Option<String>,
1086    /// The URL endpoint that GHL needs to retrieve shipping rates. This must be a public URL.
1087    #[serde(
1088        rename = "callbackUrl",
1089        default,
1090        skip_serializing_if = "Option::is_none"
1091    )]
1092    pub callback_url: Option<String>,
1093    /// An array of available shipping carrier services
1094    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1095    pub services: Vec<ShippingCarrierServiceDto>,
1096    /// The seller can choose multiple services while creating shipping rates if this is true.
1097    #[serde(
1098        rename = "allowsMultipleServiceSelection",
1099        default,
1100        skip_serializing_if = "Option::is_none"
1101    )]
1102    pub allows_multiple_service_selection: Option<bool>,
1103}
1104
1105/// `UpdateShippingCarrierResponseDto` from the GoHighLevel OpenAPI spec.
1106#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1107pub struct UpdateShippingCarrierResponseDto {
1108    /// Status of api action
1109    /// Required by the API.
1110    /// (Optional here so responses that omit it still parse.)
1111    #[serde(default, skip_serializing_if = "Option::is_none")]
1112    pub status: Option<bool>,
1113    /// Success message
1114    #[serde(default, skip_serializing_if = "Option::is_none")]
1115    pub message: Option<String>,
1116    /// Shipping carrier data
1117    /// Required by the API.
1118    /// (Optional here so responses that omit it still parse.)
1119    #[serde(default, skip_serializing_if = "Option::is_none")]
1120    pub data: Option<ShippingCarrierSchema>,
1121}
1122
1123/// `UpdateShippingRateDto` from the GoHighLevel OpenAPI spec.
1124#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1125pub struct UpdateShippingRateDto {
1126    /// Location Id or Agency Id
1127    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1128    pub alt_id: Option<String>,
1129    /// Allowed values: `location`.
1130    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1131    pub alt_type: Option<String>,
1132    /// Name of the shipping zone
1133    #[serde(default, skip_serializing_if = "Option::is_none")]
1134    pub name: Option<String>,
1135    /// Delivery description
1136    #[serde(default, skip_serializing_if = "Option::is_none")]
1137    pub description: Option<String>,
1138    /// The currency of the amount of the rate / handling fee
1139    #[serde(default, skip_serializing_if = "Option::is_none")]
1140    pub currency: Option<String>,
1141    /// The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee
1142    /// if it is a carrier rate (it will add to the carrier rate).
1143    #[serde(default, skip_serializing_if = "Option::is_none")]
1144    pub amount: Option<f64>,
1145    /// Type of condition to provide the conditional pricing
1146    /// Allowed values: `none`, `price`, `weight`.
1147    #[serde(
1148        rename = "conditionType",
1149        default,
1150        skip_serializing_if = "Option::is_none"
1151    )]
1152    pub condition_type: Option<String>,
1153    /// Minimum condition for applying this price. set 0 or null if there is no minimum
1154    #[serde(
1155        rename = "minCondition",
1156        default,
1157        skip_serializing_if = "Option::is_none"
1158    )]
1159    pub min_condition: Option<f64>,
1160    /// Maximum condition for applying this price. set 0 or null if there is no maximum
1161    #[serde(
1162        rename = "maxCondition",
1163        default,
1164        skip_serializing_if = "Option::is_none"
1165    )]
1166    pub max_condition: Option<f64>,
1167    /// is this a carrier rate
1168    #[serde(
1169        rename = "isCarrierRate",
1170        default,
1171        skip_serializing_if = "Option::is_none"
1172    )]
1173    pub is_carrier_rate: Option<bool>,
1174    /// Shipping carrier id
1175    #[serde(
1176        rename = "shippingCarrierId",
1177        default,
1178        skip_serializing_if = "Option::is_none"
1179    )]
1180    pub shipping_carrier_id: Option<String>,
1181    /// Percentage of rate fee if it is a carrier rate.
1182    #[serde(
1183        rename = "percentageOfRateFee",
1184        default,
1185        skip_serializing_if = "Option::is_none"
1186    )]
1187    pub percentage_of_rate_fee: Option<f64>,
1188    /// An array of items
1189    #[serde(
1190        rename = "shippingCarrierServices",
1191        default,
1192        skip_serializing_if = "Vec::is_empty"
1193    )]
1194    pub shipping_carrier_services: Vec<ShippingCarrierServiceDto>,
1195}
1196
1197/// `UpdateShippingRateResponseDto` from the GoHighLevel OpenAPI spec.
1198#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1199pub struct UpdateShippingRateResponseDto {
1200    /// Status of api action
1201    /// Required by the API.
1202    /// (Optional here so responses that omit it still parse.)
1203    #[serde(default, skip_serializing_if = "Option::is_none")]
1204    pub status: Option<bool>,
1205    /// Success message
1206    #[serde(default, skip_serializing_if = "Option::is_none")]
1207    pub message: Option<String>,
1208    /// Shipping zone data
1209    /// Required by the API.
1210    /// (Optional here so responses that omit it still parse.)
1211    #[serde(default, skip_serializing_if = "Option::is_none")]
1212    pub data: Option<ShippingRateSchema>,
1213}
1214
1215/// `UpdateShippingZoneDto` from the GoHighLevel OpenAPI spec.
1216#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1217pub struct UpdateShippingZoneDto {
1218    /// Location Id or Agency Id
1219    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
1220    pub alt_id: Option<String>,
1221    /// Allowed values: `location`.
1222    #[serde(rename = "altType", default, skip_serializing_if = "Option::is_none")]
1223    pub alt_type: Option<String>,
1224    /// Name of the shipping zone
1225    #[serde(default, skip_serializing_if = "Option::is_none")]
1226    pub name: Option<String>,
1227    /// List of countries that are available
1228    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1229    pub countries: Vec<ShippingZoneCountryDto>,
1230}
1231
1232/// `UpdateShippingZoneResponseDto` from the GoHighLevel OpenAPI spec.
1233#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1234pub struct UpdateShippingZoneResponseDto {
1235    /// Status of api action
1236    /// Required by the API.
1237    /// (Optional here so responses that omit it still parse.)
1238    #[serde(default, skip_serializing_if = "Option::is_none")]
1239    pub status: Option<bool>,
1240    /// Success message
1241    #[serde(default, skip_serializing_if = "Option::is_none")]
1242    pub message: Option<String>,
1243    /// Shipping zone data
1244    /// Required by the API.
1245    /// (Optional here so responses that omit it still parse.)
1246    #[serde(default, skip_serializing_if = "Option::is_none")]
1247    pub data: Option<ShippingZoneSchema>,
1248}