Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update broken Zone entry struct #240

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions cloudflare/src/endpoints/zone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,14 @@ pub enum Status {
#[derive(Deserialize, Debug)]
#[serde(rename_all = "lowercase", tag = "type")]
pub enum Owner {
User { id: String, email: String },
Organization { id: String, name: String },
User {
id: Option<String>,
email: Option<String>,
},
Organization {
id: Option<String>,
name: Option<String>,
},
}

#[derive(Serialize, Deserialize, Debug, Clone)]
Expand All @@ -136,8 +142,6 @@ pub struct Meta {
pub page_rule_quota: u32,
/// Indicates if URLs on the zone have been identified as hosting phishing content.
pub phishing_detected: bool,
/// Indicates whether the zone is allowed to be connected to multiple Railguns at once
pub multiple_railguns_allowed: bool,
}

/// A Zone is a domain name along with its subdomains and other identities
Expand All @@ -150,6 +154,8 @@ pub struct Zone {
pub name: String,
/// Information about the account the zone belongs to
pub account: AccountDetails,
/// The last time proof of ownership was detected and the zone was made active
pub activated_on: DateTime<Utc>,
/// A list of beta features in which the zone is participating
pub betas: Option<Vec<String>>,
/// When the zone was created
Expand Down