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