about summary refs log tree commit diff stats
path: root/crates/rocie-client/src/models/timer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-client/src/models/timer.rs')
-rw-r--r--crates/rocie-client/src/models/timer.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/rocie-client/src/models/timer.rs b/crates/rocie-client/src/models/timer.rs
index 6c06d61..290520f 100644
--- a/crates/rocie-client/src/models/timer.rs
+++ b/crates/rocie-client/src/models/timer.rs
@@ -18,16 +18,16 @@ pub struct Timer {
     #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
     pub name: Option<String>,
     /// Time quantity
-    #[serde(rename = "quantity")]
-    pub quantity: models::UnitAmount,
+    #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")]
+    pub quantity: Option<models::UnitAmount>,
 }
 
 impl Timer {
     /// A recipe timer  If created from parsing, at least one of the fields is guaranteed to be [`Some`].
-    pub fn new(quantity: models::UnitAmount) -> Timer {
+    pub fn new() -> Timer {
         Timer {
             name: None,
-            quantity,
+            quantity: None,
         }
     }
 }