hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * 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/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Opportunity {
    /// Amount is the deal value in minor units (cents) of Currency.
    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
    pub amount: Option<i32>,
    /// CloseDate is the expected close as a unix second (0 = unset).
    #[serde(rename = "closeDate", skip_serializing_if = "Option::is_none")]
    pub close_date: Option<i32>,
    /// CompanyID links the deal to one of the org's companies; empty when unlinked, and cleared when that company is deleted. A write naming a company the org does not own is refused with 422.
    #[serde(rename = "companyId", skip_serializing_if = "Option::is_none")]
    pub company_id: Option<String>,
    /// CreatedAt is the unix second the opportunity was created. Server-owned.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<i32>,
    /// Currency is the ISO code Amount is denominated in; a write that names none stores USD.
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// ID is the server-minted opportunity id (\"oppo_\" + 128 random bits).
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Name is the deal name.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// PointOfContact links the deal to one of the org's contacts; empty when unlinked, and cleared when that contact is deleted. A write naming a contact the org does not own is refused with 422.
    #[serde(rename = "pointOfContactId", skip_serializing_if = "Option::is_none")]
    pub point_of_contact_id: Option<String>,
    /// Stage is the pipeline stage, always one of NEW, SCREENING, MEETING, PROPOSAL or CUSTOMER — stored upper-case whatever case the write used.
    #[serde(rename = "stage", skip_serializing_if = "Option::is_none")]
    pub stage: Option<String>,
    /// UpdatedAt is the unix second of the last write. Server-owned.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<i32>,
}

impl Opportunity {
    pub fn new() -> Opportunity {
        Opportunity {
            amount: None,
            close_date: None,
            company_id: None,
            created_at: None,
            currency: None,
            id: None,
            name: None,
            point_of_contact_id: None,
            stage: None,
            updated_at: None,
        }
    }
}