1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* 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 Number {
/// 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.
#[serde(rename = "capable", skip_serializing_if = "Option::is_none")]
pub capable: Option<Vec<String>>,
/// 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.
#[serde(rename = "country", skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
/// 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.
#[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
pub currency: Option<String>,
/// 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.
#[serde(rename = "e164", skip_serializing_if = "Option::is_none")]
pub e164: Option<String>,
/// 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.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// 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.
#[serde(rename = "monthly", skip_serializing_if = "Option::is_none")]
pub monthly: Option<i32>,
/// 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.
#[serde(rename = "org", skip_serializing_if = "Option::is_none")]
pub org: Option<String>,
/// 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.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
}
impl Number {
pub fn new() -> Number {
Number {
capable: None,
country: None,
currency: None,
e164: None,
id: None,
monthly: None,
org: None,
r#type: None,
}
}
}