amazon_spapi/models/replenishment_2022_11_07/
aggregation_frequency.rs

1/*
2 * Selling Partner API for Replenishment
3 *
4 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
5 *
6 * The version of the OpenAPI document: 2022-11-07
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AggregationFrequency : The time period used to group data in the response. Note that this is only valid for the `PERFORMANCE` time period type.
15/// The time period used to group data in the response. Note that this is only valid for the `PERFORMANCE` time period type.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AggregationFrequency {
18    #[serde(rename = "WEEK")]
19    Week,
20    #[serde(rename = "MONTH")]
21    Month,
22    #[serde(rename = "QUARTER")]
23    Quarter,
24    #[serde(rename = "YEAR")]
25    Year,
26
27}
28
29impl std::fmt::Display for AggregationFrequency {
30    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Self::Week => write!(f, "WEEK"),
33            Self::Month => write!(f, "MONTH"),
34            Self::Quarter => write!(f, "QUARTER"),
35            Self::Year => write!(f, "YEAR"),
36        }
37    }
38}
39
40impl Default for AggregationFrequency {
41    fn default() -> AggregationFrequency {
42        Self::Week
43    }
44}
45