amazon_spapi/models/replenishment_2022_11_07/
auto_enrollment_preference.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/// AutoEnrollmentPreference : The auto-enrollment preference indicates whether the offer is opted-in to or opted-out of Amazon's auto-enrollment feature.
15/// The auto-enrollment preference indicates whether the offer is opted-in to or opted-out of Amazon's auto-enrollment feature.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AutoEnrollmentPreference {
18    #[serde(rename = "OPTED_IN")]
19    OptedIn,
20    #[serde(rename = "OPTED_OUT")]
21    OptedOut,
22
23}
24
25impl std::fmt::Display for AutoEnrollmentPreference {
26    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Self::OptedIn => write!(f, "OPTED_IN"),
29            Self::OptedOut => write!(f, "OPTED_OUT"),
30        }
31    }
32}
33
34impl Default for AutoEnrollmentPreference {
35    fn default() -> AutoEnrollmentPreference {
36        Self::OptedIn
37    }
38}
39