Skip to content

Commit

Permalink
Generated v4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Aug 8, 2024
1 parent c50dc16 commit eafac70
Show file tree
Hide file tree
Showing 34 changed files with 254 additions and 41 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fastly-api"
version = "4.9.0"
version = "4.10.0"
authors = ["Fastly <oss@fastly.com>"]
edition = "2021"
description = "Fastly API client"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions docs/Billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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&lt;String, ::std::collections::HashMap&lt;String, serde_json::Value&gt;&gt;**](Map.md)> | Breakdown of regional data for products that are region based. |
**regions** | Option<[**::std::collections::HashMap&lt;String, crate::models::BillingRegions&gt;**](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)

Expand Down
2 changes: 1 addition & 1 deletion docs/BillingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions docs/BillingBandwidth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# BillingBandwidth

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | Option<**f32**> | |
**tiers** | Option<[**Vec&lt;crate::models::BillingBandwidthTiers&gt;**](BillingBandwidthTiers.md)> | |

[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


15 changes: 15 additions & 0 deletions docs/BillingBandwidthTiers.md
Original file line number Diff line number Diff line change
@@ -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)


11 changes: 11 additions & 0 deletions docs/BillingEstimateInvoiceId.md
Original file line number Diff line number Diff line change
@@ -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)


4 changes: 2 additions & 2 deletions docs/BillingEstimateResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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&lt;String, ::std::collections::HashMap&lt;String, serde_json::Value&gt;&gt;**](Map.md)> | Breakdown of regional data for products that are region based. |
**regions** | Option<[**::std::collections::HashMap&lt;String, crate::models::BillingRegions&gt;**](BillingRegions.md)> | Breakdown of regional data for products that are region based. |
**invoice_id** | Option<**String**> | | [readonly]
**line_items** | Option<[**Vec&lt;crate::models::BillingEstimateLinesLineItems&gt;**](BillingEstimateLinesLineItems.md)> | |

[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/BillingInvoicesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions docs/BillingRegions.md
Original file line number Diff line number Diff line change
@@ -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)


4 changes: 2 additions & 2 deletions docs/BillingResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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&lt;String, ::std::collections::HashMap&lt;String, serde_json::Value&gt;&gt;**](Map.md)> | Breakdown of regional data for products that are region based. |
**regions** | Option<[**::std::collections::HashMap&lt;String, crate::models::BillingRegions&gt;**](BillingRegions.md)> | Breakdown of regional data for products that are region based. |
**invoice_id** | Option<**i32**> | | [readonly]
**line_items** | Option<[**Vec&lt;crate::models::BillingResponseLineItem&gt;**](BillingResponseLineItem.md)> | |

[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/BillingResponseLineItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**> | |
Expand Down
2 changes: 1 addition & 1 deletion docs/EomInvoiceResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/Invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/LineItemData.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**> | |
Expand Down
2 changes: 1 addition & 1 deletion sig.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"G": "01161630", "D": "e05af2db"}
{"G": "01161630", "D": "80b361d0"}
5 changes: 2 additions & 3 deletions src/apis/billing_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`]
Expand Down Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions src/apis/billing_invoices_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`]
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions src/models/billing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
#[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
pub invoice_id: Option<Box<String>>,
#[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<Box<String>>,
/// The current state of our third-party billing vendor. One of `up` or `down`.
Expand All @@ -29,15 +27,14 @@ pub struct Billing {
pub total: Option<Box<crate::models::BillingTotal>>,
/// 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<String, ::std::collections::HashMap<String, serde_json::Value>>>,
pub regions: Option<::std::collections::HashMap<String, crate::models::BillingRegions>>,
}

impl Billing {
pub fn new() -> Billing {
Billing {
end_time: None,
start_time: None,
invoice_id: None,
customer_id: None,
vendor_state: None,
status: None,
Expand Down
28 changes: 28 additions & 0 deletions src/models/billing_bandwidth.rs
Original file line number Diff line number Diff line change
@@ -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<f32>,
#[serde(rename = "tiers", skip_serializing_if = "Option::is_none")]
pub tiers: Option<Vec<crate::models::BillingBandwidthTiers>>,
}

impl BillingBandwidth {
pub fn new() -> BillingBandwidth {
BillingBandwidth {
total: None,
tiers: None,
}
}
}


37 changes: 37 additions & 0 deletions src/models/billing_bandwidth_tiers.rs
Original file line number Diff line number Diff line change
@@ -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<String>,
#[serde(rename = "units", skip_serializing_if = "Option::is_none")]
pub units: Option<f32>,
#[serde(rename = "price", skip_serializing_if = "Option::is_none")]
pub price: Option<f32>,
#[serde(rename = "discounted_price", skip_serializing_if = "Option::is_none")]
pub discounted_price: Option<f32>,
#[serde(rename = "total", skip_serializing_if = "Option::is_none")]
pub total: Option<f32>,
}

impl BillingBandwidthTiers {
pub fn new() -> BillingBandwidthTiers {
BillingBandwidthTiers {
name: None,
units: None,
price: None,
discounted_price: None,
total: None,
}
}
}


25 changes: 25 additions & 0 deletions src/models/billing_estimate_invoice_id.rs
Original file line number Diff line number Diff line change
@@ -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<String>,
}

impl BillingEstimateInvoiceId {
pub fn new() -> BillingEstimateInvoiceId {
BillingEstimateInvoiceId {
invoice_id: None,
}
}
}


8 changes: 4 additions & 4 deletions src/models/billing_estimate_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
#[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
pub invoice_id: Option<Box<String>>,
#[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<Box<String>>,
/// The current state of our third-party billing vendor. One of `up` or `down`.
Expand All @@ -29,7 +27,9 @@ pub struct BillingEstimateResponse {
pub total: Option<Box<crate::models::BillingTotal>>,
/// 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<String, ::std::collections::HashMap<String, serde_json::Value>>>,
pub regions: Option<::std::collections::HashMap<String, crate::models::BillingRegions>>,
#[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
pub invoice_id: Option<String>,
#[serde(rename = "line_items", skip_serializing_if = "Option::is_none")]
pub line_items: Option<Vec<crate::models::BillingEstimateLinesLineItems>>,
}
Expand All @@ -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,
}
}
Expand Down
Loading

0 comments on commit eafac70

Please sign in to comment.