Skip to content

Commit eafac70

Browse files
author
github-actions
committed
Generated v4.10.0
1 parent c50dc16 commit eafac70

34 files changed

+254
-41
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [v4.10.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.10.0) (2024-08-08)
4+
5+
**Bug fixes:**
6+
7+
- fix(billing): Adjust type of regional data to help the generator
8+
- fix(billing): Correct type of invoice_id field
9+
310
## [v4.9.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.9.0) (2024-08-04)
411

512
**Enhancements:**

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fastly-api"
3-
version = "4.9.0"
3+
version = "4.10.0"
44
authors = ["Fastly <[email protected]>"]
55
edition = "2021"
66
description = "Fastly API client"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Rust 2021 Edition
1515
Add the following to `Cargo.toml` under `[dependencies]`:
1616

1717
```toml
18-
fastly-api = "4.9.0"
18+
fastly-api = "4.10.0"
1919
```
2020

2121
## Usage

docs/Billing.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**end_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
88
**start_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
9-
**invoice_id** | Option<**String**> | | [readonly]
109
**customer_id** | Option<**String**> | | [readonly]
1110
**vendor_state** | Option<**String**> | The current state of our third-party billing vendor. One of `up` or `down`. | [readonly]
1211
**status** | Option<[**crate::models::BillingStatus**](BillingStatus.md)> | |
1312
**total** | Option<[**crate::models::BillingTotal**](BillingTotal.md)> | |
14-
**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. |
13+
**regions** | Option<[**::std::collections::HashMap&lt;String, crate::models::BillingRegions&gt;**](BillingRegions.md)> | Breakdown of regional data for products that are region based. |
1514

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

docs/BillingApi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ get_invoice_by_id(cfg, params)
6565
Name | Type | Description | Required | Notes
6666
------------- | ------------- | ------------- | ------------- | -------------
6767
**customer_id** | **String** | Alphanumeric string identifying the customer. | [required] |
68-
**invoice_id** | **String** | Alphanumeric string identifying the invoice. | [required] |
68+
**invoice_id** | **i32** | | [required] |
6969

7070
### Return type
7171

docs/BillingBandwidth.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# BillingBandwidth
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**total** | Option<**f32**> | |
8+
**tiers** | Option<[**Vec&lt;crate::models::BillingBandwidthTiers&gt;**](BillingBandwidthTiers.md)> | |
9+
10+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/BillingBandwidthTiers.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# BillingBandwidthTiers
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | Option<**String**> | |
8+
**units** | Option<**f32**> | |
9+
**price** | Option<**f32**> | |
10+
**discounted_price** | Option<**f32**> | |
11+
**total** | Option<**f32**> | |
12+
13+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+

docs/BillingEstimateInvoiceId.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# BillingEstimateInvoiceId
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**invoice_id** | Option<**String**> | | [readonly]
8+
9+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/BillingEstimateResponse.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**end_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
88
**start_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
9-
**invoice_id** | Option<**String**> | | [readonly]
109
**customer_id** | Option<**String**> | | [readonly]
1110
**vendor_state** | Option<**String**> | The current state of our third-party billing vendor. One of `up` or `down`. | [readonly]
1211
**status** | Option<[**crate::models::BillingStatus**](BillingStatus.md)> | |
1312
**total** | Option<[**crate::models::BillingTotal**](BillingTotal.md)> | |
14-
**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. |
13+
**regions** | Option<[**::std::collections::HashMap&lt;String, crate::models::BillingRegions&gt;**](BillingRegions.md)> | Breakdown of regional data for products that are region based. |
14+
**invoice_id** | Option<**String**> | | [readonly]
1515
**line_items** | Option<[**Vec&lt;crate::models::BillingEstimateLinesLineItems&gt;**](BillingEstimateLinesLineItems.md)> | |
1616

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

docs/LineItemDataReadOnlyInvoiceId.md docs/BillingInvoiceId.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# LineItemDataReadOnlyInvoiceId
1+
# BillingInvoiceId
22

33
## Properties
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**invoice_id** | Option<**i32**> | | [readonly]
78

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

docs/BillingInvoicesApi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ get_invoice_by_invoice_id(cfg, params)
2828

2929
Name | Type | Description | Required | Notes
3030
------------- | ------------- | ------------- | ------------- | -------------
31-
**invoice_id** | **String** | Alphanumeric string identifying the invoice. | [required] |
31+
**invoice_id** | **i32** | | [required] |
3232

3333
### Return type
3434

docs/BillingRegions.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# BillingRegions
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**cost** | Option<**f32**> | |
8+
**bandwidth** | Option<[**crate::models::BillingBandwidth**](BillingBandwidth.md)> | |
9+
**percentile** | Option<[**crate::models::BillingBandwidth**](BillingBandwidth.md)> | |
10+
**requests** | Option<[**crate::models::BillingBandwidth**](BillingBandwidth.md)> | |
11+
12+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

