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

Conversation

Wyn-Price
Copy link

Does the following:

There are some more discrepancies, i.e. fields on the docs that don't exist here, and fields here that don't exist in the docs, but I want to refrain from changing too much.

This can be tested with the cloudflare-examples cli:

Before
$ cargo run --bin cloudflare-examples -- --auth-token=XXX zone XXX
   Compiling cloudflare v0.12.0 (/home/wp/programming/cloudflare-rs/cloudflare)
   Compiling cloudflare-examples v0.6.0 (/home/wp/programming/cloudflare-rs/cloudflare-examples)
    Finished dev [unoptimized + debuginfo] target(s) in 3.45s
     Running `target/debug/cloudflare-examples --auth-token=XXX zone XXX`
Error: error decoding response body: missing field `multiple_railguns_allowed` at line 1 column 585
After
$cargo run --bin cloudflare-examples -- --auth-token=XXX zone XXX
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `target/debug/cloudflare-examples --auth-token=XXX zone XXX`
Success: ApiSuccess {
    result: Zone {
        id: "XXX",
        name: "XXX",
        account: AccountDetails {
            id: "XXX",
            name: "XXX",
        },
        activated_on: 2021-08-22T18:52:08.877823Z,
        betas: None,
        created_on: 2021-08-22T18:48:11.312863Z,
        deactivation_reason: None,
        development_mode: 0,
        host: None,
        meta: Meta {
            custom_certificate_quota: 0,
            page_rule_quota: 3,
            phishing_detected: false,
        },
        modified_on: 2021-08-22T18:52:08.877823Z,
        name_servers: [
            "pedro.ns.cloudflare.com",
            "surina.ns.cloudflare.com",
        ],
        original_dnshost: None,
        original_name_servers: Some(
            [
                "ns13.domaincontrol.com",
                "ns14.domaincontrol.com",
            ],
        ),
        original_registrar: Some(
            "namecheap, inc. (id: 1068)",
        ),
        owner: User {
            id: None,
            email: None,
        },
        paused: false,
        permissions: [
            "#dns_records:edit",
            "#dns_records:read",
            "#zone:read",
        ],
        plan: Some(
            Plan {
                id: "0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                name: "Free Website",
                price: 0.0,
                currency: "USD",
                frequency: Some(
                    Nil,
                ),
                legacy_id: "free",
                is_subscribed: false,
                can_subscribe: false,
            },
        ),
        plan_pending: None,
        status: Active,
        vanity_name_servers: None,
        zone_type: Full,
    },
    result_info: None,
    messages: Array [],
    errors: [],
}

Copy link
Contributor

@rakshith-ravi rakshith-ravi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cloudflare can we get this merged?

Copy link

@MatthewIsHere MatthewIsHere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes issue. Recommend merge. @jeff-hiner Could you help with this?

@fzxu
Copy link

fzxu commented Nov 24, 2024

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multiple_railguns_allowed is gone from the Zone entry
4 participants