hanzo_client/models/number.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 Number {
16 /// Capable is what the number can carry: any of \"voice\", \"sms\", \"mms\", \"fax\". A number missing \"sms\" cannot send one no matter what this platform does.
17 #[serde(rename = "capable", skip_serializing_if = "Option::is_none")]
18 pub capable: Option<Vec<String>>,
19 /// Country is the ISO 3166-1 alpha-2 code the number is issued under. Numbering is national, so this is what makes a search answerable at all.
20 #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
21 pub country: Option<String>,
22 /// Currency is the ISO 4217 code Monthly is denominated in. Without it the number beside it means nothing, so the two are always read together.
23 #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
24 pub currency: Option<String>,
25 /// E164 is the number in E.164: a leading + and digits only, no spaces or dashes. That is what a carrier accepts and what a search result must be bought by.
26 #[serde(rename = "e164", skip_serializing_if = "Option::is_none")]
27 pub e164: Option<String>,
28 /// ID is the carrier's handle for the number, and the id every route here addresses it by. It is not the number itself — see E164.
29 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
30 pub id: Option<String>,
31 /// Monthly is the recurring rental in the MINOR unit of Currency (cents for USD), exactly as the carrier quoted it. It is a price, not a charge: nothing is billed by this field.
32 #[serde(rename = "monthly", skip_serializing_if = "Option::is_none")]
33 pub monthly: Option<i32>,
34 /// Org is the tenant holding the number. A search result carries none — nobody holds it yet — which is how an available number is told from a held one.
35 #[serde(rename = "org", skip_serializing_if = "Option::is_none")]
36 pub org: Option<String>,
37 /// Type is what kind of number it is: \"local\", \"national\", \"tollfree\" or \"mobile\". It decides both price and what a carrier will let it originate.
38 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
39 pub r#type: Option<String>,
40}
41
42impl Number {
43 pub fn new() -> Number {
44 Number {
45 capable: None,
46 country: None,
47 currency: None,
48 e164: None,
49 id: None,
50 monthly: None,
51 org: None,
52 r#type: None,
53 }
54 }
55}
56