docs/BillingResponse.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**end_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
88
**start_time** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
9-
**invoice_id** | Option<**String**> | | [readonly]
109
**customer_id** | Option<**String**> | | [readonly]
1110
**vendor_state** | Option<**String**> | The current state of our third-party billing vendor. One of `up` or `down`. | [readonly]
1211
**status** | Option<[**crate::models::BillingStatus**](BillingStatus.md)> | |
1312
**total** | Option<[**crate::models::BillingTotal**](BillingTotal.md)> | |
14-
**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. |
13+
**regions** | Option<[**::std::collections::HashMap&lt;String, crate::models::BillingRegions&gt;**](BillingRegions.md)> | Breakdown of regional data for products that are region based. |
14+
**invoice_id** | Option<**i32**> | | [readonly]
1515
**line_items** | Option<[**Vec&lt;crate::models::BillingResponseLineItem&gt;**](BillingResponseLineItem.md)> | |
1616

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

docs/BillingResponseLineItem.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**deleted_at** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
99
**updated_at** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
1010
**amount** | Option<**f32**> | |
11-
**aria_invoice_id** | Option<[**crate::models::LineItemDataReadOnlyInvoiceId**](LineItemDataReadOnlyInvoiceId.md)> | |
11+
**aria_invoice_id** | Option<**String**> | An alphanumeric string identifying the invoice. | [readonly]
1212
**client_service_id** | Option<**String**> | |
1313
**credit_coupon_code** | Option<**String**> | |
1414
**description** | Option<**String**> | |

docs/EomInvoiceResponse.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**customer_id** | Option<**String**> | Customer ID associated with the invoice. |
8-
**invoice_id** | Option<**String**> | Alphanumeric string identifying the invoice. |
8+
**invoice_id** | Option<**String**> | Numeric string identifying the invoice. |
99
**invoice_posted_on** | Option<**String**> | Date and time invoice was posted on, in ISO 8601 format. |
1010
**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. |
1111
**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. |

docs/Invoice.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**customer_id** | Option<**String**> | Customer ID associated with the invoice. |
8-
**invoice_id** | Option<**String**> | Alphanumeric string identifying the invoice. |
8+
**invoice_id** | Option<**String**> | Numeric string identifying the invoice. |
99
**invoice_posted_on** | Option<**String**> | Date and time invoice was posted on, in ISO 8601 format. |
1010
**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. |
1111
**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. |

docs/LineItemData.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**amount** | Option<**f32**> | |
8-
**aria_invoice_id** | Option<[**crate::models::LineItemDataReadOnlyInvoiceId**](LineItemDataReadOnlyInvoiceId.md)> | |
8+
**aria_invoice_id** | Option<**String**> | An alphanumeric string identifying the invoice. | [readonly]
99
**client_service_id** | Option<**String**> | |
1010
**credit_coupon_code** | Option<**String**> | |
1111
**description** | Option<**String**> | |

sig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"G": "01161630", "D": "e05af2db"}
1+
{"G": "01161630", "D": "80b361d0"}

src/apis/billing_api.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ pub struct GetInvoiceParams {
2525
pub struct GetInvoiceByIdParams {
2626
/// Alphanumeric string identifying the customer.
2727
pub customer_id: String,
28-
/// Alphanumeric string identifying the invoice.
29-
pub invoice_id: String
28+
pub invoice_id: i32
3029
}
3130

3231
/// 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,
127126

128127
let local_var_client = &local_var_configuration.client;
129128

130-
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));
129+
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);
131130
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
132131

