hermes_ebay_sell_inventory/models/operating_hours.rs
1/*
2 * Inventory API
3 *
4 * The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
5 *
6 * The version of the OpenAPI document: 1.18.4
7 * Contact: your-email@example.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OperatingHours : This type is used to express the regular operating hours of a merchant's store or fulfillment center during the days of the week.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OperatingHours {
17 /// A <strong>dayOfWeekEnum</strong> value is required for each day of the week that the store location has regular operating hours. <br><br>This field is returned if operating hours are defined for the store location. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/inventory/types/api:DayOfWeekEnum'>eBay API documentation</a>
18 #[serde(rename = "dayOfWeekEnum", skip_serializing_if = "Option::is_none")]
19 pub day_of_week_enum: Option<String>,
20 /// This container is used to define the opening and closing times of a store location's working day (defined in the <strong>dayOfWeekEnum</strong> field). An <strong>intervals</strong> container is needed for each day of the week that the store location is open. If a store location closes for lunch (or any other period during the day) and then reopens, multiple <strong>open</strong> and <strong>close</strong> pairs are needed <br><br>This container is returned if operating hours are defined for the store location.
21 #[serde(rename = "intervals", skip_serializing_if = "Option::is_none")]
22 pub intervals: Option<Vec<models::Interval>>,
23}
24
25impl OperatingHours {
26 /// This type is used to express the regular operating hours of a merchant's store or fulfillment center during the days of the week.
27 pub fn new() -> OperatingHours {
28 OperatingHours {
29 day_of_week_enum: None,
30 intervals: None,
31 }
32 }
33}
34