/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.163.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CheckPhoneNumberAvailability200ResponseAreaAvailability : Every area of the country's numbering plan (Google libphonenumber geocoding, one row per city: Madrid covers 910 to 919), in one of three states, refreshed every 6 hours from the carrier's own inventory counts. The same answer the dashboard picker and the public country pages show. Empty lists mean the pair has no cached coverage yet, not that the country has no areas.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CheckPhoneNumberAvailability200ResponseAreaAvailability {
/// Deliverable numbers now, deepest first. Pass `ndc` as `areaCode` to hold the order to it.
#[serde(rename = "inStock", skip_serializing_if = "Option::is_none")]
pub in_stock:
Option<Vec<models::CheckPhoneNumberAvailability200ResponseAreaAvailabilityInStockInner>>,
/// The carrier lists nothing there and the number type is a document tier: submit KYC with `areaCode` and `preOrder: true`, the carrier sources one (usually 2 to 4 weeks, never guaranteed), nothing is billed until it is active.
#[serde(rename = "preOrder", skip_serializing_if = "Option::is_none")]
pub pre_order:
Option<Vec<models::CheckPhoneNumberAvailability200ResponseAreaAvailabilityPreOrderInner>>,
/// Nothing deliverable and no pre-order: `listed` > 0 is stock the carrier shows that WhatsApp refused recently (held back until it clears), 0 is a dry area of an instant tier. A stock watch (POST /v1/phone-numbers/stock-watches with `areaCode`) is the way to hear when it is back.
#[serde(rename = "outOfStock", skip_serializing_if = "Option::is_none")]
pub out_of_stock:
Option<Vec<models::CheckPhoneNumberAvailability200ResponseAreaAvailabilityOutOfStockInner>>,
}
impl CheckPhoneNumberAvailability200ResponseAreaAvailability {
/// Every area of the country's numbering plan (Google libphonenumber geocoding, one row per city: Madrid covers 910 to 919), in one of three states, refreshed every 6 hours from the carrier's own inventory counts. The same answer the dashboard picker and the public country pages show. Empty lists mean the pair has no cached coverage yet, not that the country has no areas.
pub fn new() -> CheckPhoneNumberAvailability200ResponseAreaAvailability {
CheckPhoneNumberAvailability200ResponseAreaAvailability {
in_stock: None,
pre_order: None,
out_of_stock: None,
}
}
}