diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ac7522..3f9c7a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [v4.10.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.10.0) (2024-08-08) + +**Bug fixes:** + +- fix(billing): Adjust type of regional data to help the generator +- fix(billing): Correct type of invoice_id field + ## [v4.9.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.9.0) (2024-08-04) **Enhancements:** diff --git a/Cargo.toml b/Cargo.toml index 068be97..e20b368 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fastly-api" -version = "4.9.0" +version = "4.10.0" authors = ["Fastly "] edition = "2021" description = "Fastly API client" diff --git a/README.md b/README.md index 6a01328..0b924b3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Rust 2021 Edition Add the following to `Cargo.toml` under `[dependencies]`: ```toml -fastly-api = "4.9.0" +fastly-api = "4.10.0" ``` ## Usage diff --git a/docs/Billing.md b/docs/Billing.md index c98f51d..d38bccd 100644 --- a/docs/Billing.md +++ b/docs/Billing.md @@ -6,12 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **end_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] **start_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] -**invoice_id** | Option<**String**> | | [readonly] **customer_id** | Option<**String**> | | [readonly] **vendor_state** | Option<**String**> | The current state of our third-party billing vendor. One of `up` or `down`. | [readonly] **status** | Option<[**crate::models::BillingStatus**](BillingStatus.md)> | | **total** | Option<[**crate::models::BillingTotal**](BillingTotal.md)> | | -**regions** | Option<[**::std::collections::HashMap<String, ::std::collections::HashMap<String, serde_json::Value>>**](Map.md)> | Breakdown of regional data for products that are region based. | +**regions** | Option<[**::std::collections::HashMap<String, crate::models::BillingRegions>**](BillingRegions.md)> | Breakdown of regional data for products that are region based. | [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BillingApi.md b/docs/BillingApi.md index f2a9507..c241032 100644 --- a/docs/BillingApi.md +++ b/docs/BillingApi.md @@ -65,7 +65,7 @@ get_invoice_by_id(cfg, params) Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **customer_id** | **String** | Alphanumeric string identifying the customer. | [required] | -**invoice_id** | **String** | Alphanumeric string identifying the invoice. | [required] | +**invoice_id** | **i32** | | [required] | ### Return type diff --git a/docs/BillingBandwidth.md b/docs/BillingBandwidth.md new file mode 100644 index 0000000..d59c01d --- /dev/null +++ b/docs/BillingBandwidth.md @@ -0,0 +1,12 @@ +# BillingBandwidth + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | Option<**f32**> | | +**tiers** | Option<[**Vec<crate::models::BillingBandwidthTiers>**](BillingBandwidthTiers.md)> | | + +[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingBandwidthTiers.md b/docs/BillingBandwidthTiers.md new file mode 100644 index 0000000..a809c4b --- /dev/null +++ b/docs/BillingBandwidthTiers.md @@ -0,0 +1,15 @@ +# BillingBandwidthTiers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | +**units** | Option<**f32**> | | +**price** | Option<**f32**> | | +**discounted_price** | Option<**f32**> | | +**total** | Option<**f32**> | | + +[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingEstimateInvoiceId.md b/docs/BillingEstimateInvoiceId.md new file mode 100644 index 0000000..956f5ba --- /dev/null +++ b/docs/BillingEstimateInvoiceId.md @@ -0,0 +1,11 @@ +# BillingEstimateInvoiceId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice_id** | Option<**String**> | | [readonly] + +[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingEstimateResponse.md b/docs/BillingEstimateResponse.md index 250ef91..ac102b3 100644 --- a/docs/BillingEstimateResponse.md +++ b/docs/BillingEstimateResponse.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **end_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] **start_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] -**invoice_id** | Option<**String**> | | [readonly] **customer_id** | Option<**String**> | | [readonly] **vendor_state** | Option<**String**> | The current state of our third-party billing vendor. One of `up` or `down`. | [readonly] **status** | Option<[**crate::models::BillingStatus**](BillingStatus.md)> | | **total** | Option<[**crate::models::BillingTotal**](BillingTotal.md)> | | -**regions** | Option<[**::std::collections::HashMap<String, ::std::collections::HashMap<String, serde_json::Value>>**](Map.md)> | Breakdown of regional data for products that are region based. | +**regions** | Option<[**::std::collections::HashMap<String, crate::models::BillingRegions>**](BillingRegions.md)> | Breakdown of regional data for products that are region based. | +**invoice_id** | Option<**String**> | | [readonly] **line_items** | Option<[**Vec<crate::models::BillingEstimateLinesLineItems>**](BillingEstimateLinesLineItems.md)> | | [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LineItemDataReadOnlyInvoiceId.md b/docs/BillingInvoiceId.md similarity index 75% rename from docs/LineItemDataReadOnlyInvoiceId.md rename to docs/BillingInvoiceId.md index be3398f..00097f8 100644 --- a/docs/LineItemDataReadOnlyInvoiceId.md +++ b/docs/BillingInvoiceId.md @@ -1,9 +1,10 @@ -# LineItemDataReadOnlyInvoiceId +# BillingInvoiceId ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**invoice_id** | Option<**i32**> | | [readonly] [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BillingInvoicesApi.md b/docs/BillingInvoicesApi.md index 24db201..6545553 100644 --- a/docs/BillingInvoicesApi.md +++ b/docs/BillingInvoicesApi.md @@ -28,7 +28,7 @@ get_invoice_by_invoice_id(cfg, params) Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**invoice_id** | **String** | Alphanumeric string identifying the invoice. | [required] | +**invoice_id** | **i32** | | [required] | ### Return type diff --git a/docs/BillingRegions.md b/docs/BillingRegions.md new file mode 100644 index 0000000..8ed4976 --- /dev/null +++ b/docs/BillingRegions.md @@ -0,0 +1,14 @@ +# BillingRegions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cost** | Option<**f32**> | | +**bandwidth** | Option<[**crate::models::BillingBandwidth**](BillingBandwidth.md)> | | +**percentile** | Option<[**crate::models::BillingBandwidth**](BillingBandwidth.md)> | | +**requests** | Option<[**crate::models::BillingBandwidth**](BillingBandwidth.md)> | | + +[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingResponse.md b/docs/BillingResponse.md index 320dc52..038c477 100644 --- a/docs/BillingResponse.md +++ b/docs/BillingResponse.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **end_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] **start_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] -**invoice_id** | Option<**String**> | | [readonly] **customer_id** | Option<**String**> | | [readonly] **vendor_state** | Option<**String**> | The current state of our third-party billing vendor. One of `up` or `down`. | [readonly] **status** | Option<[**crate::models::BillingStatus**](BillingStatus.md)> | | **total** | Option<[**crate::models::BillingTotal**](BillingTotal.md)> | | -**regions** | Option<[**::std::collections::HashMap<String, ::std::collections::HashMap<String, serde_json::Value>>**](Map.md)> | Breakdown of regional data for products that are region based. | +**regions** | Option<[**::std::collections::HashMap<String, crate::models::BillingRegions>**](BillingRegions.md)> | Breakdown of regional data for products that are region based. | +**invoice_id** | Option<**i32**> | | [readonly] **line_items** | Option<[**Vec<crate::models::BillingResponseLineItem>**](BillingResponseLineItem.md)> | | [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BillingResponseLineItem.md b/docs/BillingResponseLineItem.md index ab0175b..5fec267 100644 --- a/docs/BillingResponseLineItem.md +++ b/docs/BillingResponseLineItem.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **deleted_at** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] **updated_at** | Option<**String**> | Date and time in ISO 8601 format. | [readonly] **amount** | Option<**f32**> | | -**aria_invoice_id** | Option<[**crate::models::LineItemDataReadOnlyInvoiceId**](LineItemDataReadOnlyInvoiceId.md)> | | +**aria_invoice_id** | Option<**String**> | An alphanumeric string identifying the invoice. | [readonly] **client_service_id** | Option<**String**> | | **credit_coupon_code** | Option<**String**> | | **description** | Option<**String**> | | diff --git a/docs/EomInvoiceResponse.md b/docs/EomInvoiceResponse.md index e64c6ec..a539173 100644 --- a/docs/EomInvoiceResponse.md +++ b/docs/EomInvoiceResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_id** | Option<**String**> | Customer ID associated with the invoice. | -**invoice_id** | Option<**String**> | Alphanumeric string identifying the invoice. | +**invoice_id** | Option<**String**> | Numeric string identifying the invoice. | **invoice_posted_on** | Option<**String**> | Date and time invoice was posted on, in ISO 8601 format. | **billing_start_date** | Option<**String**> | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | **billing_end_date** | Option<**String**> | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | diff --git a/docs/Invoice.md b/docs/Invoice.md index 0f27db4..df7317d 100644 --- a/docs/Invoice.md +++ b/docs/Invoice.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_id** | Option<**String**> | Customer ID associated with the invoice. | -**invoice_id** | Option<**String**> | Alphanumeric string identifying the invoice. | +**invoice_id** | Option<**String**> | Numeric string identifying the invoice. | **invoice_posted_on** | Option<**String**> | Date and time invoice was posted on, in ISO 8601 format. | **billing_start_date** | Option<**String**> | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | **billing_end_date** | Option<**String**> | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | diff --git a/docs/LineItemData.md b/docs/LineItemData.md index 09431d0..4637f12 100644 --- a/docs/LineItemData.md +++ b/docs/LineItemData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | Option<**f32**> | | -**aria_invoice_id** | Option<[**crate::models::LineItemDataReadOnlyInvoiceId**](LineItemDataReadOnlyInvoiceId.md)> | | +**aria_invoice_id** | Option<**String**> | An alphanumeric string identifying the invoice. | [readonly] **client_service_id** | Option<**String**> | | **credit_coupon_code** | Option<**String**> | | **description** | Option<**String**> | | diff --git a/sig.json b/sig.json index 713aa7d..67771c6 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "01161630", "D": "e05af2db"} +{"G": "01161630", "D": "80b361d0"} diff --git a/src/apis/billing_api.rs b/src/apis/billing_api.rs index e232b77..67a69ac 100644 --- a/src/apis/billing_api.rs +++ b/src/apis/billing_api.rs @@ -25,8 +25,7 @@ pub struct GetInvoiceParams { pub struct GetInvoiceByIdParams { /// Alphanumeric string identifying the customer. pub customer_id: String, - /// Alphanumeric string identifying the invoice. - pub invoice_id: String + pub invoice_id: i32 } /// struct for passing parameters to the method [`get_invoice_mtd`] @@ -127,7 +126,7 @@ pub async fn get_invoice_by_id(configuration: &mut configuration::Configuration, let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/billing/v2/account_customers/{customer_id}/invoices/{invoice_id}", local_var_configuration.base_path, customer_id=crate::apis::urlencode(customer_id), invoice_id=crate::apis::urlencode(invoice_id)); + let local_var_uri_str = format!("{}/billing/v2/account_customers/{customer_id}/invoices/{invoice_id}", local_var_configuration.base_path, customer_id=crate::apis::urlencode(customer_id), invoice_id=invoice_id); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { diff --git a/src/apis/billing_invoices_api.rs b/src/apis/billing_invoices_api.rs index a107e38..b9e8e95 100644 --- a/src/apis/billing_invoices_api.rs +++ b/src/apis/billing_invoices_api.rs @@ -14,8 +14,7 @@ use super::{Error, configuration}; /// struct for passing parameters to the method [`get_invoice_by_invoice_id`] #[derive(Clone, Debug, Default)] pub struct GetInvoiceByInvoiceIdParams { - /// Alphanumeric string identifying the invoice. - pub invoice_id: String + pub invoice_id: i32 } /// struct for passing parameters to the method [`list_invoices`] @@ -72,7 +71,7 @@ pub async fn get_invoice_by_invoice_id(configuration: &mut configuration::Config let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/billing/v3/invoices/{invoice_id}", local_var_configuration.base_path, invoice_id=crate::apis::urlencode(invoice_id)); + let local_var_uri_str = format!("{}/billing/v3/invoices/{invoice_id}", local_var_configuration.base_path, invoice_id=invoice_id); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs index 2788aff..d5ab21a 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -49,7 +49,7 @@ impl Default for Configuration { Configuration { base_path: "https://api.fastly.com".to_owned(), - user_agent: Some("fastly-rust/4.9.0/rust".to_owned()), + user_agent: Some("fastly-rust/4.10.0/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, diff --git a/src/models/billing.rs b/src/models/billing.rs index 620fc9f..cb0e6af 100644 --- a/src/models/billing.rs +++ b/src/models/billing.rs @@ -16,8 +16,6 @@ pub struct Billing { /// Date and time in ISO 8601 format. #[serde(rename = "start_time", skip_serializing_if = "Option::is_none")] pub start_time: Option, - #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] - pub invoice_id: Option>, #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")] pub customer_id: Option>, /// The current state of our third-party billing vendor. One of `up` or `down`. @@ -29,7 +27,7 @@ pub struct Billing { pub total: Option>, /// Breakdown of regional data for products that are region based. #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option<::std::collections::HashMap>>, + pub regions: Option<::std::collections::HashMap>, } impl Billing { @@ -37,7 +35,6 @@ impl Billing { Billing { end_time: None, start_time: None, - invoice_id: None, customer_id: None, vendor_state: None, status: None, diff --git a/src/models/billing_bandwidth.rs b/src/models/billing_bandwidth.rs new file mode 100644 index 0000000..bdac8e0 --- /dev/null +++ b/src/models/billing_bandwidth.rs @@ -0,0 +1,28 @@ +/* + * Fastly API + * + * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) + * + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BillingBandwidth { + #[serde(rename = "total", skip_serializing_if = "Option::is_none")] + pub total: Option, + #[serde(rename = "tiers", skip_serializing_if = "Option::is_none")] + pub tiers: Option>, +} + +impl BillingBandwidth { + pub fn new() -> BillingBandwidth { + BillingBandwidth { + total: None, + tiers: None, + } + } +} + + diff --git a/src/models/billing_bandwidth_tiers.rs b/src/models/billing_bandwidth_tiers.rs new file mode 100644 index 0000000..a7269e3 --- /dev/null +++ b/src/models/billing_bandwidth_tiers.rs @@ -0,0 +1,37 @@ +/* + * Fastly API + * + * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) + * + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BillingBandwidthTiers { + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "units", skip_serializing_if = "Option::is_none")] + pub units: Option, + #[serde(rename = "price", skip_serializing_if = "Option::is_none")] + pub price: Option, + #[serde(rename = "discounted_price", skip_serializing_if = "Option::is_none")] + pub discounted_price: Option, + #[serde(rename = "total", skip_serializing_if = "Option::is_none")] + pub total: Option, +} + +impl BillingBandwidthTiers { + pub fn new() -> BillingBandwidthTiers { + BillingBandwidthTiers { + name: None, + units: None, + price: None, + discounted_price: None, + total: None, + } + } +} + + diff --git a/src/models/billing_estimate_invoice_id.rs b/src/models/billing_estimate_invoice_id.rs new file mode 100644 index 0000000..9220b44 --- /dev/null +++ b/src/models/billing_estimate_invoice_id.rs @@ -0,0 +1,25 @@ +/* + * Fastly API + * + * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) + * + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BillingEstimateInvoiceId { + #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] + pub invoice_id: Option, +} + +impl BillingEstimateInvoiceId { + pub fn new() -> BillingEstimateInvoiceId { + BillingEstimateInvoiceId { + invoice_id: None, + } + } +} + + diff --git a/src/models/billing_estimate_response.rs b/src/models/billing_estimate_response.rs index 70014f1..c1a2d71 100644 --- a/src/models/billing_estimate_response.rs +++ b/src/models/billing_estimate_response.rs @@ -16,8 +16,6 @@ pub struct BillingEstimateResponse { /// Date and time in ISO 8601 format. #[serde(rename = "start_time", skip_serializing_if = "Option::is_none")] pub start_time: Option, - #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] - pub invoice_id: Option>, #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")] pub customer_id: Option>, /// The current state of our third-party billing vendor. One of `up` or `down`. @@ -29,7 +27,9 @@ pub struct BillingEstimateResponse { pub total: Option>, /// Breakdown of regional data for products that are region based. #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option<::std::collections::HashMap>>, + pub regions: Option<::std::collections::HashMap>, + #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] + pub invoice_id: Option, #[serde(rename = "line_items", skip_serializing_if = "Option::is_none")] pub line_items: Option>, } @@ -39,12 +39,12 @@ impl BillingEstimateResponse { BillingEstimateResponse { end_time: None, start_time: None, - invoice_id: None, customer_id: None, vendor_state: None, status: None, total: None, regions: None, + invoice_id: None, line_items: None, } } diff --git a/src/models/billing_invoice_id.rs b/src/models/billing_invoice_id.rs new file mode 100644 index 0000000..967e124 --- /dev/null +++ b/src/models/billing_invoice_id.rs @@ -0,0 +1,25 @@ +/* + * Fastly API + * + * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) + * + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BillingInvoiceId { + #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] + pub invoice_id: Option, +} + +impl BillingInvoiceId { + pub fn new() -> BillingInvoiceId { + BillingInvoiceId { + invoice_id: None, + } + } +} + + diff --git a/src/models/billing_regions.rs b/src/models/billing_regions.rs new file mode 100644 index 0000000..41f1d7b --- /dev/null +++ b/src/models/billing_regions.rs @@ -0,0 +1,34 @@ +/* + * Fastly API + * + * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) + * + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BillingRegions { + #[serde(rename = "cost", skip_serializing_if = "Option::is_none")] + pub cost: Option, + #[serde(rename = "bandwidth", skip_serializing_if = "Option::is_none")] + pub bandwidth: Option>, + #[serde(rename = "percentile", skip_serializing_if = "Option::is_none")] + pub percentile: Option>, + #[serde(rename = "requests", skip_serializing_if = "Option::is_none")] + pub requests: Option>, +} + +impl BillingRegions { + pub fn new() -> BillingRegions { + BillingRegions { + cost: None, + bandwidth: None, + percentile: None, + requests: None, + } + } +} + + diff --git a/src/models/billing_response.rs b/src/models/billing_response.rs index c2c39dc..4dacb9c 100644 --- a/src/models/billing_response.rs +++ b/src/models/billing_response.rs @@ -16,8 +16,6 @@ pub struct BillingResponse { /// Date and time in ISO 8601 format. #[serde(rename = "start_time", skip_serializing_if = "Option::is_none")] pub start_time: Option, - #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] - pub invoice_id: Option>, #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")] pub customer_id: Option>, /// The current state of our third-party billing vendor. One of `up` or `down`. @@ -29,7 +27,9 @@ pub struct BillingResponse { pub total: Option>, /// Breakdown of regional data for products that are region based. #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option<::std::collections::HashMap>>, + pub regions: Option<::std::collections::HashMap>, + #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] + pub invoice_id: Option, #[serde(rename = "line_items", skip_serializing_if = "Option::is_none")] pub line_items: Option>, } @@ -39,12 +39,12 @@ impl BillingResponse { BillingResponse { end_time: None, start_time: None, - invoice_id: None, customer_id: None, vendor_state: None, status: None, total: None, regions: None, + invoice_id: None, line_items: None, } } diff --git a/src/models/billing_response_line_item.rs b/src/models/billing_response_line_item.rs index d4328ec..b8594f3 100644 --- a/src/models/billing_response_line_item.rs +++ b/src/models/billing_response_line_item.rs @@ -21,8 +21,9 @@ pub struct BillingResponseLineItem { pub updated_at: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, + /// An alphanumeric string identifying the invoice. #[serde(rename = "aria_invoice_id", skip_serializing_if = "Option::is_none")] - pub aria_invoice_id: Option>, + pub aria_invoice_id: Option, #[serde(rename = "client_service_id", skip_serializing_if = "Option::is_none")] pub client_service_id: Option, #[serde(rename = "credit_coupon_code", skip_serializing_if = "Option::is_none")] diff --git a/src/models/eom_invoice_response.rs b/src/models/eom_invoice_response.rs index 45f06e1..ccb76f3 100644 --- a/src/models/eom_invoice_response.rs +++ b/src/models/eom_invoice_response.rs @@ -13,7 +13,7 @@ pub struct EomInvoiceResponse { /// Customer ID associated with the invoice. #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")] pub customer_id: Option, - /// Alphanumeric string identifying the invoice. + /// Numeric string identifying the invoice. #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] pub invoice_id: Option, /// Date and time invoice was posted on, in ISO 8601 format. diff --git a/src/models/invoice.rs b/src/models/invoice.rs index a6c998c..36b98f6 100644 --- a/src/models/invoice.rs +++ b/src/models/invoice.rs @@ -13,7 +13,7 @@ pub struct Invoice { /// Customer ID associated with the invoice. #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")] pub customer_id: Option, - /// Alphanumeric string identifying the invoice. + /// Numeric string identifying the invoice. #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")] pub invoice_id: Option, /// Date and time invoice was posted on, in ISO 8601 format. diff --git a/src/models/line_item_data.rs b/src/models/line_item_data.rs index b0d7dad..14c20ae 100644 --- a/src/models/line_item_data.rs +++ b/src/models/line_item_data.rs @@ -12,8 +12,9 @@ pub struct LineItemData { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, + /// An alphanumeric string identifying the invoice. #[serde(rename = "aria_invoice_id", skip_serializing_if = "Option::is_none")] - pub aria_invoice_id: Option>, + pub aria_invoice_id: Option, #[serde(rename = "client_service_id", skip_serializing_if = "Option::is_none")] pub client_service_id: Option, #[serde(rename = "credit_coupon_code", skip_serializing_if = "Option::is_none")] diff --git a/src/models/mod.rs b/src/models/mod.rs index e659e3a..2c8155f 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -60,12 +60,22 @@ pub mod billing_address_verification_error_response; pub use self::billing_address_verification_error_response::BillingAddressVerificationErrorResponse; pub mod billing_address_verification_error_response_errors; pub use self::billing_address_verification_error_response_errors::BillingAddressVerificationErrorResponseErrors; +pub mod billing_bandwidth; +pub use self::billing_bandwidth::BillingBandwidth; +pub mod billing_bandwidth_tiers; +pub use self::billing_bandwidth_tiers::BillingBandwidthTiers; +pub mod billing_estimate_invoice_id; +pub use self::billing_estimate_invoice_id::BillingEstimateInvoiceId; pub mod billing_estimate_lines; pub use self::billing_estimate_lines::BillingEstimateLines; pub mod billing_estimate_lines_line_items; pub use self::billing_estimate_lines_line_items::BillingEstimateLinesLineItems; pub mod billing_estimate_response; pub use self::billing_estimate_response::BillingEstimateResponse; +pub mod billing_invoice_id; +pub use self::billing_invoice_id::BillingInvoiceId; +pub mod billing_regions; +pub use self::billing_regions::BillingRegions; pub mod billing_response; pub use self::billing_response::BillingResponse; pub mod billing_response_item_items_data; @@ -362,8 +372,6 @@ pub mod legacy_waf_update_status; pub use self::legacy_waf_update_status::LegacyWafUpdateStatus; pub mod line_item_data; pub use self::line_item_data::LineItemData; -pub mod line_item_data_read_only_invoice_id; -pub use self::line_item_data_read_only_invoice_id::LineItemDataReadOnlyInvoiceId; pub mod list_dashboards_response; pub use self::list_dashboards_response::ListDashboardsResponse; pub mod list_eom_invoices_response;