amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Replenishment
 *
 * 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.
 *
 * The version of the OpenAPI document: 2022-11-07
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// AggregationFrequency : The time period used to group data in the response. Note that this is only valid for the `PERFORMANCE` time period type.
/// The time period used to group data in the response. Note that this is only valid for the `PERFORMANCE` time period type.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AggregationFrequency {
    #[serde(rename = "WEEK")]
    Week,
    #[serde(rename = "MONTH")]
    Month,
    #[serde(rename = "QUARTER")]
    Quarter,
    #[serde(rename = "YEAR")]
    Year,

}

impl std::fmt::Display for AggregationFrequency {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Week => write!(f, "WEEK"),
            Self::Month => write!(f, "MONTH"),
            Self::Quarter => write!(f, "QUARTER"),
            Self::Year => write!(f, "YEAR"),
        }
    }
}

impl Default for AggregationFrequency {
    fn default() -> AggregationFrequency {
        Self::Week
    }
}