133132
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {

src/apis/billing_invoices_api.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ use super::{Error, configuration};
1414
/// struct for passing parameters to the method [`get_invoice_by_invoice_id`]
1515
#[derive(Clone, Debug, Default)]
1616
pub struct GetInvoiceByInvoiceIdParams {
17-
/// Alphanumeric string identifying the invoice.
18-
pub invoice_id: String
17+
pub invoice_id: i32
1918
}
2019

2120
/// 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
7271

7372
let local_var_client = &local_var_configuration.client;
7473

75-
let local_var_uri_str = format!("{}/billing/v3/invoices/{invoice_id}", local_var_configuration.base_path, invoice_id=crate::apis::urlencode(invoice_id));
74+
let local_var_uri_str = format!("{}/billing/v3/invoices/{invoice_id}", local_var_configuration.base_path, invoice_id=invoice_id);
7675
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7776

7877
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {

src/apis/configuration.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Default for Configuration {
4949

5050
Configuration {
5151
base_path: "https://api.fastly.com".to_owned(),
52-
user_agent: Some("fastly-rust/4.9.0/rust".to_owned()),
52+
user_agent: Some("fastly-rust/4.10.0/rust".to_owned()),
5353
client: reqwest::Client::new(),
5454
basic_auth: None,
5555
oauth_access_token: None,

src/models/billing.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ pub struct Billing {
1616
/// Date and time in ISO 8601 format.
1717
#[serde(rename = "start_time", skip_serializing_if = "Option::is_none")]
1818
pub start_time: Option<String>,
19-
#[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
20-
pub invoice_id: Option<Box<String>>,
2119
#[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
2220
pub customer_id: Option<Box<String>>,
2321
/// The current state of our third-party billing vendor. One of `up` or `down`.
@@ -29,15 +27,14 @@ pub struct Billing {
2927
pub total: Option<Box<crate::models::BillingTotal>>,
3028
/// Breakdown of regional data for products that are region based.
3129
#[serde(rename = "regions", skip_serializing_if = "Option::is_none")]
32-
pub regions: Option<::std::collections::HashMap<String, ::std::collections::HashMap<String, serde_json::Value>>>,
30+
pub regions: Option<::std::collections::HashMap<String, crate::models::BillingRegions>>,
3331
}
3432

3533
impl Billing {
3634
pub fn new() -> Billing {
3735
Billing {
3836
end_time: None,
3937
start_time: None,
40-
invoice_id: None,
4138
customer_id: None,
4239
vendor_state: None,
4340
status: None,

src/models/billing_bandwidth.rs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Fastly API
3+
*
4+
* 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/)
5+
*
6+
*/
7+
8+
9+
10+
11+
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12+
pub struct BillingBandwidth {
13+
#[serde(rename = "total", skip_serializing_if = "Option::is_none")]
14+
pub total: Option<f32>,
15+
#[serde(rename = "tiers", skip_serializing_if = "Option::is_none")]
16+
pub tiers: Option<Vec<crate::models::BillingBandwidthTiers>>,
17+
}
18+
19+
impl BillingBandwidth {
20+
pub fn new() -> BillingBandwidth {
21+
BillingBandwidth {
22+
total: None,
23+
tiers: None,
24+
}
25+
}
26+
}
27+
28+

src/models/billing_bandwidth_tiers.rs

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Fastly API
3+
*
4+
* 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/)
5+
*
6+
*/
7+
8+
9+
10+
11+
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12+
pub struct BillingBandwidthTiers {
13+
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
14+
pub name: Option<String>,
15+
#[serde(rename = "units", skip_serializing_if = "Option::is_none")]
16+
pub units: Option<f32>,
17+
#[serde(rename = "price", skip_serializing_if = "Option::is_none")]
18+
pub price: Option<f32>,
19+
#[serde(rename = "discounted_price", skip_serializing_if = "Option::is_none")]
20+
pub discounted_price: Option<f32>,
21+
#[serde(rename = "total", skip_serializing_if = "Option::is_none")]
22+
pub total: Option<f32>,
23+
}
24+
25+
impl BillingBandwidthTiers {
26+
pub fn new() -> BillingBandwidthTiers {
27+
BillingBandwidthTiers {
28+
name: None,
29+
units: None,
30+
price: None,
31+
discounted_price: None,
32+
total: None,
33+
}
34+
}
35+
}
36+
37+
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Fastly API
3+
*
4+
* 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/)
5+
*
6+
*/
7+
8+
9+
10+
11+
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12+
pub struct BillingEstimateInvoiceId {
13+
#[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
14+
pub invoice_id: Option<String>,
15+
}
16+
17+
impl BillingEstimateInvoiceId {
18+
pub fn new() -> BillingEstimateInvoiceId {
19+
BillingEstimateInvoiceId {
20+
invoice_id: None,
21+
}
22+
}
23+
}
24+
25+

src/models/billing_estimate_response.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ pub struct BillingEstimateResponse {
1616
/// Date and time in ISO 8601 format.
1717
#[serde(rename = "start_time", skip_serializing_if = "Option::is_none")]
1818
pub start_time: Option<String>,
19-
#[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
20-
pub invoice_id: Option<Box<String>>,
2119
#[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
2220
pub customer_id: Option<Box<String>>,
2321
/// The current state of our third-party billing vendor. One of `up` or `down`.
@@ -29,7 +27,9 @@ pub struct BillingEstimateResponse {
2927
pub total: Option<Box<crate::models::BillingTotal>>,
3028
/// Breakdown of regional data for products that are region based.
3129
#[serde(rename = "regions", skip_serializing_if = "Option::is_none")]
32-
pub regions: Option<::std::collections::HashMap<String, ::std::collections::HashMap<String, serde_json::Value>>>,
30+
pub regions: Option<::std::collections::HashMap<String, crate::models::BillingRegions>>,
31+
#[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
32+
pub invoice_id: Option<String>,
3333
#[serde(rename = "line_items", skip_serializing_if = "Option::is_none")]
3434
pub line_items: Option<Vec<crate::models::BillingEstimateLinesLineItems>>,
3535
}
@@ -39,12 +39,12 @@ impl BillingEstimateResponse {
3939
BillingEstimateResponse {
4040
end_time: None,
4141
start_time: None,
42-
invoice_id: None,
4342
customer_id: None,
4443
vendor_state: None,
4544
status: None,
4645
total: None,
4746
regions: None,
47+
invoice_id: None,
4848
line_items: None,
4949
}
5050
}

0 commit comments

Comments
 (0)