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};

/// Metric : The metric name and description.
/// The metric name and description.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Metric {
    #[serde(rename = "SHIPPED_SUBSCRIPTION_UNITS")]
    ShippedSubscriptionUnits,
    #[serde(rename = "TOTAL_SUBSCRIPTIONS_REVENUE")]
    TotalSubscriptionsRevenue,
    #[serde(rename = "ACTIVE_SUBSCRIPTIONS")]
    ActiveSubscriptions,
    #[serde(rename = "NOT_DELIVERED_DUE_TO_OOS")]
    NotDeliveredDueToOos,
    #[serde(rename = "SUBSCRIBER_NON_SUBSCRIBER_AVERAGE_REVENUE")]
    SubscriberNonSubscriberAverageRevenue,
    #[serde(rename = "LOST_REVENUE_DUE_TO_OOS")]
    LostRevenueDueToOos,
    #[serde(rename = "SUBSCRIBER_NON_SUBSCRIBER_AVERAGE_REORDERS")]
    SubscriberNonSubscriberAverageReorders,
    #[serde(rename = "COUPONS_REVENUE_PENETRATION")]
    CouponsRevenuePenetration,
    #[serde(rename = "REVENUE_BY_DELIVERIES")]
    RevenueByDeliveries,
    #[serde(rename = "SUBSCRIBER_RETENTION")]
    SubscriberRetention,
    #[serde(rename = "REVENUE_PENETRATION_BY_SELLER_FUNDING")]
    RevenuePenetrationBySellerFunding,
    #[serde(rename = "SHARE_OF_COUPON_SUBSCRIPTIONS")]
    ShareOfCouponSubscriptions,

}

impl std::fmt::Display for Metric {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::ShippedSubscriptionUnits => write!(f, "SHIPPED_SUBSCRIPTION_UNITS"),
            Self::TotalSubscriptionsRevenue => write!(f, "TOTAL_SUBSCRIPTIONS_REVENUE"),
            Self::ActiveSubscriptions => write!(f, "ACTIVE_SUBSCRIPTIONS"),
            Self::NotDeliveredDueToOos => write!(f, "NOT_DELIVERED_DUE_TO_OOS"),
            Self::SubscriberNonSubscriberAverageRevenue => write!(f, "SUBSCRIBER_NON_SUBSCRIBER_AVERAGE_REVENUE"),
            Self::LostRevenueDueToOos => write!(f, "LOST_REVENUE_DUE_TO_OOS"),
            Self::SubscriberNonSubscriberAverageReorders => write!(f, "SUBSCRIBER_NON_SUBSCRIBER_AVERAGE_REORDERS"),
            Self::CouponsRevenuePenetration => write!(f, "COUPONS_REVENUE_PENETRATION"),
            Self::RevenueByDeliveries => write!(f, "REVENUE_BY_DELIVERIES"),
            Self::SubscriberRetention => write!(f, "SUBSCRIBER_RETENTION"),
            Self::RevenuePenetrationBySellerFunding => write!(f, "REVENUE_PENETRATION_BY_SELLER_FUNDING"),
            Self::ShareOfCouponSubscriptions => write!(f, "SHARE_OF_COUPON_SUBSCRIPTIONS"),
        }
    }
}

impl Default for Metric {
    fn default() -> Metric {
        Self::ShippedSubscriptionUnits
    }
}