diff --git a/activitysmith_openapi/__init__.py b/activitysmith_openapi/__init__.py
index be074a0..c8423a7 100644
--- a/activitysmith_openapi/__init__.py
+++ b/activitysmith_openapi/__init__.py
@@ -41,6 +41,8 @@
from activitysmith_openapi.models.app_icon_badge_count_update_request import AppIconBadgeCountUpdateRequest
from activitysmith_openapi.models.app_icon_badge_count_update_response import AppIconBadgeCountUpdateResponse
from activitysmith_openapi.models.bad_request_error import BadRequestError
+from activitysmith_openapi.models.billing_blocked_error import BillingBlockedError
+from activitysmith_openapi.models.billing_blocked_error_trial_period import BillingBlockedErrorTrialPeriod
from activitysmith_openapi.models.channel_target import ChannelTarget
from activitysmith_openapi.models.content_state_end import ContentStateEnd
from activitysmith_openapi.models.content_state_start import ContentStateStart
diff --git a/activitysmith_openapi/api/app_icon_badges_api.py b/activitysmith_openapi/api/app_icon_badges_api.py
index 812dc28..0053614 100644
--- a/activitysmith_openapi/api/app_icon_badges_api.py
+++ b/activitysmith_openapi/api/app_icon_badges_api.py
@@ -93,6 +93,7 @@ def update_app_icon_badge_count(
_response_types_map: Dict[str, Optional[str]] = {
'200': "AppIconBadgeCountUpdateResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
'422': "UpdateAppIconBadgeCount422Response",
'429': "RateLimitError",
@@ -165,6 +166,7 @@ def update_app_icon_badge_count_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "AppIconBadgeCountUpdateResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
'422': "UpdateAppIconBadgeCount422Response",
'429': "RateLimitError",
@@ -237,6 +239,7 @@ def update_app_icon_badge_count_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'200': "AppIconBadgeCountUpdateResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
'422': "UpdateAppIconBadgeCount422Response",
'429': "RateLimitError",
diff --git a/activitysmith_openapi/api/live_activities_api.py b/activitysmith_openapi/api/live_activities_api.py
index 05991eb..db54610 100644
--- a/activitysmith_openapi/api/live_activities_api.py
+++ b/activitysmith_openapi/api/live_activities_api.py
@@ -682,8 +682,9 @@ def reconcile_live_activity_stream(
_response_types_map: Dict[str, Optional[str]] = {
'200': "LiveActivityStreamPutResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
@@ -757,8 +758,9 @@ def reconcile_live_activity_stream_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "LiveActivityStreamPutResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
@@ -832,8 +834,9 @@ def reconcile_live_activity_stream_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'200': "LiveActivityStreamPutResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
@@ -977,8 +980,9 @@ def start_live_activity(
_response_types_map: Dict[str, Optional[str]] = {
'200': "LiveActivityStartResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
@@ -1048,8 +1052,9 @@ def start_live_activity_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "LiveActivityStartResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
@@ -1119,8 +1124,9 @@ def start_live_activity_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'200': "LiveActivityStartResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
diff --git a/activitysmith_openapi/api/push_notifications_api.py b/activitysmith_openapi/api/push_notifications_api.py
index 63bce4b..499c1cd 100644
--- a/activitysmith_openapi/api/push_notifications_api.py
+++ b/activitysmith_openapi/api/push_notifications_api.py
@@ -93,8 +93,9 @@ def send_push_notification(
_response_types_map: Dict[str, Optional[str]] = {
'200': "PushNotificationResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
@@ -164,8 +165,9 @@ def send_push_notification_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "PushNotificationResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
@@ -235,8 +237,9 @@ def send_push_notification_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'200': "PushNotificationResponse",
'400': "BadRequestError",
+ '402': "BillingBlockedError",
'403': "ForbiddenError",
- '404': "NoRecipientsError",
+ '422': "NoRecipientsError",
'429': "SendPushNotification429Response",
}
response_data = self.api_client.call_api(
diff --git a/activitysmith_openapi/docs/AppIconBadgesApi.md b/activitysmith_openapi/docs/AppIconBadgesApi.md
index 2f63367..0241b41 100644
--- a/activitysmith_openapi/docs/AppIconBadgesApi.md
+++ b/activitysmith_openapi/docs/AppIconBadgesApi.md
@@ -84,6 +84,7 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**200** | App Icon Badge Count updated | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**400** | Bad request | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
+**402** | Billing access required | - |
**403** | Forbidden | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**422** | No matching devices found, or a targeted device needs to reconnect | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**429** | Rate limit exceeded | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
* Retry-After - Seconds to wait before retrying after a request-rate 429. Live Activity capacity errors are separate and require freeing device capacity; they do not provide a timed retry guarantee.
|
diff --git a/activitysmith_openapi/docs/BillingBlockedError.md b/activitysmith_openapi/docs/BillingBlockedError.md
new file mode 100644
index 0000000..43eebc0
--- /dev/null
+++ b/activitysmith_openapi/docs/BillingBlockedError.md
@@ -0,0 +1,32 @@
+# BillingBlockedError
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**error** | **str** | |
+**message** | **str** | |
+**trial_period** | [**BillingBlockedErrorTrialPeriod**](BillingBlockedErrorTrialPeriod.md) | | [optional]
+**upgrade_url** | **str** | |
+
+## Example
+
+```python
+from activitysmith_openapi.models.billing_blocked_error import BillingBlockedError
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of BillingBlockedError from a JSON string
+billing_blocked_error_instance = BillingBlockedError.from_json(json)
+# print the JSON string representation of the object
+print(BillingBlockedError.to_json())
+
+# convert the object into a dict
+billing_blocked_error_dict = billing_blocked_error_instance.to_dict()
+# create an instance of BillingBlockedError from a dict
+billing_blocked_error_from_dict = BillingBlockedError.from_dict(billing_blocked_error_dict)
+```
+[[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/activitysmith_openapi/docs/BillingBlockedErrorTrialPeriod.md b/activitysmith_openapi/docs/BillingBlockedErrorTrialPeriod.md
new file mode 100644
index 0000000..105e046
--- /dev/null
+++ b/activitysmith_openapi/docs/BillingBlockedErrorTrialPeriod.md
@@ -0,0 +1,30 @@
+# BillingBlockedErrorTrialPeriod
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**started_at** | **datetime** | |
+**ends_at** | **datetime** | |
+
+## Example
+
+```python
+from activitysmith_openapi.models.billing_blocked_error_trial_period import BillingBlockedErrorTrialPeriod
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of BillingBlockedErrorTrialPeriod from a JSON string
+billing_blocked_error_trial_period_instance = BillingBlockedErrorTrialPeriod.from_json(json)
+# print the JSON string representation of the object
+print(BillingBlockedErrorTrialPeriod.to_json())
+
+# convert the object into a dict
+billing_blocked_error_trial_period_dict = billing_blocked_error_trial_period_instance.to_dict()
+# create an instance of BillingBlockedErrorTrialPeriod from a dict
+billing_blocked_error_trial_period_from_dict = BillingBlockedErrorTrialPeriod.from_dict(billing_blocked_error_trial_period_dict)
+```
+[[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/activitysmith_openapi/docs/LiveActivitiesApi.md b/activitysmith_openapi/docs/LiveActivitiesApi.md
index 29e401a..bac4b47 100644
--- a/activitysmith_openapi/docs/LiveActivitiesApi.md
+++ b/activitysmith_openapi/docs/LiveActivitiesApi.md
@@ -255,8 +255,9 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**200** | Stream reconciled | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**400** | Bad request (invalid stream_key, payload, action, or channel targeting input) | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
+**402** | Trial expired, trial allowance exhausted, or paid usage cap reached | - |
**403** | Forbidden (API key scope or channel assignment violation) | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
-**404** | No recipients found for effective channel target | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
+**422** | No recipients found for effective channel target | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**429** | Rate limit exceeded | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
* Retry-After - Seconds to wait before retrying after a request-rate 429. Live Activity capacity errors are separate and require freeing device capacity; they do not provide a timed retry guarantee.
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -338,8 +339,9 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**200** | Live Activity started | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**400** | Bad request (invalid payload or channel targeting input) | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
+**402** | Billing access required | - |
**403** | Forbidden (API key scope or channel assignment violation) | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
-**404** | No recipients found for effective channel target | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
+**422** | No recipients found for effective channel target | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**429** | Rate limit exceeded | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
* Retry-After - Seconds to wait before retrying after a request-rate 429. Live Activity capacity errors are separate and require freeing device capacity; they do not provide a timed retry guarantee.
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/activitysmith_openapi/docs/PushNotificationsApi.md b/activitysmith_openapi/docs/PushNotificationsApi.md
index 5dab075..2c24c01 100644
--- a/activitysmith_openapi/docs/PushNotificationsApi.md
+++ b/activitysmith_openapi/docs/PushNotificationsApi.md
@@ -84,8 +84,9 @@ Name | Type | Description | Notes
|-------------|-------------|------------------|
**200** | Push notification sent | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**400** | Bad request (invalid payload or channel targeting input) | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
+**402** | Billing access required | - |
**403** | Forbidden (API key scope or channel assignment violation) | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
-**404** | No recipients found for effective channel target | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
+**422** | No recipients found for effective channel target | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
|
**429** | Rate limit exceeded | * RateLimit - Current request quotas using IETF draft-8 structured fields. Each named policy includes r (remaining requests) and t (seconds until reset). Multiple policies may apply.
* RateLimit-Policy - Each named policy includes q (request quota) and w (window in seconds). Each feature has an independent IP limit of 600 requests per 60 seconds. Independent account limits per 60 seconds are: Push Notifications 60, badges 60, Live Activities 300, and metric updates 300.
* Retry-After - Seconds to wait before retrying after a request-rate 429. Live Activity capacity errors are separate and require freeing device capacity; they do not provide a timed retry guarantee.
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/activitysmith_openapi/models/__init__.py b/activitysmith_openapi/models/__init__.py
index fd0ed6e..f3c3ef6 100644
--- a/activitysmith_openapi/models/__init__.py
+++ b/activitysmith_openapi/models/__init__.py
@@ -21,6 +21,8 @@
from activitysmith_openapi.models.app_icon_badge_count_update_request import AppIconBadgeCountUpdateRequest
from activitysmith_openapi.models.app_icon_badge_count_update_response import AppIconBadgeCountUpdateResponse
from activitysmith_openapi.models.bad_request_error import BadRequestError
+from activitysmith_openapi.models.billing_blocked_error import BillingBlockedError
+from activitysmith_openapi.models.billing_blocked_error_trial_period import BillingBlockedErrorTrialPeriod
from activitysmith_openapi.models.channel_target import ChannelTarget
from activitysmith_openapi.models.content_state_end import ContentStateEnd
from activitysmith_openapi.models.content_state_start import ContentStateStart
diff --git a/activitysmith_openapi/models/billing_blocked_error.py b/activitysmith_openapi/models/billing_blocked_error.py
new file mode 100644
index 0000000..58be5c8
--- /dev/null
+++ b/activitysmith_openapi/models/billing_blocked_error.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ ActivitySmith API
+
+ Send push notifications and Live Activities to your own devices via a single API key.
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from activitysmith_openapi.models.billing_blocked_error_trial_period import BillingBlockedErrorTrialPeriod
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BillingBlockedError(BaseModel):
+ """
+ BillingBlockedError
+ """ # noqa: E501
+ error: StrictStr
+ message: StrictStr
+ trial_period: Optional[BillingBlockedErrorTrialPeriod] = None
+ upgrade_url: StrictStr
+ __properties: ClassVar[List[str]] = ["error", "message", "trial_period", "upgrade_url"]
+
+ @field_validator('error')
+ def error_validate_enum(cls, value):
+ """Validates the enum"""
+ if value not in set(['trial_expired', 'trial_exhausted', 'billing_overage_cap_reached']):
+ raise ValueError("must be one of enum values ('trial_expired', 'trial_exhausted', 'billing_overage_cap_reached')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BillingBlockedError from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of trial_period
+ if self.trial_period:
+ _dict['trial_period'] = self.trial_period.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BillingBlockedError from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "error": obj.get("error"),
+ "message": obj.get("message"),
+ "trial_period": BillingBlockedErrorTrialPeriod.from_dict(obj["trial_period"]) if obj.get("trial_period") is not None else None,
+ "upgrade_url": obj.get("upgrade_url")
+ })
+ return _obj
+
+
diff --git a/activitysmith_openapi/models/billing_blocked_error_trial_period.py b/activitysmith_openapi/models/billing_blocked_error_trial_period.py
new file mode 100644
index 0000000..1b14616
--- /dev/null
+++ b/activitysmith_openapi/models/billing_blocked_error_trial_period.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ ActivitySmith API
+
+ Send push notifications and Live Activities to your own devices via a single API key.
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from pydantic import BaseModel, ConfigDict
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class BillingBlockedErrorTrialPeriod(BaseModel):
+ """
+ BillingBlockedErrorTrialPeriod
+ """ # noqa: E501
+ started_at: datetime
+ ends_at: datetime
+ __properties: ClassVar[List[str]] = ["started_at", "ends_at"]
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of BillingBlockedErrorTrialPeriod from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of BillingBlockedErrorTrialPeriod from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "started_at": obj.get("started_at"),
+ "ends_at": obj.get("ends_at")
+ })
+ return _obj
+
+
diff --git a/activitysmith_openapi/openapi-source.json b/activitysmith_openapi/openapi-source.json
index aeeecd6..a9c39cb 100644
--- a/activitysmith_openapi/openapi-source.json
+++ b/activitysmith_openapi/openapi-source.json
@@ -1,6 +1,6 @@
{
"repository": "ActivitySmithHQ/activitysmith-backend",
- "commit": "6832df646de7de8a6aaf0110960c37074b513c48",
+ "commit": "984cb6b4ab97d9b27f4e784ff71885c7a75f9be7",
"path": "openapi.json",
- "sha256": "9ae85ad6127cfa2d50c33261459f5f9e85e011939d01ac4a9d507fa6ed11aa61"
+ "sha256": "8cfbd533fd1dd1f30365aa1ed4af63fb9df12017573b6aab97f497b48cae92c9"
}
diff --git a/activitysmith_openapi/test/test_billing_blocked_error.py b/activitysmith_openapi/test/test_billing_blocked_error.py
new file mode 100644
index 0000000..952c2a9
--- /dev/null
+++ b/activitysmith_openapi/test/test_billing_blocked_error.py
@@ -0,0 +1,59 @@
+# coding: utf-8
+
+"""
+ ActivitySmith API
+
+ Send push notifications and Live Activities to your own devices via a single API key.
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from activitysmith_openapi.models.billing_blocked_error import BillingBlockedError
+
+class TestBillingBlockedError(unittest.TestCase):
+ """BillingBlockedError unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> BillingBlockedError:
+ """Test BillingBlockedError
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `BillingBlockedError`
+ """
+ model = BillingBlockedError()
+ if include_optional:
+ return BillingBlockedError(
+ error = 'trial_expired',
+ message = '',
+ trial_period = activitysmith_openapi.models.billing_blocked_error_trial_period.BillingBlockedError_trial_period(
+ started_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ ends_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ),
+ upgrade_url = ''
+ )
+ else:
+ return BillingBlockedError(
+ error = 'trial_expired',
+ message = '',
+ upgrade_url = '',
+ )
+ """
+
+ def testBillingBlockedError(self):
+ """Test BillingBlockedError"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/activitysmith_openapi/test/test_billing_blocked_error_trial_period.py b/activitysmith_openapi/test/test_billing_blocked_error_trial_period.py
new file mode 100644
index 0000000..34d9d35
--- /dev/null
+++ b/activitysmith_openapi/test/test_billing_blocked_error_trial_period.py
@@ -0,0 +1,54 @@
+# coding: utf-8
+
+"""
+ ActivitySmith API
+
+ Send push notifications and Live Activities to your own devices via a single API key.
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from activitysmith_openapi.models.billing_blocked_error_trial_period import BillingBlockedErrorTrialPeriod
+
+class TestBillingBlockedErrorTrialPeriod(unittest.TestCase):
+ """BillingBlockedErrorTrialPeriod unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> BillingBlockedErrorTrialPeriod:
+ """Test BillingBlockedErrorTrialPeriod
+ include_optional is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `BillingBlockedErrorTrialPeriod`
+ """
+ model = BillingBlockedErrorTrialPeriod()
+ if include_optional:
+ return BillingBlockedErrorTrialPeriod(
+ started_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ ends_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
+ )
+ else:
+ return BillingBlockedErrorTrialPeriod(
+ started_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ ends_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ )
+ """
+
+ def testBillingBlockedErrorTrialPeriod(self):
+ """Test BillingBlockedErrorTrialPeriod"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()