From 359f15bf95d309ac0b985d1280a014e4f598b506 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Tue, 28 Jul 2026 18:47:09 +0000 Subject: [PATCH] feat: add v5.11.0 package updates --- README.md | 4 +- docs/AuditLogActor.md | 17 + docs/AuditLogContext.md | 16 + docs/AuditLogEvent.md | 21 + docs/AuditLogTarget.md | 16 + docs/DefaultApi.md | 289 +++++++++ docs/GetSegmentSuccessResponse.md | 13 + docs/ListAuditLogsSuccessResponse.md | 14 + docs/SegmentDetails.md | 18 + docs/UpdateSegmentRequest.md | 14 + docs/UpdateSegmentSuccessResponse.md | 13 + onesignal/__init__.py | 4 +- onesignal/api/default_api.py | 549 +++++++++++++++++- onesignal/api_client.py | 6 +- onesignal/configuration.py | 6 +- onesignal/exceptions.py | 2 +- onesignal/model/api_key_token.py | 2 +- .../model/api_key_tokens_list_response.py | 2 +- onesignal/model/app.py | 2 +- onesignal/model/apps.py | 2 +- onesignal/model/audit_log_actor.py | 280 +++++++++ onesignal/model/audit_log_context.py | 276 +++++++++ onesignal/model/audit_log_event.py | 310 ++++++++++ onesignal/model/audit_log_target.py | 276 +++++++++ onesignal/model/basic_notification.py | 2 +- onesignal/model/basic_notification_all_of.py | 2 +- ...cation_all_of_android_background_layout.py | 2 +- onesignal/model/button.py | 2 +- onesignal/model/copy_template_request.py | 2 +- onesignal/model/create_api_key_request.py | 2 +- onesignal/model/create_api_key_response.py | 2 +- .../create_notification_success_response.py | 2 +- .../model/create_segment_conflict_response.py | 2 +- .../model/create_segment_success_response.py | 2 +- onesignal/model/create_template_request.py | 2 +- .../model/create_user_conflict_response.py | 2 +- ...ate_user_conflict_response_errors_inner.py | 2 +- ...ser_conflict_response_errors_items_meta.py | 2 +- onesignal/model/custom_event.py | 2 +- onesignal/model/custom_events_request.py | 2 +- onesignal/model/delivery_data.py | 2 +- .../model/export_events_success_response.py | 2 +- .../export_subscriptions_request_body.py | 2 +- .../export_subscriptions_success_response.py | 2 +- onesignal/model/filter.py | 2 +- onesignal/model/filter_expression.py | 2 +- onesignal/model/generic_error.py | 2 +- .../model/generic_success_bool_response.py | 2 +- .../get_notification_history_request_body.py | 2 +- .../model/get_segment_success_response.py | 274 +++++++++ .../model/get_segments_success_response.py | 2 +- onesignal/model/identity_object.py | 2 +- onesignal/model/include_aliases.py | 2 +- onesignal/model/language_string_map.py | 2 +- .../model/list_audit_logs_success_response.py | 278 +++++++++ onesignal/model/notification.py | 2 +- onesignal/model/notification_all_of.py | 2 +- .../notification_history_success_response.py | 2 +- onesignal/model/notification_slice.py | 2 +- onesignal/model/notification_target.py | 2 +- onesignal/model/notification_with_meta.py | 2 +- .../model/notification_with_meta_all_of.py | 2 +- onesignal/model/operator.py | 2 +- onesignal/model/outcome_data.py | 2 +- onesignal/model/outcomes_data.py | 2 +- onesignal/model/platform_delivery_data.py | 2 +- .../platform_delivery_data_email_all_of.py | 2 +- .../platform_delivery_data_sms_all_of.py | 2 +- onesignal/model/properties_body.py | 2 +- onesignal/model/properties_deltas.py | 2 +- onesignal/model/properties_object.py | 2 +- onesignal/model/purchase.py | 2 +- onesignal/model/rate_limit_error.py | 2 +- onesignal/model/segment.py | 2 +- onesignal/model/segment_data.py | 2 +- onesignal/model/segment_details.py | 295 ++++++++++ .../model/segment_notification_target.py | 2 +- .../model/start_live_activity_request.py | 2 +- .../start_live_activity_success_response.py | 2 +- onesignal/model/subscription.py | 2 +- onesignal/model/subscription_body.py | 2 +- .../model/subscription_notification_target.py | 2 +- onesignal/model/template_resource.py | 2 +- onesignal/model/templates_list_response.py | 2 +- .../transfer_subscription_request_body.py | 2 +- onesignal/model/update_api_key_request.py | 2 +- .../model/update_live_activity_request.py | 2 +- .../update_live_activity_success_response.py | 2 +- onesignal/model/update_segment_request.py | 290 +++++++++ .../model/update_segment_success_response.py | 268 +++++++++ onesignal/model/update_template_request.py | 2 +- onesignal/model/update_user_request.py | 2 +- onesignal/model/user.py | 2 +- onesignal/model/user_identity_body.py | 2 +- onesignal/model/web_button.py | 2 +- onesignal/model_utils.py | 2 +- onesignal/models/__init__.py | 9 + onesignal/rest.py | 2 +- setup.py | 4 +- test/test_api_key_token.py | 2 +- test/test_api_key_tokens_list_response.py | 2 +- test/test_app.py | 2 +- test/test_apps.py | 2 +- test/test_audit_log_actor.py | 36 ++ test/test_audit_log_context.py | 36 ++ test/test_audit_log_event.py | 42 ++ test/test_audit_log_target.py | 36 ++ test/test_basic_notification.py | 2 +- test/test_basic_notification_all_of.py | 2 +- ...cation_all_of_android_background_layout.py | 2 +- test/test_button.py | 2 +- test/test_copy_template_request.py | 2 +- test/test_create_api_key_request.py | 2 +- test/test_create_api_key_response.py | 2 +- ...st_create_notification_success_response.py | 2 +- test/test_create_segment_conflict_response.py | 2 +- test/test_create_segment_success_response.py | 2 +- test/test_create_template_request.py | 2 +- test/test_create_user_conflict_response.py | 2 +- ...ate_user_conflict_response_errors_inner.py | 2 +- ...ser_conflict_response_errors_items_meta.py | 2 +- test/test_custom_event.py | 2 +- test/test_custom_events_request.py | 2 +- test/test_default_api.py | 23 +- test/test_delivery_data.py | 2 +- test/test_export_events_success_response.py | 2 +- .../test_export_subscriptions_request_body.py | 2 +- ...t_export_subscriptions_success_response.py | 2 +- test/test_filter.py | 2 +- test/test_filter_expression.py | 2 +- test/test_generic_error.py | 2 +- test/test_generic_success_bool_response.py | 2 +- ...t_get_notification_history_request_body.py | 2 +- test/test_get_segment_success_response.py | 38 ++ test/test_get_segments_success_response.py | 2 +- test/test_identity_object.py | 2 +- test/test_include_aliases.py | 2 +- test/test_language_string_map.py | 2 +- test/test_list_audit_logs_success_response.py | 38 ++ test/test_notification.py | 2 +- test/test_notification_all_of.py | 2 +- ...t_notification_history_success_response.py | 2 +- test/test_notification_slice.py | 2 +- test/test_notification_target.py | 2 +- test/test_notification_with_meta.py | 2 +- test/test_notification_with_meta_all_of.py | 2 +- test/test_operator.py | 2 +- test/test_outcome_data.py | 2 +- test/test_outcomes_data.py | 2 +- test/test_platform_delivery_data.py | 2 +- ...est_platform_delivery_data_email_all_of.py | 2 +- .../test_platform_delivery_data_sms_all_of.py | 2 +- test/test_properties_body.py | 2 +- test/test_properties_deltas.py | 2 +- test/test_properties_object.py | 2 +- test/test_purchase.py | 2 +- test/test_rate_limit_error.py | 2 +- test/test_segment.py | 2 +- test/test_segment_data.py | 2 +- test/test_segment_details.py | 38 ++ test/test_segment_notification_target.py | 2 +- test/test_start_live_activity_request.py | 2 +- ...st_start_live_activity_success_response.py | 2 +- test/test_subscription.py | 2 +- test/test_subscription_body.py | 2 +- test/test_subscription_notification_target.py | 2 +- test/test_template_resource.py | 2 +- test/test_templates_list_response.py | 2 +- ...test_transfer_subscription_request_body.py | 2 +- test/test_update_api_key_request.py | 2 +- test/test_update_live_activity_request.py | 2 +- ...t_update_live_activity_success_response.py | 2 +- test/test_update_segment_request.py | 38 ++ test/test_update_segment_success_response.py | 36 ++ test/test_update_template_request.py | 2 +- test/test_update_user_request.py | 2 +- test/test_user.py | 2 +- test/test_user_identity_body.py | 2 +- test/test_web_button.py | 2 +- 179 files changed, 4050 insertions(+), 157 deletions(-) create mode 100644 docs/AuditLogActor.md create mode 100644 docs/AuditLogContext.md create mode 100644 docs/AuditLogEvent.md create mode 100644 docs/AuditLogTarget.md create mode 100644 docs/GetSegmentSuccessResponse.md create mode 100644 docs/ListAuditLogsSuccessResponse.md create mode 100644 docs/SegmentDetails.md create mode 100644 docs/UpdateSegmentRequest.md create mode 100644 docs/UpdateSegmentSuccessResponse.md create mode 100644 onesignal/model/audit_log_actor.py create mode 100644 onesignal/model/audit_log_context.py create mode 100644 onesignal/model/audit_log_event.py create mode 100644 onesignal/model/audit_log_target.py create mode 100644 onesignal/model/get_segment_success_response.py create mode 100644 onesignal/model/list_audit_logs_success_response.py create mode 100644 onesignal/model/segment_details.py create mode 100644 onesignal/model/update_segment_request.py create mode 100644 onesignal/model/update_segment_success_response.py create mode 100644 test/test_audit_log_actor.py create mode 100644 test/test_audit_log_context.py create mode 100644 test/test_audit_log_event.py create mode 100644 test/test_audit_log_target.py create mode 100644 test/test_get_segment_success_response.py create mode 100644 test/test_list_audit_logs_success_response.py create mode 100644 test/test_segment_details.py create mode 100644 test/test_update_segment_request.py create mode 100644 test/test_update_segment_success_response.py diff --git a/README.md b/README.md index 65920b5..98c3b48 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -- API version: 5.10.0 -- Package version: 5.10.0 +- API version: 5.11.0 +- Package version: 5.11.0 ## Requirements diff --git a/docs/AuditLogActor.md b/docs/AuditLogActor.md new file mode 100644 index 0000000..3d8f26e --- /dev/null +++ b/docs/AuditLogActor.md @@ -0,0 +1,17 @@ +# AuditLogActor + +The user or service that performed the action. Absent if the actor is unknown. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the actor. Absent if unavailable. | [optional] +**id** | **str** | UUID of the actor. | [optional] +**metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Additional actor-specific data. | [optional] +**name** | **str** | Display name of the actor. Absent if unavailable. | [optional] +**type** | **str** | Actor type (e.g. member, api_key, system). | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/AuditLogContext.md b/docs/AuditLogContext.md new file mode 100644 index 0000000..e7047ad --- /dev/null +++ b/docs/AuditLogContext.md @@ -0,0 +1,16 @@ +# AuditLogContext + +Request context at the time of the event. Absent if context was not captured. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | **str** | Country code derived from the request IP. | [optional] +**ip** | **str** | IP address the request originated from. | [optional] +**metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Additional context-specific data. | [optional] +**user_agent** | **str** | User agent of the client that made the request. | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/AuditLogEvent.md b/docs/AuditLogEvent.md new file mode 100644 index 0000000..49d4640 --- /dev/null +++ b/docs/AuditLogEvent.md @@ -0,0 +1,21 @@ +# AuditLogEvent + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | The action that was performed (e.g. notification.sent, segment.created, member.invited). | [optional] +**actor** | [**AuditLogActor**](AuditLogActor.md) | | [optional] +**app_id** | **str** | UUID of the app the event is associated with. Absent for org-level events. | [optional] +**context** | [**AuditLogContext**](AuditLogContext.md) | | [optional] +**id** | **str** | UUID of the audit log event. | [optional] +**metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Additional event-specific data that does not fit into the standard fields. | [optional] +**occurred_at** | **str** | RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z). | [optional] +**organization_id** | **str** | UUID of the organization the event belongs to. | [optional] +**targets** | [**[AuditLogTarget]**](AuditLogTarget.md) | The resources the action was performed on. May be empty for org-level events. | [optional] +**version** | **int** | Schema version of the event payload. | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/AuditLogTarget.md b/docs/AuditLogTarget.md new file mode 100644 index 0000000..929483d --- /dev/null +++ b/docs/AuditLogTarget.md @@ -0,0 +1,16 @@ +# AuditLogTarget + +A resource the action was performed on. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | UUID of the resource. | [optional] +**metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Additional resource-specific data. | [optional] +**name** | **str** | Display name of the resource. Absent if unavailable. | [optional] +**type** | **str** | Resource type (e.g. notification, segment, journey, app). | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 17e0c0d..1723aff 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -32,8 +32,10 @@ Method | HTTP request | Description [**get_notification_history**](DefaultApi.md#get_notification_history) | **POST** /notifications/{notification_id}/history | Notification History [**get_notifications**](DefaultApi.md#get_notifications) | **GET** /notifications | View notifications [**get_outcomes**](DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes +[**get_segment**](DefaultApi.md#get_segment) | **GET** /apps/{app_id}/segments/{segment_id} | View Segment [**get_segments**](DefaultApi.md#get_segments) | **GET** /apps/{app_id}/segments | Get Segments [**get_user**](DefaultApi.md#get_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | +[**list_audit_logs**](DefaultApi.md#list_audit_logs) | **GET** /organizations/{organization_id}/audit_logs | List audit logs [**rotate_api_key**](DefaultApi.md#rotate_api_key) | **POST** /apps/{app_id}/auth/tokens/{token_id}/rotate | Rotate API key [**start_live_activity**](DefaultApi.md#start_live_activity) | **POST** /apps/{app_id}/activities/activity/{activity_type} | Start Live Activity [**transfer_subscription**](DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | @@ -41,6 +43,7 @@ Method | HTTP request | Description [**update_api_key**](DefaultApi.md#update_api_key) | **PATCH** /apps/{app_id}/auth/tokens/{token_id} | Update API key [**update_app**](DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app [**update_live_activity**](DefaultApi.md#update_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push +[**update_segment**](DefaultApi.md#update_segment) | **PATCH** /apps/{app_id}/segments/{segment_id} | Update Segment [**update_subscription**](DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | [**update_subscription_by_token**](DefaultApi.md#update_subscription_by_token) | **PATCH** /apps/{app_id}/subscriptions_by_token/{token_type}/{token} | Update subscription by token [**update_template**](DefaultApi.md#update_template) | **PATCH** /templates/{template_id} | Update template @@ -2609,6 +2612,85 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) +# **get_segment** +> GetSegmentSuccessResponse get_segment(app_id, segment_id) + +View Segment + +Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters. + +### Example + +* Bearer Authentication (rest_api_key): + +```python +import onesignal +from onesignal.api import default_api +from onesignal.models import * +from pprint import pprint + +# See configuration.py for a list of all supported configuration parameters. +# Some of the OneSignal endpoints require ORGANIZATION_API_KEY token for authorization, while others require REST_API_KEY. +# We recommend adding both of them in the configuration page so that you will not need to figure it out yourself. +configuration = onesignal.Configuration( + rest_api_key = "YOUR_REST_API_KEY", # App REST API key required for most endpoints + organization_api_key = "YOUR_ORGANIZATION_API_KEY" # Organization key is only required for creating new apps and other top-level endpoints +) + + +# Enter a context with an instance of the API client +with onesignal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = default_api.DefaultApi(api_client) + app_id = "YOUR_APP_ID" # The OneSignal App ID for your app. Available in Keys & IDs. + segment_id = "d6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e" # The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + include_segment_detail = True # Set to true to include segment metadata and filters in the response. (optional) + + try: + # View Segment + api_response = api_instance.get_segment(app_id, segment_id, include_segment_detail=include_segment_detail) + pprint(api_response) + except onesignal.ApiException as e: + print("Exception when calling DefaultApi->get_segment: %s\n" % e) + print("Status Code: %s" % e.status) + print("Response Body: %s" % e.body) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_id** | **str**| The OneSignal App ID for your app. Available in Keys & IDs. | + **segment_id** | **str**| The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. | + **include_segment_detail** | **bool**| Set to true to include segment metadata and filters in the response. | [optional] + +### Return type + +[**GetSegmentSuccessResponse**](GetSegmentSuccessResponse.md) + +### Authorization + +[rest_api_key](https://github.com/OneSignal/onesignal-python-api#configuration) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**429** | Rate Limit Exceeded | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + # **get_segments** > GetSegmentsSuccessResponse get_segments(app_id) @@ -2765,6 +2847,118 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) +# **list_audit_logs** +> ListAuditLogsSuccessResponse list_audit_logs(organization_id) + +List audit logs + +Retrieve a paginated, time-scoped list of audit log events for an organization. Requires an Enterprise plan with the audit logs entitlement enabled. + +### Example + +* Bearer Authentication (organization_api_key): + +```python +import onesignal +from onesignal.api import default_api +from onesignal.models import * +from pprint import pprint + +# See configuration.py for a list of all supported configuration parameters. +# Some of the OneSignal endpoints require ORGANIZATION_API_KEY token for authorization, while others require REST_API_KEY. +# We recommend adding both of them in the configuration page so that you will not need to figure it out yourself. +configuration = onesignal.Configuration( + rest_api_key = "YOUR_REST_API_KEY", # App REST API key required for most endpoints + organization_api_key = "YOUR_ORGANIZATION_API_KEY" # Organization key is only required for creating new apps and other top-level endpoints +) + + +# Enter a context with an instance of the API client +with onesignal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = default_api.DefaultApi(api_client) + organization_id = "YOUR_ORG_ID" # The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. + start_time = "start_time_example" # Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days. (optional) + end_time = "end_time_example" # End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time. (optional) + cursor = "cursor_example" # Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored. (optional) + limit = 1 # Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server. (optional) + app_ids = [ + "app_ids_example", + ] # Filter events by app UUID. Accepts up to 10 values. Org-level events are always included. (optional) + actions = [ + "actions_example", + ] # Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values. (optional) + actor_ids = [ + "actor_ids_example", + ] # Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values. (optional) + actor_emails = [ + "actor_emails_example", + ] # Filter by actor email address. Accepts up to 10 values. (optional) + target_types = [ + "target_types_example", + ] # Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values. (optional) + target_ids = [ + "target_ids_example", + ] # Filter by the UUID of the resource the action was performed on. Accepts up to 10 values. (optional) + ip_addresses = [ + "ip_addresses_example", + ] # Filter by the IP address the action originated from. Accepts up to 10 values. (optional) + + try: + # List audit logs + api_response = api_instance.list_audit_logs(organization_id, start_time=start_time, end_time=end_time, cursor=cursor, limit=limit, app_ids=app_ids, actions=actions, actor_ids=actor_ids, actor_emails=actor_emails, target_types=target_types, target_ids=target_ids, ip_addresses=ip_addresses) + pprint(api_response) + except onesignal.ApiException as e: + print("Exception when calling DefaultApi->list_audit_logs: %s\n" % e) + print("Status Code: %s" % e.status) + print("Response Body: %s" % e.body) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_id** | **str**| The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. | + **start_time** | **str**| Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days. | [optional] + **end_time** | **str**| End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time. | [optional] + **cursor** | **str**| Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored. | [optional] + **limit** | **int**| Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server. | [optional] + **app_ids** | **[str]**| Filter events by app UUID. Accepts up to 10 values. Org-level events are always included. | [optional] + **actions** | **[str]**| Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values. | [optional] + **actor_ids** | **[str]**| Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values. | [optional] + **actor_emails** | **[str]**| Filter by actor email address. Accepts up to 10 values. | [optional] + **target_types** | **[str]**| Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values. | [optional] + **target_ids** | **[str]**| Filter by the UUID of the resource the action was performed on. Accepts up to 10 values. | [optional] + **ip_addresses** | **[str]**| Filter by the IP address the action originated from. Accepts up to 10 values. | [optional] + +### Return type + +[**ListAuditLogsSuccessResponse**](ListAuditLogsSuccessResponse.md) + +### Authorization + +[organization_api_key](https://github.com/OneSignal/onesignal-python-api#configuration) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**429** | Rate Limit Exceeded | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + # **rotate_api_key** > CreateApiKeyResponse rotate_api_key(app_id, token_id) @@ -3562,6 +3756,101 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) +# **update_segment** +> UpdateSegmentSuccessResponse update_segment(app_id, segment_id) + +Update Segment + +Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones. + +### Example + +* Bearer Authentication (rest_api_key): + +```python +import onesignal +from onesignal.api import default_api +from onesignal.models import * +from pprint import pprint + +# See configuration.py for a list of all supported configuration parameters. +# Some of the OneSignal endpoints require ORGANIZATION_API_KEY token for authorization, while others require REST_API_KEY. +# We recommend adding both of them in the configuration page so that you will not need to figure it out yourself. +configuration = onesignal.Configuration( + rest_api_key = "YOUR_REST_API_KEY", # App REST API key required for most endpoints + organization_api_key = "YOUR_ORGANIZATION_API_KEY" # Organization key is only required for creating new apps and other top-level endpoints +) + + +# Enter a context with an instance of the API client +with onesignal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = default_api.DefaultApi(api_client) + app_id = "YOUR_APP_ID" # The OneSignal App ID for your app. Available in Keys & IDs. + segment_id = "d6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e" # The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + update_segment_request = UpdateSegmentRequest( + name="name_example", + description="description_example", + filters=[ + Filter( + field="tag", + key="level", + value="10", + hours_ago="24", + radius=3.14, + lat=3.14, + long=3.14, + relation=">", + ), + ], + ) + + try: + # Update Segment + api_response = api_instance.update_segment(app_id, segment_id, update_segment_request=update_segment_request) + pprint(api_response) + except onesignal.ApiException as e: + print("Exception when calling DefaultApi->update_segment: %s\n" % e) + print("Status Code: %s" % e.status) + print("Response Body: %s" % e.body) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_id** | **str**| The OneSignal App ID for your app. Available in Keys & IDs. | + **segment_id** | **str**| The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. | + **update_segment_request** | [**UpdateSegmentRequest**](UpdateSegmentRequest.md)| | [optional] + +### Return type + +[**UpdateSegmentSuccessResponse**](UpdateSegmentSuccessResponse.md) + +### Authorization + +[rest_api_key](https://github.com/OneSignal/onesignal-python-api#configuration) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**429** | Rate Limit Exceeded | - | +**0** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + # **update_subscription** > update_subscription(app_id, subscription_id, subscription_body) diff --git a/docs/GetSegmentSuccessResponse.md b/docs/GetSegmentSuccessResponse.md new file mode 100644 index 0000000..cc2547e --- /dev/null +++ b/docs/GetSegmentSuccessResponse.md @@ -0,0 +1,13 @@ +# GetSegmentSuccessResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subscriber_count** | **int** | The number of subscribers matching this segment. | [optional] +**payload** | [**SegmentDetails**](SegmentDetails.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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/ListAuditLogsSuccessResponse.md b/docs/ListAuditLogsSuccessResponse.md new file mode 100644 index 0000000..9fceebb --- /dev/null +++ b/docs/ListAuditLogsSuccessResponse.md @@ -0,0 +1,14 @@ +# ListAuditLogsSuccessResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audit_logs** | [**[AuditLogEvent]**](AuditLogEvent.md) | Array of audit log events, ordered by occurred_at ascending. | [optional] +**has_more** | **bool** | True if additional events exist beyond this page. Use next_cursor to fetch the next page. | [optional] +**next_cursor** | **str** | Opaque cursor to pass as cursor in the next request. Only present when has_more is true. | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/SegmentDetails.md b/docs/SegmentDetails.md new file mode 100644 index 0000000..078368f --- /dev/null +++ b/docs/SegmentDetails.md @@ -0,0 +1,18 @@ +# SegmentDetails + +Segment details. Only included when the include-segment-detail query parameter is set to true. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier for the segment (UUID v4). | [optional] +**name** | **str** | The segment name. | [optional] +**description** | **str, none_type** | Human-readable description for the segment. `null` when unset. Maximum 255 characters. | [optional] +**created_at** | **int** | Unix timestamp when the segment was created. | [optional] +**source** | **str** | The source of the segment. | [optional] +**filters** | [**[FilterExpression]**](FilterExpression.md) | Array of filter and operator objects defining the segment criteria. Uses the same format as the Create Segment API, so filters can be directly used to recreate or update the segment. | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/UpdateSegmentRequest.md b/docs/UpdateSegmentRequest.md new file mode 100644 index 0000000..c5db80a --- /dev/null +++ b/docs/UpdateSegmentRequest.md @@ -0,0 +1,14 @@ +# UpdateSegmentRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Required. The segment name. Maximum 128 characters. | +**description** | **str** | Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged. | [optional] +**filters** | [**[FilterExpression]**](FilterExpression.md) | Optional. When provided, replaces all existing filters. Filters define the segment based on user properties like tags, activity, or location using flexible AND/OR logic. Limited to 200 total entries, including fields and OR operators. | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/docs/UpdateSegmentSuccessResponse.md b/docs/UpdateSegmentSuccessResponse.md new file mode 100644 index 0000000..c101e78 --- /dev/null +++ b/docs/UpdateSegmentSuccessResponse.md @@ -0,0 +1,13 @@ +# UpdateSegmentSuccessResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | true if the segment was updated successfully, false otherwise. | [optional] +**id** | **str** | UUID of the updated segment. | [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 API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api) + + diff --git a/onesignal/__init__.py b/onesignal/__init__.py index d46992d..4642d2f 100644 --- a/onesignal/__init__.py +++ b/onesignal/__init__.py @@ -5,13 +5,13 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ -__version__ = "5.10.0" +__version__ = "5.11.0" # import ApiClient from onesignal.api_client import ApiClient diff --git a/onesignal/api/default_api.py b/onesignal/api/default_api.py index 1a41164..aab725e 100644 --- a/onesignal/api/default_api.py +++ b/onesignal/api/default_api.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ @@ -40,7 +40,9 @@ from onesignal.model.generic_error import GenericError from onesignal.model.generic_success_bool_response import GenericSuccessBoolResponse from onesignal.model.get_notification_history_request_body import GetNotificationHistoryRequestBody +from onesignal.model.get_segment_success_response import GetSegmentSuccessResponse from onesignal.model.get_segments_success_response import GetSegmentsSuccessResponse +from onesignal.model.list_audit_logs_success_response import ListAuditLogsSuccessResponse from onesignal.model.notification import Notification from onesignal.model.notification_history_success_response import NotificationHistorySuccessResponse from onesignal.model.notification_slice import NotificationSlice @@ -58,6 +60,8 @@ from onesignal.model.update_api_key_request import UpdateApiKeyRequest from onesignal.model.update_live_activity_request import UpdateLiveActivityRequest from onesignal.model.update_live_activity_success_response import UpdateLiveActivitySuccessResponse +from onesignal.model.update_segment_request import UpdateSegmentRequest +from onesignal.model.update_segment_success_response import UpdateSegmentSuccessResponse from onesignal.model.update_template_request import UpdateTemplateRequest from onesignal.model.update_user_request import UpdateUserRequest from onesignal.model.user import User @@ -1746,6 +1750,68 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.get_segment_endpoint = _Endpoint( + settings={ + 'response_type': (GetSegmentSuccessResponse,), + 'auth': [ + 'rest_api_key' + ], + 'endpoint_path': '/apps/{app_id}/segments/{segment_id}', + 'operation_id': 'get_segment', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'app_id', + 'segment_id', + 'include_segment_detail', + ], + 'required': [ + 'app_id', + 'segment_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'app_id': + (str,), + 'segment_id': + (str,), + 'include_segment_detail': + (bool,), + }, + 'attribute_map': { + 'app_id': 'app_id', + 'segment_id': 'segment_id', + 'include_segment_detail': 'include-segment-detail', + }, + 'location_map': { + 'app_id': 'path', + 'segment_id': 'path', + 'include_segment_detail': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.get_segments_endpoint = _Endpoint( settings={ 'response_type': (GetSegmentsSuccessResponse,), @@ -1870,6 +1936,154 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.list_audit_logs_endpoint = _Endpoint( + settings={ + 'response_type': (ListAuditLogsSuccessResponse,), + 'auth': [ + 'organization_api_key' + ], + 'endpoint_path': '/organizations/{organization_id}/audit_logs', + 'operation_id': 'list_audit_logs', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'organization_id', + 'start_time', + 'end_time', + 'cursor', + 'limit', + 'app_ids', + 'actions', + 'actor_ids', + 'actor_emails', + 'target_types', + 'target_ids', + 'ip_addresses', + ], + 'required': [ + 'organization_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'app_ids', + 'actions', + 'actor_ids', + 'actor_emails', + 'target_types', + 'target_ids', + 'ip_addresses', + ] + }, + root_map={ + 'validations': { + ('app_ids',): { + + 'max_items': 10, + }, + ('actions',): { + + 'max_items': 20, + }, + ('actor_ids',): { + + 'max_items': 10, + }, + ('actor_emails',): { + + 'max_items': 10, + }, + ('target_types',): { + + 'max_items': 10, + }, + ('target_ids',): { + + 'max_items': 10, + }, + ('ip_addresses',): { + + 'max_items': 10, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'organization_id': + (str,), + 'start_time': + (str,), + 'end_time': + (str,), + 'cursor': + (str,), + 'limit': + (int,), + 'app_ids': + ([str],), + 'actions': + ([str],), + 'actor_ids': + ([str],), + 'actor_emails': + ([str],), + 'target_types': + ([str],), + 'target_ids': + ([str],), + 'ip_addresses': + ([str],), + }, + 'attribute_map': { + 'organization_id': 'organization_id', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'cursor': 'cursor', + 'limit': 'limit', + 'app_ids': 'app_ids', + 'actions': 'actions', + 'actor_ids': 'actor_ids', + 'actor_emails': 'actor_emails', + 'target_types': 'target_types', + 'target_ids': 'target_ids', + 'ip_addresses': 'ip_addresses', + }, + 'location_map': { + 'organization_id': 'path', + 'start_time': 'query', + 'end_time': 'query', + 'cursor': 'query', + 'limit': 'query', + 'app_ids': 'query', + 'actions': 'query', + 'actor_ids': 'query', + 'actor_emails': 'query', + 'target_types': 'query', + 'target_ids': 'query', + 'ip_addresses': 'query', + }, + 'collection_format_map': { + 'app_ids': 'multi', + 'actions': 'multi', + 'actor_ids': 'multi', + 'actor_emails': 'multi', + 'target_types': 'multi', + 'target_ids': 'multi', + 'ip_addresses': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.rotate_api_key_endpoint = _Endpoint( settings={ 'response_type': (CreateApiKeyResponse,), @@ -2304,6 +2518,69 @@ def __init__(self, api_client=None): }, api_client=api_client ) + self.update_segment_endpoint = _Endpoint( + settings={ + 'response_type': (UpdateSegmentSuccessResponse,), + 'auth': [ + 'rest_api_key' + ], + 'endpoint_path': '/apps/{app_id}/segments/{segment_id}', + 'operation_id': 'update_segment', + 'http_method': 'PATCH', + 'servers': None, + }, + params_map={ + 'all': [ + 'app_id', + 'segment_id', + 'update_segment_request', + ], + 'required': [ + 'app_id', + 'segment_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'app_id': + (str,), + 'segment_id': + (str,), + 'update_segment_request': + (UpdateSegmentRequest,), + }, + 'attribute_map': { + 'app_id': 'app_id', + 'segment_id': 'segment_id', + }, + 'location_map': { + 'app_id': 'path', + 'segment_id': 'path', + 'update_segment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) self.update_subscription_endpoint = _Endpoint( settings={ 'response_type': None, @@ -5203,6 +5480,94 @@ def get_outcomes( outcome_names return self.get_outcomes_endpoint.call_with_http_info(**kwargs) + def get_segment( + self, + app_id, + segment_id, + **kwargs + ): + """View Segment # noqa: E501 + + Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_segment(app_id, segment_id, async_req=True) + >>> result = thread.get() + + Args: + app_id (str): The OneSignal App ID for your app. Available in Keys & IDs. + segment_id (str): The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + + Keyword Args: + include_segment_detail (bool): Set to true to include segment metadata and filters in the response.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + GetSegmentSuccessResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['app_id'] = \ + app_id + kwargs['segment_id'] = \ + segment_id + return self.get_segment_endpoint.call_with_http_info(**kwargs) + def get_segments( self, app_id, @@ -5379,6 +5744,100 @@ def get_user( alias_id return self.get_user_endpoint.call_with_http_info(**kwargs) + def list_audit_logs( + self, + organization_id, + **kwargs + ): + """List audit logs # noqa: E501 + + Retrieve a paginated, time-scoped list of audit log events for an organization. Requires an Enterprise plan with the audit logs entitlement enabled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_audit_logs(organization_id, async_req=True) + >>> result = thread.get() + + Args: + organization_id (str): The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. + + Keyword Args: + start_time (str): Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days.. [optional] + end_time (str): End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time.. [optional] + cursor (str): Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored.. [optional] + limit (int): Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server.. [optional] + app_ids ([str]): Filter events by app UUID. Accepts up to 10 values. Org-level events are always included.. [optional] + actions ([str]): Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values.. [optional] + actor_ids ([str]): Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values.. [optional] + actor_emails ([str]): Filter by actor email address. Accepts up to 10 values.. [optional] + target_types ([str]): Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values.. [optional] + target_ids ([str]): Filter by the UUID of the resource the action was performed on. Accepts up to 10 values.. [optional] + ip_addresses ([str]): Filter by the IP address the action originated from. Accepts up to 10 values.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ListAuditLogsSuccessResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['organization_id'] = \ + organization_id + return self.list_audit_logs_endpoint.call_with_http_info(**kwargs) + def rotate_api_key( self, app_id, @@ -6008,6 +6467,94 @@ def update_live_activity( update_live_activity_request return self.update_live_activity_endpoint.call_with_http_info(**kwargs) + def update_segment( + self, + app_id, + segment_id, + **kwargs + ): + """Update Segment # noqa: E501 + + Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_segment(app_id, segment_id, async_req=True) + >>> result = thread.get() + + Args: + app_id (str): The OneSignal App ID for your app. Available in Keys & IDs. + segment_id (str): The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + + Keyword Args: + update_segment_request (UpdateSegmentRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + UpdateSegmentSuccessResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['app_id'] = \ + app_id + kwargs['segment_id'] = \ + segment_id + return self.update_segment_endpoint.call_with_http_info(**kwargs) + def update_subscription( self, app_id, diff --git a/onesignal/api_client.py b/onesignal/api_client.py index eb91738..0da3b26 100644 --- a/onesignal/api_client.py +++ b/onesignal/api_client.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ @@ -77,7 +77,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 = 'OpenAPI-Generator/5.10.0/python' + self.user_agent = 'OpenAPI-Generator/5.11.0/python' def __enter__(self): return self @@ -142,7 +142,7 @@ def __call_api( # header parameters header_params = header_params or {} header_params.update(self.default_headers) - header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.10.0" + header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.11.0" if self.cookie: header_params['Cookie'] = self.cookie if header_params: diff --git a/onesignal/configuration.py b/onesignal/configuration.py index b01847d..ec57575 100644 --- a/onesignal/configuration.py +++ b/onesignal/configuration.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ @@ -399,8 +399,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 5.10.0\n"\ - "SDK Package Version: 5.10.0".\ + "Version of the API: 5.11.0\n"\ + "SDK Package Version: 5.11.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/onesignal/exceptions.py b/onesignal/exceptions.py index 0ea950a..a0124e5 100644 --- a/onesignal/exceptions.py +++ b/onesignal/exceptions.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/api_key_token.py b/onesignal/model/api_key_token.py index 3490e3f..4ec6e68 100644 --- a/onesignal/model/api_key_token.py +++ b/onesignal/model/api_key_token.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/api_key_tokens_list_response.py b/onesignal/model/api_key_tokens_list_response.py index 232e2db..69b5e57 100644 --- a/onesignal/model/api_key_tokens_list_response.py +++ b/onesignal/model/api_key_tokens_list_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/app.py b/onesignal/model/app.py index 950fda0..9266ae1 100644 --- a/onesignal/model/app.py +++ b/onesignal/model/app.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/apps.py b/onesignal/model/apps.py index a5e89cf..389fce6 100644 --- a/onesignal/model/apps.py +++ b/onesignal/model/apps.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/audit_log_actor.py b/onesignal/model/audit_log_actor.py new file mode 100644 index 0000000..3412a26 --- /dev/null +++ b/onesignal/model/audit_log_actor.py @@ -0,0 +1,280 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + + +class AuditLogActor(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 { + 'email': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'email': 'email', # noqa: E501 + 'id': 'id', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AuditLogActor - 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,) + email (str): Email address of the actor. Absent if unavailable.. [optional] # noqa: E501 + id (str): UUID of the actor.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional actor-specific data.. [optional] # noqa: E501 + name (str): Display name of the actor. Absent if unavailable.. [optional] # noqa: E501 + type (str): Actor type (e.g. member, api_key, system).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """AuditLogActor - 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,) + email (str): Email address of the actor. Absent if unavailable.. [optional] # noqa: E501 + id (str): UUID of the actor.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional actor-specific data.. [optional] # noqa: E501 + name (str): Display name of the actor. Absent if unavailable.. [optional] # noqa: E501 + type (str): Actor type (e.g. member, api_key, system).. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/audit_log_context.py b/onesignal/model/audit_log_context.py new file mode 100644 index 0000000..c7c5e65 --- /dev/null +++ b/onesignal/model/audit_log_context.py @@ -0,0 +1,276 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + + +class AuditLogContext(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 { + 'country': (str,), # noqa: E501 + 'ip': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'user_agent': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'country', # noqa: E501 + 'ip': 'ip', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'user_agent': 'user_agent', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AuditLogContext - 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,) + country (str): Country code derived from the request IP.. [optional] # noqa: E501 + ip (str): IP address the request originated from.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional context-specific data.. [optional] # noqa: E501 + user_agent (str): User agent of the client that made the request.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """AuditLogContext - 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,) + country (str): Country code derived from the request IP.. [optional] # noqa: E501 + ip (str): IP address the request originated from.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional context-specific data.. [optional] # noqa: E501 + user_agent (str): User agent of the client that made the request.. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/audit_log_event.py b/onesignal/model/audit_log_event.py new file mode 100644 index 0000000..0249ada --- /dev/null +++ b/onesignal/model/audit_log_event.py @@ -0,0 +1,310 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + +def lazy_import(): + from onesignal.model.audit_log_actor import AuditLogActor + from onesignal.model.audit_log_context import AuditLogContext + from onesignal.model.audit_log_target import AuditLogTarget + globals()['AuditLogActor'] = AuditLogActor + globals()['AuditLogContext'] = AuditLogContext + globals()['AuditLogTarget'] = AuditLogTarget + + +class AuditLogEvent(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 { + 'action': (str,), # noqa: E501 + 'actor': (AuditLogActor,), # noqa: E501 + 'app_id': (str,), # noqa: E501 + 'context': (AuditLogContext,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'occurred_at': (str,), # noqa: E501 + 'organization_id': (str,), # noqa: E501 + 'targets': ([AuditLogTarget],), # noqa: E501 + 'version': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'action': 'action', # noqa: E501 + 'actor': 'actor', # noqa: E501 + 'app_id': 'app_id', # noqa: E501 + 'context': 'context', # noqa: E501 + 'id': 'id', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'occurred_at': 'occurred_at', # noqa: E501 + 'organization_id': 'organization_id', # noqa: E501 + 'targets': 'targets', # noqa: E501 + 'version': 'version', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AuditLogEvent - 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,) + action (str): The action that was performed (e.g. notification.sent, segment.created, member.invited).. [optional] # noqa: E501 + actor (AuditLogActor): [optional] # noqa: E501 + app_id (str): UUID of the app the event is associated with. Absent for org-level events.. [optional] # noqa: E501 + context (AuditLogContext): [optional] # noqa: E501 + id (str): UUID of the audit log event.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional event-specific data that does not fit into the standard fields.. [optional] # noqa: E501 + occurred_at (str): RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z).. [optional] # noqa: E501 + organization_id (str): UUID of the organization the event belongs to.. [optional] # noqa: E501 + targets ([AuditLogTarget]): The resources the action was performed on. May be empty for org-level events.. [optional] # noqa: E501 + version (int): Schema version of the event payload.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """AuditLogEvent - 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,) + action (str): The action that was performed (e.g. notification.sent, segment.created, member.invited).. [optional] # noqa: E501 + actor (AuditLogActor): [optional] # noqa: E501 + app_id (str): UUID of the app the event is associated with. Absent for org-level events.. [optional] # noqa: E501 + context (AuditLogContext): [optional] # noqa: E501 + id (str): UUID of the audit log event.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional event-specific data that does not fit into the standard fields.. [optional] # noqa: E501 + occurred_at (str): RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z).. [optional] # noqa: E501 + organization_id (str): UUID of the organization the event belongs to.. [optional] # noqa: E501 + targets ([AuditLogTarget]): The resources the action was performed on. May be empty for org-level events.. [optional] # noqa: E501 + version (int): Schema version of the event payload.. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/audit_log_target.py b/onesignal/model/audit_log_target.py new file mode 100644 index 0000000..f39a7c0 --- /dev/null +++ b/onesignal/model/audit_log_target.py @@ -0,0 +1,276 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + + +class AuditLogTarget(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 { + 'id': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AuditLogTarget - 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,) + id (str): UUID of the resource.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional resource-specific data.. [optional] # noqa: E501 + name (str): Display name of the resource. Absent if unavailable.. [optional] # noqa: E501 + type (str): Resource type (e.g. notification, segment, journey, app).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """AuditLogTarget - 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,) + id (str): UUID of the resource.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional resource-specific data.. [optional] # noqa: E501 + name (str): Display name of the resource. Absent if unavailable.. [optional] # noqa: E501 + type (str): Resource type (e.g. notification, segment, journey, app).. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/basic_notification.py b/onesignal/model/basic_notification.py index c3d39f6..21164d3 100644 --- a/onesignal/model/basic_notification.py +++ b/onesignal/model/basic_notification.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/basic_notification_all_of.py b/onesignal/model/basic_notification_all_of.py index d36a4f8..0460088 100644 --- a/onesignal/model/basic_notification_all_of.py +++ b/onesignal/model/basic_notification_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/basic_notification_all_of_android_background_layout.py b/onesignal/model/basic_notification_all_of_android_background_layout.py index 5e72297..4c1bec1 100644 --- a/onesignal/model/basic_notification_all_of_android_background_layout.py +++ b/onesignal/model/basic_notification_all_of_android_background_layout.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/button.py b/onesignal/model/button.py index 93806f9..0fd9192 100644 --- a/onesignal/model/button.py +++ b/onesignal/model/button.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/copy_template_request.py b/onesignal/model/copy_template_request.py index 9015dd4..5d0f643 100644 --- a/onesignal/model/copy_template_request.py +++ b/onesignal/model/copy_template_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_api_key_request.py b/onesignal/model/create_api_key_request.py index 29b0aa8..934c873 100644 --- a/onesignal/model/create_api_key_request.py +++ b/onesignal/model/create_api_key_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_api_key_response.py b/onesignal/model/create_api_key_response.py index 36e7a05..0fba077 100644 --- a/onesignal/model/create_api_key_response.py +++ b/onesignal/model/create_api_key_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_notification_success_response.py b/onesignal/model/create_notification_success_response.py index f4c90ba..287aef6 100644 --- a/onesignal/model/create_notification_success_response.py +++ b/onesignal/model/create_notification_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_segment_conflict_response.py b/onesignal/model/create_segment_conflict_response.py index cedb5b0..7325f13 100644 --- a/onesignal/model/create_segment_conflict_response.py +++ b/onesignal/model/create_segment_conflict_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_segment_success_response.py b/onesignal/model/create_segment_success_response.py index 5e44c20..e256c7d 100644 --- a/onesignal/model/create_segment_success_response.py +++ b/onesignal/model/create_segment_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_template_request.py b/onesignal/model/create_template_request.py index 63aa77c..23f631b 100644 --- a/onesignal/model/create_template_request.py +++ b/onesignal/model/create_template_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_user_conflict_response.py b/onesignal/model/create_user_conflict_response.py index 6d42b0a..94f5f2b 100644 --- a/onesignal/model/create_user_conflict_response.py +++ b/onesignal/model/create_user_conflict_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_user_conflict_response_errors_inner.py b/onesignal/model/create_user_conflict_response_errors_inner.py index 411b453..0b9c8d6 100644 --- a/onesignal/model/create_user_conflict_response_errors_inner.py +++ b/onesignal/model/create_user_conflict_response_errors_inner.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/create_user_conflict_response_errors_items_meta.py b/onesignal/model/create_user_conflict_response_errors_items_meta.py index 26f860c..70e1b71 100644 --- a/onesignal/model/create_user_conflict_response_errors_items_meta.py +++ b/onesignal/model/create_user_conflict_response_errors_items_meta.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/custom_event.py b/onesignal/model/custom_event.py index db6574c..f44e0b2 100644 --- a/onesignal/model/custom_event.py +++ b/onesignal/model/custom_event.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/custom_events_request.py b/onesignal/model/custom_events_request.py index 3520fc6..b207266 100644 --- a/onesignal/model/custom_events_request.py +++ b/onesignal/model/custom_events_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/delivery_data.py b/onesignal/model/delivery_data.py index f827f7d..e50fab4 100644 --- a/onesignal/model/delivery_data.py +++ b/onesignal/model/delivery_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/export_events_success_response.py b/onesignal/model/export_events_success_response.py index 6fd5097..3a276ae 100644 --- a/onesignal/model/export_events_success_response.py +++ b/onesignal/model/export_events_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/export_subscriptions_request_body.py b/onesignal/model/export_subscriptions_request_body.py index 04ed090..bef0ef5 100644 --- a/onesignal/model/export_subscriptions_request_body.py +++ b/onesignal/model/export_subscriptions_request_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/export_subscriptions_success_response.py b/onesignal/model/export_subscriptions_success_response.py index 50fc747..9298165 100644 --- a/onesignal/model/export_subscriptions_success_response.py +++ b/onesignal/model/export_subscriptions_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/filter.py b/onesignal/model/filter.py index 5d58611..e69affb 100644 --- a/onesignal/model/filter.py +++ b/onesignal/model/filter.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/filter_expression.py b/onesignal/model/filter_expression.py index c27f3cf..50ac38b 100644 --- a/onesignal/model/filter_expression.py +++ b/onesignal/model/filter_expression.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/generic_error.py b/onesignal/model/generic_error.py index 8b2883b..0af5c68 100644 --- a/onesignal/model/generic_error.py +++ b/onesignal/model/generic_error.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/generic_success_bool_response.py b/onesignal/model/generic_success_bool_response.py index cc5a0ed..f670fe8 100644 --- a/onesignal/model/generic_success_bool_response.py +++ b/onesignal/model/generic_success_bool_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/get_notification_history_request_body.py b/onesignal/model/get_notification_history_request_body.py index cb4f308..291fa2e 100644 --- a/onesignal/model/get_notification_history_request_body.py +++ b/onesignal/model/get_notification_history_request_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/get_segment_success_response.py b/onesignal/model/get_segment_success_response.py new file mode 100644 index 0000000..51c4519 --- /dev/null +++ b/onesignal/model/get_segment_success_response.py @@ -0,0 +1,274 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + +def lazy_import(): + from onesignal.model.segment_details import SegmentDetails + globals()['SegmentDetails'] = SegmentDetails + + +class GetSegmentSuccessResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 { + 'subscriber_count': (int,), # noqa: E501 + 'payload': (SegmentDetails,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'subscriber_count': 'subscriber_count', # noqa: E501 + 'payload': 'payload', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GetSegmentSuccessResponse - 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,) + subscriber_count (int): The number of subscribers matching this segment.. [optional] # noqa: E501 + payload (SegmentDetails): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """GetSegmentSuccessResponse - 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,) + subscriber_count (int): The number of subscribers matching this segment.. [optional] # noqa: E501 + payload (SegmentDetails): [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/get_segments_success_response.py b/onesignal/model/get_segments_success_response.py index 2e61124..7382dfd 100644 --- a/onesignal/model/get_segments_success_response.py +++ b/onesignal/model/get_segments_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/identity_object.py b/onesignal/model/identity_object.py index 8d14baf..c542824 100644 --- a/onesignal/model/identity_object.py +++ b/onesignal/model/identity_object.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/include_aliases.py b/onesignal/model/include_aliases.py index ee2438f..cce27a7 100644 --- a/onesignal/model/include_aliases.py +++ b/onesignal/model/include_aliases.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/language_string_map.py b/onesignal/model/language_string_map.py index 11c016e..d6a9741 100644 --- a/onesignal/model/language_string_map.py +++ b/onesignal/model/language_string_map.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/list_audit_logs_success_response.py b/onesignal/model/list_audit_logs_success_response.py new file mode 100644 index 0000000..9448d99 --- /dev/null +++ b/onesignal/model/list_audit_logs_success_response.py @@ -0,0 +1,278 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + +def lazy_import(): + from onesignal.model.audit_log_event import AuditLogEvent + globals()['AuditLogEvent'] = AuditLogEvent + + +class ListAuditLogsSuccessResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 { + 'audit_logs': ([AuditLogEvent],), # noqa: E501 + 'has_more': (bool,), # noqa: E501 + 'next_cursor': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'audit_logs': 'audit_logs', # noqa: E501 + 'has_more': 'has_more', # noqa: E501 + 'next_cursor': 'next_cursor', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ListAuditLogsSuccessResponse - 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,) + audit_logs ([AuditLogEvent]): Array of audit log events, ordered by occurred_at ascending.. [optional] # noqa: E501 + has_more (bool): True if additional events exist beyond this page. Use next_cursor to fetch the next page.. [optional] # noqa: E501 + next_cursor (str): Opaque cursor to pass as cursor in the next request. Only present when has_more is true.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """ListAuditLogsSuccessResponse - 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,) + audit_logs ([AuditLogEvent]): Array of audit log events, ordered by occurred_at ascending.. [optional] # noqa: E501 + has_more (bool): True if additional events exist beyond this page. Use next_cursor to fetch the next page.. [optional] # noqa: E501 + next_cursor (str): Opaque cursor to pass as cursor in the next request. Only present when has_more is true.. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/notification.py b/onesignal/model/notification.py index ef6f62c..88472b0 100644 --- a/onesignal/model/notification.py +++ b/onesignal/model/notification.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/notification_all_of.py b/onesignal/model/notification_all_of.py index 1347b4d..b8f6b7a 100644 --- a/onesignal/model/notification_all_of.py +++ b/onesignal/model/notification_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/notification_history_success_response.py b/onesignal/model/notification_history_success_response.py index 8db3b6d..d0e2751 100644 --- a/onesignal/model/notification_history_success_response.py +++ b/onesignal/model/notification_history_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/notification_slice.py b/onesignal/model/notification_slice.py index b4cd854..e8eda16 100644 --- a/onesignal/model/notification_slice.py +++ b/onesignal/model/notification_slice.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/notification_target.py b/onesignal/model/notification_target.py index 3a97ec0..00a520c 100644 --- a/onesignal/model/notification_target.py +++ b/onesignal/model/notification_target.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/notification_with_meta.py b/onesignal/model/notification_with_meta.py index 46c42e0..9cca80b 100644 --- a/onesignal/model/notification_with_meta.py +++ b/onesignal/model/notification_with_meta.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/notification_with_meta_all_of.py b/onesignal/model/notification_with_meta_all_of.py index 753470b..dab4feb 100644 --- a/onesignal/model/notification_with_meta_all_of.py +++ b/onesignal/model/notification_with_meta_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/operator.py b/onesignal/model/operator.py index e72a882..be296d0 100644 --- a/onesignal/model/operator.py +++ b/onesignal/model/operator.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/outcome_data.py b/onesignal/model/outcome_data.py index 9792a6a..eb2682c 100644 --- a/onesignal/model/outcome_data.py +++ b/onesignal/model/outcome_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/outcomes_data.py b/onesignal/model/outcomes_data.py index 2689131..cf35d51 100644 --- a/onesignal/model/outcomes_data.py +++ b/onesignal/model/outcomes_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/platform_delivery_data.py b/onesignal/model/platform_delivery_data.py index 086259b..eeb25d4 100644 --- a/onesignal/model/platform_delivery_data.py +++ b/onesignal/model/platform_delivery_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/platform_delivery_data_email_all_of.py b/onesignal/model/platform_delivery_data_email_all_of.py index 0ceb050..d3c6f5e 100644 --- a/onesignal/model/platform_delivery_data_email_all_of.py +++ b/onesignal/model/platform_delivery_data_email_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/platform_delivery_data_sms_all_of.py b/onesignal/model/platform_delivery_data_sms_all_of.py index 08e30de..f523514 100644 --- a/onesignal/model/platform_delivery_data_sms_all_of.py +++ b/onesignal/model/platform_delivery_data_sms_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/properties_body.py b/onesignal/model/properties_body.py index 9701f6f..5fd6b41 100644 --- a/onesignal/model/properties_body.py +++ b/onesignal/model/properties_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/properties_deltas.py b/onesignal/model/properties_deltas.py index a34fead..f315086 100644 --- a/onesignal/model/properties_deltas.py +++ b/onesignal/model/properties_deltas.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/properties_object.py b/onesignal/model/properties_object.py index 10fc24e..173f54f 100644 --- a/onesignal/model/properties_object.py +++ b/onesignal/model/properties_object.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/purchase.py b/onesignal/model/purchase.py index 121e242..434fd63 100644 --- a/onesignal/model/purchase.py +++ b/onesignal/model/purchase.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/rate_limit_error.py b/onesignal/model/rate_limit_error.py index 9189ceb..735f260 100644 --- a/onesignal/model/rate_limit_error.py +++ b/onesignal/model/rate_limit_error.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/segment.py b/onesignal/model/segment.py index ba9429a..1db40ed 100644 --- a/onesignal/model/segment.py +++ b/onesignal/model/segment.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/segment_data.py b/onesignal/model/segment_data.py index 8d0c960..276065d 100644 --- a/onesignal/model/segment_data.py +++ b/onesignal/model/segment_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/segment_details.py b/onesignal/model/segment_details.py new file mode 100644 index 0000000..bc484e2 --- /dev/null +++ b/onesignal/model/segment_details.py @@ -0,0 +1,295 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + +def lazy_import(): + from onesignal.model.filter_expression import FilterExpression + globals()['FilterExpression'] = FilterExpression + + +class SegmentDetails(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 = { + ('source',): { + 'DEFAULT': "default", + 'CUSTOM': "custom", + 'QUICKSTART': "quickstart", + }, + } + + 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 { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'description': (str, none_type,), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'filters': ([FilterExpression],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'source': 'source', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SegmentDetails - 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,) + id (str): The unique identifier for the segment (UUID v4).. [optional] # noqa: E501 + name (str): The segment name.. [optional] # noqa: E501 + description (str, none_type): Human-readable description for the segment. `null` when unset. Maximum 255 characters.. [optional] # noqa: E501 + created_at (int): Unix timestamp when the segment was created.. [optional] # noqa: E501 + source (str): The source of the segment.. [optional] # noqa: E501 + filters ([FilterExpression]): Array of filter and operator objects defining the segment criteria. Uses the same format as the Create Segment API, so filters can be directly used to recreate or update the segment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """SegmentDetails - 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,) + id (str): The unique identifier for the segment (UUID v4).. [optional] # noqa: E501 + name (str): The segment name.. [optional] # noqa: E501 + description (str, none_type): Human-readable description for the segment. `null` when unset. Maximum 255 characters.. [optional] # noqa: E501 + created_at (int): Unix timestamp when the segment was created.. [optional] # noqa: E501 + source (str): The source of the segment.. [optional] # noqa: E501 + filters ([FilterExpression]): Array of filter and operator objects defining the segment criteria. Uses the same format as the Create Segment API, so filters can be directly used to recreate or update the segment.. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/segment_notification_target.py b/onesignal/model/segment_notification_target.py index 29c96c6..a44e28c 100644 --- a/onesignal/model/segment_notification_target.py +++ b/onesignal/model/segment_notification_target.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/start_live_activity_request.py b/onesignal/model/start_live_activity_request.py index 5fddab4..bb9438e 100644 --- a/onesignal/model/start_live_activity_request.py +++ b/onesignal/model/start_live_activity_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/start_live_activity_success_response.py b/onesignal/model/start_live_activity_success_response.py index 548796a..063e5ab 100644 --- a/onesignal/model/start_live_activity_success_response.py +++ b/onesignal/model/start_live_activity_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/subscription.py b/onesignal/model/subscription.py index c7f4307..eba9d58 100644 --- a/onesignal/model/subscription.py +++ b/onesignal/model/subscription.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/subscription_body.py b/onesignal/model/subscription_body.py index cd7caef..25e108a 100644 --- a/onesignal/model/subscription_body.py +++ b/onesignal/model/subscription_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/subscription_notification_target.py b/onesignal/model/subscription_notification_target.py index db8b7be..13a8d2d 100644 --- a/onesignal/model/subscription_notification_target.py +++ b/onesignal/model/subscription_notification_target.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/template_resource.py b/onesignal/model/template_resource.py index 149f973..0cd902c 100644 --- a/onesignal/model/template_resource.py +++ b/onesignal/model/template_resource.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/templates_list_response.py b/onesignal/model/templates_list_response.py index 5113f38..eaf137c 100644 --- a/onesignal/model/templates_list_response.py +++ b/onesignal/model/templates_list_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/transfer_subscription_request_body.py b/onesignal/model/transfer_subscription_request_body.py index 51b6e86..ccd23b6 100644 --- a/onesignal/model/transfer_subscription_request_body.py +++ b/onesignal/model/transfer_subscription_request_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/update_api_key_request.py b/onesignal/model/update_api_key_request.py index 89a926b..ef6c819 100644 --- a/onesignal/model/update_api_key_request.py +++ b/onesignal/model/update_api_key_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/update_live_activity_request.py b/onesignal/model/update_live_activity_request.py index 0703506..914ad2d 100644 --- a/onesignal/model/update_live_activity_request.py +++ b/onesignal/model/update_live_activity_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/update_live_activity_success_response.py b/onesignal/model/update_live_activity_success_response.py index 0d354af..5a6c22f 100644 --- a/onesignal/model/update_live_activity_success_response.py +++ b/onesignal/model/update_live_activity_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/update_segment_request.py b/onesignal/model/update_segment_request.py new file mode 100644 index 0000000..c08eb78 --- /dev/null +++ b/onesignal/model/update_segment_request.py @@ -0,0 +1,290 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + +def lazy_import(): + from onesignal.model.filter_expression import FilterExpression + globals()['FilterExpression'] = FilterExpression + + +class UpdateSegmentRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 = { + ('name',): { + 'max_length': 128, + }, + ('description',): { + 'max_length': 255, + }, + } + + @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 { + 'name': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'filters': ([FilterExpression],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'description': 'description', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """UpdateSegmentRequest - a model defined in OpenAPI + + Args: + name (str): Required. The segment name. Maximum 128 characters. + + 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,) + description (str): Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged.. [optional] # noqa: E501 + filters ([FilterExpression]): Optional. When provided, replaces all existing filters. Filters define the segment based on user properties like tags, activity, or location using flexible AND/OR logic. Limited to 200 total entries, including fields and OR operators.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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__,) + + self.name = name + 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, name, *args, **kwargs): # noqa: E501 + """UpdateSegmentRequest - a model defined in OpenAPI + + Args: + name (str): Required. The segment name. Maximum 128 characters. + + 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,) + description (str): Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged.. [optional] # noqa: E501 + filters ([FilterExpression]): Optional. When provided, replaces all existing filters. Filters define the segment based on user properties like tags, activity, or location using flexible AND/OR logic. Limited to 200 total entries, including fields and OR operators.. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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__,) + + self.name = name + 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/onesignal/model/update_segment_success_response.py b/onesignal/model/update_segment_success_response.py new file mode 100644 index 0000000..07158a5 --- /dev/null +++ b/onesignal/model/update_segment_success_response.py @@ -0,0 +1,268 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from onesignal.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 onesignal.exceptions import ApiAttributeError + + + +class UpdateSegmentSuccessResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + 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 { + 'success': (bool,), # noqa: E501 + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'success': 'success', # noqa: E501 + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateSegmentSuccessResponse - 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,) + success (bool): true if the segment was updated successfully, false otherwise.. [optional] # noqa: E501 + id (str): UUID of the updated segment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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 + """UpdateSegmentSuccessResponse - 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,) + success (bool): true if the segment was updated successfully, false otherwise.. [optional] # noqa: E501 + id (str): UUID of the updated segment.. [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: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + 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/onesignal/model/update_template_request.py b/onesignal/model/update_template_request.py index 21e2d1a..677aae0 100644 --- a/onesignal/model/update_template_request.py +++ b/onesignal/model/update_template_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/update_user_request.py b/onesignal/model/update_user_request.py index b4c8bf0..7d34eba 100644 --- a/onesignal/model/update_user_request.py +++ b/onesignal/model/update_user_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/user.py b/onesignal/model/user.py index 7a9a5db..72c98d5 100644 --- a/onesignal/model/user.py +++ b/onesignal/model/user.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/user_identity_body.py b/onesignal/model/user_identity_body.py index acc8ce4..d8aca89 100644 --- a/onesignal/model/user_identity_body.py +++ b/onesignal/model/user_identity_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model/web_button.py b/onesignal/model/web_button.py index d335554..3297d23 100644 --- a/onesignal/model/web_button.py +++ b/onesignal/model/web_button.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/model_utils.py b/onesignal/model_utils.py index 2900415..9096f5d 100644 --- a/onesignal/model_utils.py +++ b/onesignal/model_utils.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/onesignal/models/__init__.py b/onesignal/models/__init__.py index 091dcfb..42e0eb4 100644 --- a/onesignal/models/__init__.py +++ b/onesignal/models/__init__.py @@ -13,6 +13,10 @@ from onesignal.model.api_key_tokens_list_response import ApiKeyTokensListResponse from onesignal.model.app import App from onesignal.model.apps import Apps +from onesignal.model.audit_log_actor import AuditLogActor +from onesignal.model.audit_log_context import AuditLogContext +from onesignal.model.audit_log_event import AuditLogEvent +from onesignal.model.audit_log_target import AuditLogTarget from onesignal.model.basic_notification import BasicNotification from onesignal.model.basic_notification_all_of import BasicNotificationAllOf from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout @@ -38,10 +42,12 @@ from onesignal.model.generic_error import GenericError from onesignal.model.generic_success_bool_response import GenericSuccessBoolResponse from onesignal.model.get_notification_history_request_body import GetNotificationHistoryRequestBody +from onesignal.model.get_segment_success_response import GetSegmentSuccessResponse from onesignal.model.get_segments_success_response import GetSegmentsSuccessResponse from onesignal.model.identity_object import IdentityObject from onesignal.model.include_aliases import IncludeAliases from onesignal.model.language_string_map import LanguageStringMap +from onesignal.model.list_audit_logs_success_response import ListAuditLogsSuccessResponse from onesignal.model.notification import Notification from onesignal.model.notification_all_of import NotificationAllOf from onesignal.model.notification_history_success_response import NotificationHistorySuccessResponse @@ -62,6 +68,7 @@ from onesignal.model.rate_limit_error import RateLimitError from onesignal.model.segment import Segment from onesignal.model.segment_data import SegmentData +from onesignal.model.segment_details import SegmentDetails from onesignal.model.segment_notification_target import SegmentNotificationTarget from onesignal.model.start_live_activity_request import StartLiveActivityRequest from onesignal.model.start_live_activity_success_response import StartLiveActivitySuccessResponse @@ -74,6 +81,8 @@ from onesignal.model.update_api_key_request import UpdateApiKeyRequest from onesignal.model.update_live_activity_request import UpdateLiveActivityRequest from onesignal.model.update_live_activity_success_response import UpdateLiveActivitySuccessResponse +from onesignal.model.update_segment_request import UpdateSegmentRequest +from onesignal.model.update_segment_success_response import UpdateSegmentSuccessResponse from onesignal.model.update_template_request import UpdateTemplateRequest from onesignal.model.update_user_request import UpdateUserRequest from onesignal.model.user import User diff --git a/onesignal/rest.py b/onesignal/rest.py index e7cbca8..c87d33a 100644 --- a/onesignal/rest.py +++ b/onesignal/rest.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/setup.py b/setup.py index ea99d9c..1c79461 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ @@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "onesignal_python_api" -VERSION = "5.10.0" +VERSION = "5.11.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_api_key_token.py b/test/test_api_key_token.py index 281a78b..5eeab8e 100644 --- a/test/test_api_key_token.py +++ b/test/test_api_key_token.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_api_key_tokens_list_response.py b/test/test_api_key_tokens_list_response.py index c532fbc..bae2cea 100644 --- a/test/test_api_key_tokens_list_response.py +++ b/test/test_api_key_tokens_list_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_app.py b/test/test_app.py index bbdc3de..6b105ee 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_apps.py b/test/test_apps.py index f070013..a50ffb8 100644 --- a/test/test_apps.py +++ b/test/test_apps.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_audit_log_actor.py b/test/test_audit_log_actor.py new file mode 100644 index 0000000..3a7ea4e --- /dev/null +++ b/test/test_audit_log_actor.py @@ -0,0 +1,36 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.audit_log_actor import AuditLogActor + + +class TestAuditLogActor(unittest.TestCase): + """AuditLogActor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuditLogActor(self): + """Test AuditLogActor""" + # FIXME: construct object with mandatory attributes with example values + # model = AuditLogActor() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_audit_log_context.py b/test/test_audit_log_context.py new file mode 100644 index 0000000..556e6d6 --- /dev/null +++ b/test/test_audit_log_context.py @@ -0,0 +1,36 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.audit_log_context import AuditLogContext + + +class TestAuditLogContext(unittest.TestCase): + """AuditLogContext unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuditLogContext(self): + """Test AuditLogContext""" + # FIXME: construct object with mandatory attributes with example values + # model = AuditLogContext() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_audit_log_event.py b/test/test_audit_log_event.py new file mode 100644 index 0000000..7339d61 --- /dev/null +++ b/test/test_audit_log_event.py @@ -0,0 +1,42 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.audit_log_actor import AuditLogActor +from onesignal.model.audit_log_context import AuditLogContext +from onesignal.model.audit_log_target import AuditLogTarget +globals()['AuditLogActor'] = AuditLogActor +globals()['AuditLogContext'] = AuditLogContext +globals()['AuditLogTarget'] = AuditLogTarget +from onesignal.model.audit_log_event import AuditLogEvent + + +class TestAuditLogEvent(unittest.TestCase): + """AuditLogEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuditLogEvent(self): + """Test AuditLogEvent""" + # FIXME: construct object with mandatory attributes with example values + # model = AuditLogEvent() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_audit_log_target.py b/test/test_audit_log_target.py new file mode 100644 index 0000000..90eab4d --- /dev/null +++ b/test/test_audit_log_target.py @@ -0,0 +1,36 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.audit_log_target import AuditLogTarget + + +class TestAuditLogTarget(unittest.TestCase): + """AuditLogTarget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuditLogTarget(self): + """Test AuditLogTarget""" + # FIXME: construct object with mandatory attributes with example values + # model = AuditLogTarget() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_basic_notification.py b/test/test_basic_notification.py index 3720e33..7adb106 100644 --- a/test/test_basic_notification.py +++ b/test/test_basic_notification.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_basic_notification_all_of.py b/test/test_basic_notification_all_of.py index 4e4ce7f..28fc4cd 100644 --- a/test/test_basic_notification_all_of.py +++ b/test/test_basic_notification_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_basic_notification_all_of_android_background_layout.py b/test/test_basic_notification_all_of_android_background_layout.py index 48f88e0..88d84eb 100644 --- a/test/test_basic_notification_all_of_android_background_layout.py +++ b/test/test_basic_notification_all_of_android_background_layout.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_button.py b/test/test_button.py index 6d0de6d..c50a7b7 100644 --- a/test/test_button.py +++ b/test/test_button.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_copy_template_request.py b/test/test_copy_template_request.py index cc0e645..edd3f26 100644 --- a/test/test_copy_template_request.py +++ b/test/test_copy_template_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_api_key_request.py b/test/test_create_api_key_request.py index d7ed091..f605f1c 100644 --- a/test/test_create_api_key_request.py +++ b/test/test_create_api_key_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_api_key_response.py b/test/test_create_api_key_response.py index 6f28b35..260b576 100644 --- a/test/test_create_api_key_response.py +++ b/test/test_create_api_key_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_notification_success_response.py b/test/test_create_notification_success_response.py index f9b79fc..8137689 100644 --- a/test/test_create_notification_success_response.py +++ b/test/test_create_notification_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_segment_conflict_response.py b/test/test_create_segment_conflict_response.py index 6173576..80a4dc9 100644 --- a/test/test_create_segment_conflict_response.py +++ b/test/test_create_segment_conflict_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_segment_success_response.py b/test/test_create_segment_success_response.py index f764c5c..de344f5 100644 --- a/test/test_create_segment_success_response.py +++ b/test/test_create_segment_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_template_request.py b/test/test_create_template_request.py index f15a452..c381d78 100644 --- a/test/test_create_template_request.py +++ b/test/test_create_template_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_user_conflict_response.py b/test/test_create_user_conflict_response.py index cee320e..09b2b0f 100644 --- a/test/test_create_user_conflict_response.py +++ b/test/test_create_user_conflict_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_user_conflict_response_errors_inner.py b/test/test_create_user_conflict_response_errors_inner.py index 25218ba..5c9c922 100644 --- a/test/test_create_user_conflict_response_errors_inner.py +++ b/test/test_create_user_conflict_response_errors_inner.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_create_user_conflict_response_errors_items_meta.py b/test/test_create_user_conflict_response_errors_items_meta.py index 779f6fd..4e96a8b 100644 --- a/test/test_create_user_conflict_response_errors_items_meta.py +++ b/test/test_create_user_conflict_response_errors_items_meta.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_custom_event.py b/test/test_custom_event.py index a027e34..e4b371c 100644 --- a/test/test_custom_event.py +++ b/test/test_custom_event.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_custom_events_request.py b/test/test_custom_events_request.py index c7d75fe..5a81c3a 100644 --- a/test/test_custom_events_request.py +++ b/test/test_custom_events_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_default_api.py b/test/test_default_api.py index 945404e..48ce692 100644 --- a/test/test_default_api.py +++ b/test/test_default_api.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ @@ -211,6 +211,13 @@ def test_get_outcomes(self): """ pass + def test_get_segment(self): + """Test case for get_segment + + View Segment # noqa: E501 + """ + pass + def test_get_segments(self): """Test case for get_segments @@ -224,6 +231,13 @@ def test_get_user(self): """ pass + def test_list_audit_logs(self): + """Test case for list_audit_logs + + List audit logs # noqa: E501 + """ + pass + def test_rotate_api_key(self): """Test case for rotate_api_key @@ -272,6 +286,13 @@ def test_update_live_activity(self): """ pass + def test_update_segment(self): + """Test case for update_segment + + Update Segment # noqa: E501 + """ + pass + def test_update_subscription(self): """Test case for update_subscription diff --git a/test/test_delivery_data.py b/test/test_delivery_data.py index d01fd92..a500538 100644 --- a/test/test_delivery_data.py +++ b/test/test_delivery_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_export_events_success_response.py b/test/test_export_events_success_response.py index 5f07940..1db8dc2 100644 --- a/test/test_export_events_success_response.py +++ b/test/test_export_events_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_export_subscriptions_request_body.py b/test/test_export_subscriptions_request_body.py index 9e97cb0..a9eaede 100644 --- a/test/test_export_subscriptions_request_body.py +++ b/test/test_export_subscriptions_request_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_export_subscriptions_success_response.py b/test/test_export_subscriptions_success_response.py index 9ba6a38..d63a954 100644 --- a/test/test_export_subscriptions_success_response.py +++ b/test/test_export_subscriptions_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_filter.py b/test/test_filter.py index 4c5c197..738ebf2 100644 --- a/test/test_filter.py +++ b/test/test_filter.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_filter_expression.py b/test/test_filter_expression.py index 3c44587..457c2dc 100644 --- a/test/test_filter_expression.py +++ b/test/test_filter_expression.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_generic_error.py b/test/test_generic_error.py index b54ef56..4a6792e 100644 --- a/test/test_generic_error.py +++ b/test/test_generic_error.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_generic_success_bool_response.py b/test/test_generic_success_bool_response.py index 95ae76c..9a04771 100644 --- a/test/test_generic_success_bool_response.py +++ b/test/test_generic_success_bool_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_get_notification_history_request_body.py b/test/test_get_notification_history_request_body.py index f3ac794..5112784 100644 --- a/test/test_get_notification_history_request_body.py +++ b/test/test_get_notification_history_request_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_get_segment_success_response.py b/test/test_get_segment_success_response.py new file mode 100644 index 0000000..839c3af --- /dev/null +++ b/test/test_get_segment_success_response.py @@ -0,0 +1,38 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.segment_details import SegmentDetails +globals()['SegmentDetails'] = SegmentDetails +from onesignal.model.get_segment_success_response import GetSegmentSuccessResponse + + +class TestGetSegmentSuccessResponse(unittest.TestCase): + """GetSegmentSuccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGetSegmentSuccessResponse(self): + """Test GetSegmentSuccessResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = GetSegmentSuccessResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_segments_success_response.py b/test/test_get_segments_success_response.py index e5649e5..a7ce744 100644 --- a/test/test_get_segments_success_response.py +++ b/test/test_get_segments_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_identity_object.py b/test/test_identity_object.py index af202ac..cda9e3e 100644 --- a/test/test_identity_object.py +++ b/test/test_identity_object.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_include_aliases.py b/test/test_include_aliases.py index 65037bf..95e2197 100644 --- a/test/test_include_aliases.py +++ b/test/test_include_aliases.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_language_string_map.py b/test/test_language_string_map.py index 6224d0f..80b70a6 100644 --- a/test/test_language_string_map.py +++ b/test/test_language_string_map.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_list_audit_logs_success_response.py b/test/test_list_audit_logs_success_response.py new file mode 100644 index 0000000..9780f58 --- /dev/null +++ b/test/test_list_audit_logs_success_response.py @@ -0,0 +1,38 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.audit_log_event import AuditLogEvent +globals()['AuditLogEvent'] = AuditLogEvent +from onesignal.model.list_audit_logs_success_response import ListAuditLogsSuccessResponse + + +class TestListAuditLogsSuccessResponse(unittest.TestCase): + """ListAuditLogsSuccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListAuditLogsSuccessResponse(self): + """Test ListAuditLogsSuccessResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ListAuditLogsSuccessResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification.py b/test/test_notification.py index c4513e3..d464640 100644 --- a/test/test_notification.py +++ b/test/test_notification.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_notification_all_of.py b/test/test_notification_all_of.py index 06bf275..cf46a1a 100644 --- a/test/test_notification_all_of.py +++ b/test/test_notification_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_notification_history_success_response.py b/test/test_notification_history_success_response.py index 73f6196..2082a85 100644 --- a/test/test_notification_history_success_response.py +++ b/test/test_notification_history_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_notification_slice.py b/test/test_notification_slice.py index 4eaf666..aa9bddb 100644 --- a/test/test_notification_slice.py +++ b/test/test_notification_slice.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_notification_target.py b/test/test_notification_target.py index 3e6b411..d395f30 100644 --- a/test/test_notification_target.py +++ b/test/test_notification_target.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_notification_with_meta.py b/test/test_notification_with_meta.py index 6b9f0da..45f007b 100644 --- a/test/test_notification_with_meta.py +++ b/test/test_notification_with_meta.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_notification_with_meta_all_of.py b/test/test_notification_with_meta_all_of.py index 9ce346c..84bc147 100644 --- a/test/test_notification_with_meta_all_of.py +++ b/test/test_notification_with_meta_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_operator.py b/test/test_operator.py index 8ef6214..fe7cbc0 100644 --- a/test/test_operator.py +++ b/test/test_operator.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_outcome_data.py b/test/test_outcome_data.py index 6ec4e8d..482a723 100644 --- a/test/test_outcome_data.py +++ b/test/test_outcome_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_outcomes_data.py b/test/test_outcomes_data.py index 675cef6..85597b1 100644 --- a/test/test_outcomes_data.py +++ b/test/test_outcomes_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_platform_delivery_data.py b/test/test_platform_delivery_data.py index f376e1b..f2a4d9e 100644 --- a/test/test_platform_delivery_data.py +++ b/test/test_platform_delivery_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_platform_delivery_data_email_all_of.py b/test/test_platform_delivery_data_email_all_of.py index 63c4100..3716c84 100644 --- a/test/test_platform_delivery_data_email_all_of.py +++ b/test/test_platform_delivery_data_email_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_platform_delivery_data_sms_all_of.py b/test/test_platform_delivery_data_sms_all_of.py index 1e4c65f..ce13ec5 100644 --- a/test/test_platform_delivery_data_sms_all_of.py +++ b/test/test_platform_delivery_data_sms_all_of.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_properties_body.py b/test/test_properties_body.py index b8fc285..47afabe 100644 --- a/test/test_properties_body.py +++ b/test/test_properties_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_properties_deltas.py b/test/test_properties_deltas.py index 1f36e68..ad455af 100644 --- a/test/test_properties_deltas.py +++ b/test/test_properties_deltas.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_properties_object.py b/test/test_properties_object.py index e69e920..28654a3 100644 --- a/test/test_properties_object.py +++ b/test/test_properties_object.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_purchase.py b/test/test_purchase.py index 789d78c..f3f7010 100644 --- a/test/test_purchase.py +++ b/test/test_purchase.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_rate_limit_error.py b/test/test_rate_limit_error.py index 693b88a..9255d3b 100644 --- a/test/test_rate_limit_error.py +++ b/test/test_rate_limit_error.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_segment.py b/test/test_segment.py index 36c5a58..a167fc9 100644 --- a/test/test_segment.py +++ b/test/test_segment.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_segment_data.py b/test/test_segment_data.py index cd5acc7..5204ec9 100644 --- a/test/test_segment_data.py +++ b/test/test_segment_data.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_segment_details.py b/test/test_segment_details.py new file mode 100644 index 0000000..f2901af --- /dev/null +++ b/test/test_segment_details.py @@ -0,0 +1,38 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.filter_expression import FilterExpression +globals()['FilterExpression'] = FilterExpression +from onesignal.model.segment_details import SegmentDetails + + +class TestSegmentDetails(unittest.TestCase): + """SegmentDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSegmentDetails(self): + """Test SegmentDetails""" + # FIXME: construct object with mandatory attributes with example values + # model = SegmentDetails() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_segment_notification_target.py b/test/test_segment_notification_target.py index 3b69522..8b7dcbe 100644 --- a/test/test_segment_notification_target.py +++ b/test/test_segment_notification_target.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_start_live_activity_request.py b/test/test_start_live_activity_request.py index 2f39408..ca6245c 100644 --- a/test/test_start_live_activity_request.py +++ b/test/test_start_live_activity_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_start_live_activity_success_response.py b/test/test_start_live_activity_success_response.py index e1b31a2..71daefa 100644 --- a/test/test_start_live_activity_success_response.py +++ b/test/test_start_live_activity_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_subscription.py b/test/test_subscription.py index 27aadb7..4488ccf 100644 --- a/test/test_subscription.py +++ b/test/test_subscription.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_subscription_body.py b/test/test_subscription_body.py index 6933727..9a8431e 100644 --- a/test/test_subscription_body.py +++ b/test/test_subscription_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_subscription_notification_target.py b/test/test_subscription_notification_target.py index 9fcf09a..def91f1 100644 --- a/test/test_subscription_notification_target.py +++ b/test/test_subscription_notification_target.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_template_resource.py b/test/test_template_resource.py index bd6e235..596864b 100644 --- a/test/test_template_resource.py +++ b/test/test_template_resource.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_templates_list_response.py b/test/test_templates_list_response.py index e10d412..65e7415 100644 --- a/test/test_templates_list_response.py +++ b/test/test_templates_list_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_transfer_subscription_request_body.py b/test/test_transfer_subscription_request_body.py index e891c2a..1ff25d5 100644 --- a/test/test_transfer_subscription_request_body.py +++ b/test/test_transfer_subscription_request_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_update_api_key_request.py b/test/test_update_api_key_request.py index 2986eaa..8f590b9 100644 --- a/test/test_update_api_key_request.py +++ b/test/test_update_api_key_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_update_live_activity_request.py b/test/test_update_live_activity_request.py index 7bfcff2..0e6823e 100644 --- a/test/test_update_live_activity_request.py +++ b/test/test_update_live_activity_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_update_live_activity_success_response.py b/test/test_update_live_activity_success_response.py index e1bacf4..dbee69c 100644 --- a/test/test_update_live_activity_success_response.py +++ b/test/test_update_live_activity_success_response.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_update_segment_request.py b/test/test_update_segment_request.py new file mode 100644 index 0000000..56dfdc6 --- /dev/null +++ b/test/test_update_segment_request.py @@ -0,0 +1,38 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.filter_expression import FilterExpression +globals()['FilterExpression'] = FilterExpression +from onesignal.model.update_segment_request import UpdateSegmentRequest + + +class TestUpdateSegmentRequest(unittest.TestCase): + """UpdateSegmentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateSegmentRequest(self): + """Test UpdateSegmentRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdateSegmentRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_segment_success_response.py b/test/test_update_segment_success_response.py new file mode 100644 index 0000000..8a4713d --- /dev/null +++ b/test/test_update_segment_success_response.py @@ -0,0 +1,36 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + The version of the OpenAPI document: 5.11.0 + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.update_segment_success_response import UpdateSegmentSuccessResponse + + +class TestUpdateSegmentSuccessResponse(unittest.TestCase): + """UpdateSegmentSuccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateSegmentSuccessResponse(self): + """Test UpdateSegmentSuccessResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdateSegmentSuccessResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_template_request.py b/test/test_update_template_request.py index c47fe84..eb2f54e 100644 --- a/test/test_update_template_request.py +++ b/test/test_update_template_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_update_user_request.py b/test/test_update_user_request.py index dca1730..4deb899 100644 --- a/test/test_update_user_request.py +++ b/test/test_update_user_request.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_user.py b/test/test_user.py index ca829fa..92956d9 100644 --- a/test/test_user.py +++ b/test/test_user.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_user_identity_body.py b/test/test_user_identity_body.py index e5d96d7..c01cf23 100644 --- a/test/test_user_identity_body.py +++ b/test/test_user_identity_body.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """ diff --git a/test/test_web_button.py b/test/test_web_button.py index 6f27608..dbe747d 100644 --- a/test/test_web_button.py +++ b/test/test_web_button.py @@ -3,7 +3,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 - The version of the OpenAPI document: 5.10.0 + The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech """