From 0b00a48b27c0ef38eec8ef225041ff89824e78a1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 8 Aug 2024 09:35:25 +0000 Subject: [PATCH] Generated v5.7.0 --- CHANGELOG.md | 7 + docs/Billing.md | 3 +- docs/BillingApi.md | 4 +- docs/BillingBandwidth.md | 13 + docs/BillingBandwidthTiers.md | 16 ++ docs/BillingEstimateInvoiceId.md | 12 + docs/BillingEstimateResponse.md | 4 +- ...adOnlyInvoiceId.md => BillingInvoiceId.md} | 4 +- docs/BillingInvoicesApi.md | 4 +- docs/BillingRegions.md | 15 + docs/BillingResponse.md | 4 +- docs/BillingResponseLineItem.md | 2 +- docs/EomInvoiceResponse.md | 2 +- docs/Invoice.md | 2 +- docs/LineItemData.md | 2 +- fastly/__init__.py | 2 +- fastly/api/billing_api.py | 4 +- fastly/api/billing_invoices_api.py | 4 +- fastly/api_client.py | 2 +- fastly/configuration.py | 2 +- fastly/model/billing.py | 13 +- fastly/model/billing_bandwidth.py | 263 +++++++++++++++++ fastly/model/billing_bandwidth_tiers.py | 269 +++++++++++++++++ fastly/model/billing_estimate_invoice_id.py | 254 ++++++++++++++++ fastly/model/billing_estimate_response.py | 21 +- ...ly_invoice_id.py => billing_invoice_id.py} | 19 +- fastly/model/billing_regions.py | 271 ++++++++++++++++++ fastly/model/billing_response.py | 21 +- fastly/model/billing_response_line_item.py | 9 +- fastly/model/eom_invoice_response.py | 4 +- fastly/model/invoice.py | 4 +- fastly/model/line_item_data.py | 13 +- fastly/models/__init__.py | 6 +- setup.py | 2 +- sig.json | 2 +- 35 files changed, 1208 insertions(+), 71 deletions(-) create mode 100644 docs/BillingBandwidth.md create mode 100644 docs/BillingBandwidthTiers.md create mode 100644 docs/BillingEstimateInvoiceId.md rename docs/{LineItemDataReadOnlyInvoiceId.md => BillingInvoiceId.md} (53%) create mode 100644 docs/BillingRegions.md create mode 100644 fastly/model/billing_bandwidth.py create mode 100644 fastly/model/billing_bandwidth_tiers.py create mode 100644 fastly/model/billing_estimate_invoice_id.py rename fastly/model/{line_item_data_read_only_invoice_id.py => billing_invoice_id.py} (93%) create mode 100644 fastly/model/billing_regions.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dd990f..0997c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [v5.7.0](https://github.com/fastly/fastly-py/releases/tag/release/v5.7.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 + ## [v5.6.0](https://github.com/fastly/fastly-py/releases/tag/release/v5.6.0) (2024-08-04) **Enhancements:** diff --git a/docs/Billing.md b/docs/Billing.md index 9aff2da..3d56d47 100644 --- a/docs/Billing.md +++ b/docs/Billing.md @@ -6,12 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **end_time** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] **start_time** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] -**invoice_id** | **str** | | [optional] [readonly] **customer_id** | **str** | | [optional] [readonly] **vendor_state** | **str** | The current state of our third-party billing vendor. One of `up` or `down`. | [optional] [readonly] **status** | [**BillingStatus**](BillingStatus.md) | | [optional] **total** | [**BillingTotal**](BillingTotal.md) | | [optional] -**regions** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | Breakdown of regional data for products that are region based. | [optional] +**regions** | [**{str: (BillingRegions,)}**](BillingRegions.md) | Breakdown of regional data for products that are region based. | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[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 e742100..5255c00 100644 --- a/docs/BillingApi.md +++ b/docs/BillingApi.md @@ -129,7 +129,7 @@ with fastly.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = billing_api.BillingApi(api_client) customer_id = "x4xCwxxJxGCx123Rx5xTx" # str | Alphanumeric string identifying the customer. - invoice_id = "7SlAESxcJ2zxHOV4gQ9y9X" # str | Alphanumeric string identifying the invoice. + invoice_id = 4183280 # int | # example passing only required values which don't have defaults set try: @@ -146,7 +146,7 @@ with fastly.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **customer_id** | **str**| Alphanumeric string identifying the customer. | - **invoice_id** | **str**| Alphanumeric string identifying the invoice. | + **invoice_id** | **int**| | ### Return type diff --git a/docs/BillingBandwidth.md b/docs/BillingBandwidth.md new file mode 100644 index 0000000..3674edd --- /dev/null +++ b/docs/BillingBandwidth.md @@ -0,0 +1,13 @@ +# BillingBandwidth + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | | [optional] +**tiers** | [**[BillingBandwidthTiers]**](BillingBandwidthTiers.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[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..dafc5fc --- /dev/null +++ b/docs/BillingBandwidthTiers.md @@ -0,0 +1,16 @@ +# BillingBandwidthTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**units** | **float** | | [optional] +**price** | **float** | | [optional] +**discounted_price** | **float** | | [optional] +**total** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[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..bdd0175 --- /dev/null +++ b/docs/BillingEstimateInvoiceId.md @@ -0,0 +1,12 @@ +# BillingEstimateInvoiceId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoice_id** | **str** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[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 e91888e..a8a23e0 100644 --- a/docs/BillingEstimateResponse.md +++ b/docs/BillingEstimateResponse.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **end_time** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] **start_time** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] -**invoice_id** | **str** | | [optional] [readonly] **customer_id** | **str** | | [optional] [readonly] **vendor_state** | **str** | The current state of our third-party billing vendor. One of `up` or `down`. | [optional] [readonly] **status** | [**BillingStatus**](BillingStatus.md) | | [optional] **total** | [**BillingTotal**](BillingTotal.md) | | [optional] -**regions** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | Breakdown of regional data for products that are region based. | [optional] +**regions** | [**{str: (BillingRegions,)}**](BillingRegions.md) | Breakdown of regional data for products that are region based. | [optional] +**invoice_id** | **str** | | [optional] [readonly] **line_items** | [**[BillingEstimateLinesLineItems]**](BillingEstimateLinesLineItems.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/LineItemDataReadOnlyInvoiceId.md b/docs/BillingInvoiceId.md similarity index 53% rename from docs/LineItemDataReadOnlyInvoiceId.md rename to docs/BillingInvoiceId.md index e3b2e6a..cf146bb 100644 --- a/docs/LineItemDataReadOnlyInvoiceId.md +++ b/docs/BillingInvoiceId.md @@ -1,9 +1,11 @@ -# LineItemDataReadOnlyInvoiceId +# BillingInvoiceId ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**invoice_id** | **int** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[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 b275206..a4b5aec 100644 --- a/docs/BillingInvoicesApi.md +++ b/docs/BillingInvoicesApi.md @@ -49,7 +49,7 @@ configuration.api_key['token'] = 'YOUR_API_KEY' with fastly.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = billing_invoices_api.BillingInvoicesApi(api_client) - invoice_id = "7SlAESxcJ2zxHOV4gQ9y9X" # str | Alphanumeric string identifying the invoice. + invoice_id = 4183280 # int | # example passing only required values which don't have defaults set try: @@ -65,7 +65,7 @@ with fastly.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **invoice_id** | **str**| Alphanumeric string identifying the invoice. | + **invoice_id** | **int**| | ### Return type diff --git a/docs/BillingRegions.md b/docs/BillingRegions.md new file mode 100644 index 0000000..3f0df45 --- /dev/null +++ b/docs/BillingRegions.md @@ -0,0 +1,15 @@ +# BillingRegions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cost** | **float** | | [optional] +**bandwidth** | [**BillingBandwidth**](BillingBandwidth.md) | | [optional] +**percentile** | [**BillingBandwidth**](BillingBandwidth.md) | | [optional] +**requests** | [**BillingBandwidth**](BillingBandwidth.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[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 0c1583b..9b5307e 100644 --- a/docs/BillingResponse.md +++ b/docs/BillingResponse.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **end_time** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] **start_time** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] -**invoice_id** | **str** | | [optional] [readonly] **customer_id** | **str** | | [optional] [readonly] **vendor_state** | **str** | The current state of our third-party billing vendor. One of `up` or `down`. | [optional] [readonly] **status** | [**BillingStatus**](BillingStatus.md) | | [optional] **total** | [**BillingTotal**](BillingTotal.md) | | [optional] -**regions** | **{str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}** | Breakdown of regional data for products that are region based. | [optional] +**regions** | [**{str: (BillingRegions,)}**](BillingRegions.md) | Breakdown of regional data for products that are region based. | [optional] +**invoice_id** | **int** | | [optional] [readonly] **line_items** | [**BillingResponseLineItems**](BillingResponseLineItems.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/BillingResponseLineItem.md b/docs/BillingResponseLineItem.md index 5610c7e..68283e9 100644 --- a/docs/BillingResponseLineItem.md +++ b/docs/BillingResponseLineItem.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **deleted_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] **updated_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] **amount** | **float** | | [optional] -**aria_invoice_id** | [**LineItemDataReadOnlyInvoiceId**](LineItemDataReadOnlyInvoiceId.md) | | [optional] +**aria_invoice_id** | **str** | An alphanumeric string identifying the invoice. | [optional] [readonly] **client_service_id** | **str** | | [optional] **credit_coupon_code** | **str, none_type** | | [optional] **description** | **str** | | [optional] diff --git a/docs/EomInvoiceResponse.md b/docs/EomInvoiceResponse.md index 817b480..6173f46 100644 --- a/docs/EomInvoiceResponse.md +++ b/docs/EomInvoiceResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_id** | **str** | Customer ID associated with the invoice. | [optional] -**invoice_id** | **str** | Alphanumeric string identifying the invoice. | [optional] +**invoice_id** | **str** | Numeric string identifying the invoice. | [optional] **invoice_posted_on** | **datetime** | Date and time invoice was posted on, in ISO 8601 format. | [optional] **billing_start_date** | **datetime** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] **billing_end_date** | **datetime** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] diff --git a/docs/Invoice.md b/docs/Invoice.md index 2d9b030..bacc5db 100644 --- a/docs/Invoice.md +++ b/docs/Invoice.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_id** | **str** | Customer ID associated with the invoice. | [optional] -**invoice_id** | **str** | Alphanumeric string identifying the invoice. | [optional] +**invoice_id** | **str** | Numeric string identifying the invoice. | [optional] **invoice_posted_on** | **datetime** | Date and time invoice was posted on, in ISO 8601 format. | [optional] **billing_start_date** | **datetime** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] **billing_end_date** | **datetime** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] diff --git a/docs/LineItemData.md b/docs/LineItemData.md index 2502938..f979465 100644 --- a/docs/LineItemData.md +++ b/docs/LineItemData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **float** | | [optional] -**aria_invoice_id** | [**LineItemDataReadOnlyInvoiceId**](LineItemDataReadOnlyInvoiceId.md) | | [optional] +**aria_invoice_id** | **str** | An alphanumeric string identifying the invoice. | [optional] [readonly] **client_service_id** | **str** | | [optional] **credit_coupon_code** | **str, none_type** | | [optional] **description** | **str** | | [optional] diff --git a/fastly/__init__.py b/fastly/__init__.py index 22f5a10..ec7f4f5 100644 --- a/fastly/__init__.py +++ b/fastly/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "5.6.0" +__version__ = "5.7.0" # import ApiClient from fastly.api_client import ApiClient diff --git a/fastly/api/billing_api.py b/fastly/api/billing_api.py index 4f0e13b..324deba 100644 --- a/fastly/api/billing_api.py +++ b/fastly/api/billing_api.py @@ -141,7 +141,7 @@ def __init__(self, api_client=None): 'customer_id': (str,), 'invoice_id': - (str,), + (int,), }, 'attribute_map': { 'customer_id': 'customer_id', @@ -334,7 +334,7 @@ def get_invoice_by_id( Args: customer_id (str): Alphanumeric string identifying the customer. - invoice_id (str): Alphanumeric string identifying the invoice. + invoice_id (int): Keyword Args: _return_http_data_only (bool): response data without head status diff --git a/fastly/api/billing_invoices_api.py b/fastly/api/billing_invoices_api.py index 2c3c643..7855922 100644 --- a/fastly/api/billing_invoices_api.py +++ b/fastly/api/billing_invoices_api.py @@ -74,7 +74,7 @@ def __init__(self, api_client=None): }, 'openapi_types': { 'invoice_id': - (str,), + (int,), }, 'attribute_map': { 'invoice_id': 'invoice_id', @@ -233,7 +233,7 @@ def get_invoice_by_invoice_id( >>> result = thread.get() Args: - invoice_id (str): Alphanumeric string identifying the invoice. + invoice_id (int): Keyword Args: _return_http_data_only (bool): response data without head status diff --git a/fastly/api_client.py b/fastly/api_client.py index 5416e76..e09fb35 100644 --- a/fastly/api_client.py +++ b/fastly/api_client.py @@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'fastly-py/5.6.0' + self.user_agent = 'fastly-py/5.7.0' # The last observed value of http header Fastly-RateLimit-Remaining self.rate_limit_remaining = DEFAULT_RATELIMIT diff --git a/fastly/configuration.py b/fastly/configuration.py index 2914148..a2c21db 100644 --- a/fastly/configuration.py +++ b/fastly/configuration.py @@ -446,7 +446,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 5.6.0".\ + "SDK Package Version: 5.7.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/fastly/model/billing.py b/fastly/model/billing.py index 53ffc31..3830a70 100644 --- a/fastly/model/billing.py +++ b/fastly/model/billing.py @@ -30,8 +30,10 @@ def lazy_import(): + from fastly.model.billing_regions import BillingRegions from fastly.model.billing_status import BillingStatus from fastly.model.billing_total import BillingTotal + globals()['BillingRegions'] = BillingRegions globals()['BillingStatus'] = BillingStatus globals()['BillingTotal'] = BillingTotal @@ -89,12 +91,11 @@ def openapi_types(): return { 'end_time': (datetime, none_type,), # noqa: E501 'start_time': (datetime, none_type,), # noqa: E501 - 'invoice_id': (str,), # noqa: E501 'customer_id': (str,), # noqa: E501 'vendor_state': (str,), # noqa: E501 'status': (BillingStatus,), # noqa: E501 'total': (BillingTotal,), # noqa: E501 - 'regions': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501 + 'regions': ({str: (BillingRegions,)},), # noqa: E501 } @cached_property @@ -105,7 +106,6 @@ def discriminator(): attribute_map = { 'end_time': 'end_time', # noqa: E501 'start_time': 'start_time', # noqa: E501 - 'invoice_id': 'invoice_id', # noqa: E501 'customer_id': 'customer_id', # noqa: E501 'vendor_state': 'vendor_state', # noqa: E501 'status': 'status', # noqa: E501 @@ -116,7 +116,6 @@ def discriminator(): read_only_vars = { 'end_time', # noqa: E501 'start_time', # noqa: E501 - 'invoice_id', # noqa: E501 'customer_id', # noqa: E501 'vendor_state', # noqa: E501 } @@ -161,12 +160,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) end_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 start_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 - invoice_id (str): [optional] # noqa: E501 customer_id (str): [optional] # noqa: E501 vendor_state (str): The current state of our third-party billing vendor. One of `up` or `down`.. [optional] # noqa: E501 status (BillingStatus): [optional] # noqa: E501 total (BillingTotal): [optional] # noqa: E501 - regions ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + regions ({str: (BillingRegions,)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -250,12 +248,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) end_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 start_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 - invoice_id (str): [optional] # noqa: E501 customer_id (str): [optional] # noqa: E501 vendor_state (str): The current state of our third-party billing vendor. One of `up` or `down`.. [optional] # noqa: E501 status (BillingStatus): [optional] # noqa: E501 total (BillingTotal): [optional] # noqa: E501 - regions ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + regions ({str: (BillingRegions,)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/billing_bandwidth.py b/fastly/model/billing_bandwidth.py new file mode 100644 index 0000000..48130c1 --- /dev/null +++ b/fastly/model/billing_bandwidth.py @@ -0,0 +1,263 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.billing_bandwidth_tiers import BillingBandwidthTiers + globals()['BillingBandwidthTiers'] = BillingBandwidthTiers + + +class BillingBandwidth(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'total': (float,), # noqa: E501 + 'tiers': ([BillingBandwidthTiers],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'total': 'total', # noqa: E501 + 'tiers': 'tiers', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BillingBandwidth - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): [optional] # noqa: E501 + tiers ([BillingBandwidthTiers]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BillingBandwidth - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + total (float): [optional] # noqa: E501 + tiers ([BillingBandwidthTiers]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/billing_bandwidth_tiers.py b/fastly/model/billing_bandwidth_tiers.py new file mode 100644 index 0000000..402af51 --- /dev/null +++ b/fastly/model/billing_bandwidth_tiers.py @@ -0,0 +1,269 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class BillingBandwidthTiers(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'units': (float,), # noqa: E501 + 'price': (float,), # noqa: E501 + 'discounted_price': (float,), # noqa: E501 + 'total': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'units': 'units', # noqa: E501 + 'price': 'price', # noqa: E501 + 'discounted_price': 'discounted_price', # noqa: E501 + 'total': 'total', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BillingBandwidthTiers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 + units (float): [optional] # noqa: E501 + price (float): [optional] # noqa: E501 + discounted_price (float): [optional] # noqa: E501 + total (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BillingBandwidthTiers - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 + units (float): [optional] # noqa: E501 + price (float): [optional] # noqa: E501 + discounted_price (float): [optional] # noqa: E501 + total (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/billing_estimate_invoice_id.py b/fastly/model/billing_estimate_invoice_id.py new file mode 100644 index 0000000..480e155 --- /dev/null +++ b/fastly/model/billing_estimate_invoice_id.py @@ -0,0 +1,254 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class BillingEstimateInvoiceId(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'invoice_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invoice_id': 'invoice_id', # noqa: E501 + } + + read_only_vars = { + 'invoice_id', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BillingEstimateInvoiceId - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invoice_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BillingEstimateInvoiceId - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invoice_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/billing_estimate_response.py b/fastly/model/billing_estimate_response.py index 663b406..6fe5d2d 100644 --- a/fastly/model/billing_estimate_response.py +++ b/fastly/model/billing_estimate_response.py @@ -31,13 +31,17 @@ def lazy_import(): from fastly.model.billing import Billing + from fastly.model.billing_estimate_invoice_id import BillingEstimateInvoiceId from fastly.model.billing_estimate_lines import BillingEstimateLines from fastly.model.billing_estimate_lines_line_items import BillingEstimateLinesLineItems + from fastly.model.billing_regions import BillingRegions from fastly.model.billing_status import BillingStatus from fastly.model.billing_total import BillingTotal globals()['Billing'] = Billing + globals()['BillingEstimateInvoiceId'] = BillingEstimateInvoiceId globals()['BillingEstimateLines'] = BillingEstimateLines globals()['BillingEstimateLinesLineItems'] = BillingEstimateLinesLineItems + globals()['BillingRegions'] = BillingRegions globals()['BillingStatus'] = BillingStatus globals()['BillingTotal'] = BillingTotal @@ -95,12 +99,12 @@ def openapi_types(): return { 'end_time': (datetime, none_type,), # noqa: E501 'start_time': (datetime, none_type,), # noqa: E501 - 'invoice_id': (str,), # noqa: E501 'customer_id': (str,), # noqa: E501 'vendor_state': (str,), # noqa: E501 'status': (BillingStatus,), # noqa: E501 'total': (BillingTotal,), # noqa: E501 - 'regions': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501 + 'regions': ({str: (BillingRegions,)},), # noqa: E501 + 'invoice_id': (str,), # noqa: E501 'line_items': ([BillingEstimateLinesLineItems],), # noqa: E501 } @@ -112,21 +116,21 @@ def discriminator(): attribute_map = { 'end_time': 'end_time', # noqa: E501 'start_time': 'start_time', # noqa: E501 - 'invoice_id': 'invoice_id', # noqa: E501 'customer_id': 'customer_id', # noqa: E501 'vendor_state': 'vendor_state', # noqa: E501 'status': 'status', # noqa: E501 'total': 'total', # noqa: E501 'regions': 'regions', # noqa: E501 + 'invoice_id': 'invoice_id', # noqa: E501 'line_items': 'line_items', # noqa: E501 } read_only_vars = { 'end_time', # noqa: E501 'start_time', # noqa: E501 - 'invoice_id', # noqa: E501 'customer_id', # noqa: E501 'vendor_state', # noqa: E501 + 'invoice_id', # noqa: E501 } @classmethod @@ -167,12 +171,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) end_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 start_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 - invoice_id (str): [optional] # noqa: E501 customer_id (str): [optional] # noqa: E501 vendor_state (str): The current state of our third-party billing vendor. One of `up` or `down`.. [optional] # noqa: E501 status (BillingStatus): [optional] # noqa: E501 total (BillingTotal): [optional] # noqa: E501 - regions ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + regions ({str: (BillingRegions,)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + invoice_id (str): [optional] # noqa: E501 line_items ([BillingEstimateLinesLineItems]): [optional] # noqa: E501 """ @@ -275,12 +279,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) end_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 start_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 - invoice_id (str): [optional] # noqa: E501 customer_id (str): [optional] # noqa: E501 vendor_state (str): The current state of our third-party billing vendor. One of `up` or `down`.. [optional] # noqa: E501 status (BillingStatus): [optional] # noqa: E501 total (BillingTotal): [optional] # noqa: E501 - regions ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + regions ({str: (BillingRegions,)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + invoice_id (str): [optional] # noqa: E501 line_items ([BillingEstimateLinesLineItems]): [optional] # noqa: E501 """ @@ -348,6 +352,7 @@ def _composed_schemas(): ], 'allOf': [ Billing, + BillingEstimateInvoiceId, BillingEstimateLines, ], 'oneOf': [ diff --git a/fastly/model/line_item_data_read_only_invoice_id.py b/fastly/model/billing_invoice_id.py similarity index 93% rename from fastly/model/line_item_data_read_only_invoice_id.py rename to fastly/model/billing_invoice_id.py index 096b7be..1456b28 100644 --- a/fastly/model/line_item_data_read_only_invoice_id.py +++ b/fastly/model/billing_invoice_id.py @@ -30,7 +30,7 @@ -class LineItemDataReadOnlyInvoiceId(ModelNormal): +class BillingInvoiceId(ModelNormal): """NOTE: This class is auto generated. Do not edit the class manually. @@ -58,7 +58,13 @@ class LineItemDataReadOnlyInvoiceId(ModelNormal): validations = { } - additional_properties_type = None + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -73,6 +79,7 @@ def openapi_types(): and the value is attribute type. """ return { + 'invoice_id': (int,), # noqa: E501 } @cached_property @@ -81,9 +88,11 @@ def discriminator(): attribute_map = { + 'invoice_id': 'invoice_id', # noqa: E501 } read_only_vars = { + 'invoice_id', # noqa: E501 } _composed_schemas = {} @@ -91,7 +100,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """LineItemDataReadOnlyInvoiceId - a model defined in OpenAPI + """BillingInvoiceId - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -124,6 +133,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + invoice_id (int): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -172,7 +182,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """LineItemDataReadOnlyInvoiceId - a model defined in OpenAPI + """BillingInvoiceId - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -205,6 +215,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + invoice_id (int): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/fastly/model/billing_regions.py b/fastly/model/billing_regions.py new file mode 100644 index 0000000..8979134 --- /dev/null +++ b/fastly/model/billing_regions.py @@ -0,0 +1,271 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.billing_bandwidth import BillingBandwidth + globals()['BillingBandwidth'] = BillingBandwidth + + +class BillingRegions(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'cost': (float,), # noqa: E501 + 'bandwidth': (BillingBandwidth,), # noqa: E501 + 'percentile': (BillingBandwidth,), # noqa: E501 + 'requests': (BillingBandwidth,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cost': 'cost', # noqa: E501 + 'bandwidth': 'bandwidth', # noqa: E501 + 'percentile': 'percentile', # noqa: E501 + 'requests': 'requests', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BillingRegions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cost (float): [optional] # noqa: E501 + bandwidth (BillingBandwidth): [optional] # noqa: E501 + percentile (BillingBandwidth): [optional] # noqa: E501 + requests (BillingBandwidth): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BillingRegions - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cost (float): [optional] # noqa: E501 + bandwidth (BillingBandwidth): [optional] # noqa: E501 + percentile (BillingBandwidth): [optional] # noqa: E501 + requests (BillingBandwidth): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/billing_response.py b/fastly/model/billing_response.py index d378597..09527e0 100644 --- a/fastly/model/billing_response.py +++ b/fastly/model/billing_response.py @@ -31,11 +31,15 @@ def lazy_import(): from fastly.model.billing import Billing + from fastly.model.billing_invoice_id import BillingInvoiceId + from fastly.model.billing_regions import BillingRegions from fastly.model.billing_response_item_items_data import BillingResponseItemItemsData from fastly.model.billing_response_line_items import BillingResponseLineItems from fastly.model.billing_status import BillingStatus from fastly.model.billing_total import BillingTotal globals()['Billing'] = Billing + globals()['BillingInvoiceId'] = BillingInvoiceId + globals()['BillingRegions'] = BillingRegions globals()['BillingResponseItemItemsData'] = BillingResponseItemItemsData globals()['BillingResponseLineItems'] = BillingResponseLineItems globals()['BillingStatus'] = BillingStatus @@ -95,12 +99,12 @@ def openapi_types(): return { 'end_time': (datetime, none_type,), # noqa: E501 'start_time': (datetime, none_type,), # noqa: E501 - 'invoice_id': (str,), # noqa: E501 'customer_id': (str,), # noqa: E501 'vendor_state': (str,), # noqa: E501 'status': (BillingStatus,), # noqa: E501 'total': (BillingTotal,), # noqa: E501 - 'regions': ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)},), # noqa: E501 + 'regions': ({str: (BillingRegions,)},), # noqa: E501 + 'invoice_id': (int,), # noqa: E501 'line_items': (BillingResponseLineItems,), # noqa: E501 } @@ -112,21 +116,21 @@ def discriminator(): attribute_map = { 'end_time': 'end_time', # noqa: E501 'start_time': 'start_time', # noqa: E501 - 'invoice_id': 'invoice_id', # noqa: E501 'customer_id': 'customer_id', # noqa: E501 'vendor_state': 'vendor_state', # noqa: E501 'status': 'status', # noqa: E501 'total': 'total', # noqa: E501 'regions': 'regions', # noqa: E501 + 'invoice_id': 'invoice_id', # noqa: E501 'line_items': 'line_items', # noqa: E501 } read_only_vars = { 'end_time', # noqa: E501 'start_time', # noqa: E501 - 'invoice_id', # noqa: E501 'customer_id', # noqa: E501 'vendor_state', # noqa: E501 + 'invoice_id', # noqa: E501 } @classmethod @@ -167,12 +171,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) end_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 start_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 - invoice_id (str): [optional] # noqa: E501 customer_id (str): [optional] # noqa: E501 vendor_state (str): The current state of our third-party billing vendor. One of `up` or `down`.. [optional] # noqa: E501 status (BillingStatus): [optional] # noqa: E501 total (BillingTotal): [optional] # noqa: E501 - regions ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + regions ({str: (BillingRegions,)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + invoice_id (int): [optional] # noqa: E501 line_items (BillingResponseLineItems): [optional] # noqa: E501 """ @@ -275,12 +279,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) end_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 start_time (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 - invoice_id (str): [optional] # noqa: E501 customer_id (str): [optional] # noqa: E501 vendor_state (str): The current state of our third-party billing vendor. One of `up` or `down`.. [optional] # noqa: E501 status (BillingStatus): [optional] # noqa: E501 total (BillingTotal): [optional] # noqa: E501 - regions ({str: ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + regions ({str: (BillingRegions,)}): Breakdown of regional data for products that are region based.. [optional] # noqa: E501 + invoice_id (int): [optional] # noqa: E501 line_items (BillingResponseLineItems): [optional] # noqa: E501 """ @@ -348,6 +352,7 @@ def _composed_schemas(): ], 'allOf': [ Billing, + BillingInvoiceId, BillingResponseItemItemsData, ], 'oneOf': [ diff --git a/fastly/model/billing_response_line_item.py b/fastly/model/billing_response_line_item.py index 68adf02..a3f8ddd 100644 --- a/fastly/model/billing_response_line_item.py +++ b/fastly/model/billing_response_line_item.py @@ -31,10 +31,8 @@ def lazy_import(): from fastly.model.line_item_data import LineItemData - from fastly.model.line_item_data_read_only_invoice_id import LineItemDataReadOnlyInvoiceId from fastly.model.timestamps import Timestamps globals()['LineItemData'] = LineItemData - globals()['LineItemDataReadOnlyInvoiceId'] = LineItemDataReadOnlyInvoiceId globals()['Timestamps'] = Timestamps @@ -93,7 +91,7 @@ def openapi_types(): 'deleted_at': (datetime, none_type,), # noqa: E501 'updated_at': (datetime, none_type,), # noqa: E501 'amount': (float,), # noqa: E501 - 'aria_invoice_id': (LineItemDataReadOnlyInvoiceId,), # noqa: E501 + 'aria_invoice_id': (str,), # noqa: E501 'client_service_id': (str,), # noqa: E501 'credit_coupon_code': (str, none_type,), # noqa: E501 'description': (str,), # noqa: E501 @@ -143,6 +141,7 @@ def discriminator(): 'created_at', # noqa: E501 'deleted_at', # noqa: E501 'updated_at', # noqa: E501 + 'aria_invoice_id', # noqa: E501 } @classmethod @@ -185,7 +184,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 deleted_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 updated_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 amount (float): [optional] # noqa: E501 - aria_invoice_id (LineItemDataReadOnlyInvoiceId): [optional] # noqa: E501 + aria_invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 client_service_id (str): [optional] # noqa: E501 credit_coupon_code (str, none_type): [optional] # noqa: E501 description (str): [optional] # noqa: E501 @@ -304,7 +303,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 deleted_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 updated_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 amount (float): [optional] # noqa: E501 - aria_invoice_id (LineItemDataReadOnlyInvoiceId): [optional] # noqa: E501 + aria_invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 client_service_id (str): [optional] # noqa: E501 credit_coupon_code (str, none_type): [optional] # noqa: E501 description (str): [optional] # noqa: E501 diff --git a/fastly/model/eom_invoice_response.py b/fastly/model/eom_invoice_response.py index 7fff332..d7ebc14 100644 --- a/fastly/model/eom_invoice_response.py +++ b/fastly/model/eom_invoice_response.py @@ -155,7 +155,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) customer_id (str): Customer ID associated with the invoice.. [optional] # noqa: E501 - invoice_id (str): Alphanumeric string identifying the invoice.. [optional] # noqa: E501 + invoice_id (str): Numeric string identifying the invoice.. [optional] # noqa: E501 invoice_posted_on (datetime): Date and time invoice was posted on, in ISO 8601 format.. [optional] # noqa: E501 billing_start_date (datetime): Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 billing_end_date (datetime): Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 @@ -263,7 +263,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) customer_id (str): Customer ID associated with the invoice.. [optional] # noqa: E501 - invoice_id (str): Alphanumeric string identifying the invoice.. [optional] # noqa: E501 + invoice_id (str): Numeric string identifying the invoice.. [optional] # noqa: E501 invoice_posted_on (datetime): Date and time invoice was posted on, in ISO 8601 format.. [optional] # noqa: E501 billing_start_date (datetime): Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 billing_end_date (datetime): Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 diff --git a/fastly/model/invoice.py b/fastly/model/invoice.py index 0297ea6..762a590 100644 --- a/fastly/model/invoice.py +++ b/fastly/model/invoice.py @@ -155,7 +155,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) customer_id (str): Customer ID associated with the invoice.. [optional] # noqa: E501 - invoice_id (str): Alphanumeric string identifying the invoice.. [optional] # noqa: E501 + invoice_id (str): Numeric string identifying the invoice.. [optional] # noqa: E501 invoice_posted_on (datetime): Date and time invoice was posted on, in ISO 8601 format.. [optional] # noqa: E501 billing_start_date (datetime): Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 billing_end_date (datetime): Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 @@ -245,7 +245,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) customer_id (str): Customer ID associated with the invoice.. [optional] # noqa: E501 - invoice_id (str): Alphanumeric string identifying the invoice.. [optional] # noqa: E501 + invoice_id (str): Numeric string identifying the invoice.. [optional] # noqa: E501 invoice_posted_on (datetime): Date and time invoice was posted on, in ISO 8601 format.. [optional] # noqa: E501 billing_start_date (datetime): Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription.. [optional] # noqa: E501 billing_end_date (datetime): Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription.. [optional] # noqa: E501 diff --git a/fastly/model/line_item_data.py b/fastly/model/line_item_data.py index 9c32333..5b91522 100644 --- a/fastly/model/line_item_data.py +++ b/fastly/model/line_item_data.py @@ -29,10 +29,6 @@ from fastly.exceptions import ApiAttributeError -def lazy_import(): - from fastly.model.line_item_data_read_only_invoice_id import LineItemDataReadOnlyInvoiceId - globals()['LineItemDataReadOnlyInvoiceId'] = LineItemDataReadOnlyInvoiceId - class LineItemData(ModelNormal): """NOTE: This class is auto generated. @@ -68,7 +64,6 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - lazy_import() return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -83,10 +78,9 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { 'amount': (float,), # noqa: E501 - 'aria_invoice_id': (LineItemDataReadOnlyInvoiceId,), # noqa: E501 + 'aria_invoice_id': (str,), # noqa: E501 'client_service_id': (str,), # noqa: E501 'credit_coupon_code': (str, none_type,), # noqa: E501 'description': (str,), # noqa: E501 @@ -130,6 +124,7 @@ def discriminator(): } read_only_vars = { + 'aria_invoice_id', # noqa: E501 } _composed_schemas = {} @@ -171,7 +166,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) amount (float): [optional] # noqa: E501 - aria_invoice_id (LineItemDataReadOnlyInvoiceId): [optional] # noqa: E501 + aria_invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 client_service_id (str): [optional] # noqa: E501 credit_coupon_code (str, none_type): [optional] # noqa: E501 description (str): [optional] # noqa: E501 @@ -269,7 +264,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) amount (float): [optional] # noqa: E501 - aria_invoice_id (LineItemDataReadOnlyInvoiceId): [optional] # noqa: E501 + aria_invoice_id (str): An alphanumeric string identifying the invoice.. [optional] # noqa: E501 client_service_id (str): [optional] # noqa: E501 credit_coupon_code (str, none_type): [optional] # noqa: E501 description (str): [optional] # noqa: E501 diff --git a/fastly/models/__init__.py b/fastly/models/__init__.py index f6c0034..6b94ca6 100644 --- a/fastly/models/__init__.py +++ b/fastly/models/__init__.py @@ -40,9 +40,14 @@ from fastly.model.billing_address_response_data import BillingAddressResponseData from fastly.model.billing_address_verification_error_response import BillingAddressVerificationErrorResponse from fastly.model.billing_address_verification_error_response_errors import BillingAddressVerificationErrorResponseErrors +from fastly.model.billing_bandwidth import BillingBandwidth +from fastly.model.billing_bandwidth_tiers import BillingBandwidthTiers +from fastly.model.billing_estimate_invoice_id import BillingEstimateInvoiceId from fastly.model.billing_estimate_lines import BillingEstimateLines from fastly.model.billing_estimate_lines_line_items import BillingEstimateLinesLineItems from fastly.model.billing_estimate_response import BillingEstimateResponse +from fastly.model.billing_invoice_id import BillingInvoiceId +from fastly.model.billing_regions import BillingRegions from fastly.model.billing_response import BillingResponse from fastly.model.billing_response_item_items_data import BillingResponseItemItemsData from fastly.model.billing_response_line_item import BillingResponseLineItem @@ -227,7 +232,6 @@ from fastly.model.legacy_waf_tag import LegacyWafTag from fastly.model.legacy_waf_update_status import LegacyWafUpdateStatus from fastly.model.line_item_data import LineItemData -from fastly.model.line_item_data_read_only_invoice_id import LineItemDataReadOnlyInvoiceId from fastly.model.list_dashboards_response import ListDashboardsResponse from fastly.model.list_eom_invoices_response import ListEomInvoicesResponse from fastly.model.listinvoices import Listinvoices diff --git a/setup.py b/setup.py index 61b5301..848cfe3 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from pathlib import Path NAME = "fastly" -VERSION = "5.6.0" +VERSION = "5.7.0" # To install the library, run the following # # python setup.py install 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"}