app_store_server_library/primitives/
status.rs1use serde_repr::{Deserialize_repr, Serialize_repr};
2
3#[derive(Debug, Clone, Deserialize_repr, Serialize_repr, Hash, PartialEq, Eq)]
7#[repr(u8)]
8pub enum Status {
9 Active = 1,
10 Expired = 2,
11 BillingRetry = 3,
12 BillingGracePeriod = 4,
13 Revoked = 5,
14}
15
16impl Status {
17 pub fn raw_value(&self) -> u8 {
18 match &self {
19 Status::Active => 1,
20 Status::Expired => 2,
21 Status::BillingRetry => 3,
22 Status::BillingGracePeriod => 4,
23 Status::Revoked => 5,
24 }
25 }
26}