Skip to main content

hanzo_client/models/
offer.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Offer {
16    /// whether it can be bought right now
17    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
18    pub available: Option<bool>,
19    /// the currency both prices are in
20    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
21    pub currency: Option<String>,
22    /// the name this quote prices
23    #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
24    pub domain: Option<String>,
25    /// whether the registry prices it above the standard rate
26    #[serde(rename = "premium", skip_serializing_if = "Option::is_none")]
27    pub premium: Option<bool>,
28    /// sell (first-term registration)
29    #[serde(rename = "priceCents", skip_serializing_if = "Option::is_none")]
30    pub price_cents: Option<i32>,
31    /// sell (renewal)
32    #[serde(rename = "renewalPriceCents", skip_serializing_if = "Option::is_none")]
33    pub renewal_price_cents: Option<i32>,
34    /// the top-level domain the name sits under
35    #[serde(rename = "tld", skip_serializing_if = "Option::is_none")]
36    pub tld: Option<String>,
37}
38
39impl Offer {
40    pub fn new() -> Offer {
41        Offer {
42            available: None,
43            currency: None,
44            domain: None,
45            premium: None,
46            price_cents: None,
47            renewal_price_cents: None,
48            tld: None,
49        }
50    }
51}
52