From e82693f1b7ad6c624cdd91ec4cf8a153e71627ba Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 27 Aug 2026 22:27:09 +0000 Subject: [PATCH] feat: add v5.14.0 package updates --- README.md | 4 +- docs/BasicNotification.md | 4 +- docs/BasicNotificationAllOf.md | 4 +- docs/EmailWarmUp.md | 16 + docs/EmailWarmUpRequest.md | 14 + docs/EmailWarmUpStage.md | 16 + docs/Notification.md | 4 +- docs/NotificationWithMeta.md | 4 +- docs/NotificationWithMetaAllOf.md | 1 + onesignal/__init__.py | 2 +- onesignal/api_client.py | 4 +- onesignal/configuration.py | 4 +- onesignal/model/basic_notification.py | 18 +- onesignal/model/basic_notification_all_of.py | 18 +- onesignal/model/email_warm_up.py | 292 ++++++++++++++++++ onesignal/model/email_warm_up_request.py | 284 +++++++++++++++++ onesignal/model/email_warm_up_stage.py | 289 +++++++++++++++++ onesignal/model/notification.py | 18 +- onesignal/model/notification_with_meta.py | 18 +- .../model/notification_with_meta_all_of.py | 6 + onesignal/models/__init__.py | 3 + setup.py | 2 +- test/test_basic_notification.py | 2 + test/test_basic_notification_all_of.py | 2 + test/test_email_warm_up.py | 37 +++ test/test_email_warm_up_request.py | 37 +++ test/test_email_warm_up_stage.py | 35 +++ test/test_notification.py | 2 + test/test_notification_with_meta.py | 2 + test/test_notification_with_meta_all_of.py | 2 + 30 files changed, 1124 insertions(+), 20 deletions(-) create mode 100644 docs/EmailWarmUp.md create mode 100644 docs/EmailWarmUpRequest.md create mode 100644 docs/EmailWarmUpStage.md create mode 100644 onesignal/model/email_warm_up.py create mode 100644 onesignal/model/email_warm_up_request.py create mode 100644 onesignal/model/email_warm_up_stage.py create mode 100644 test/test_email_warm_up.py create mode 100644 test/test_email_warm_up_request.py create mode 100644 test/test_email_warm_up_stage.py diff --git a/README.md b/README.md index bf3e8bb..316c48c 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.13.0 -- Package version: 5.13.0 +- API version: 5.14.0 +- Package version: 5.14.0 ## Requirements diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index ecb9d1d..f388482 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -103,7 +103,7 @@ Name | Type | Description | Notes **summary_arg_count** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] **ios_relevance_score** | **float, none_type** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] **ios_interruption_level** | **str, none_type** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] -**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] +**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] **email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -113,6 +113,8 @@ Name | Type | Description | Notes **include_unsubscribed** | **bool, none_type** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | **[str], none_type** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **email_sender_domain** | **str, none_type** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] +**kind** | **str, none_type** | Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. | [optional] if omitted the server will use the default value of "warmup" +**email_warm_up** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] **sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 716c410..68e5573 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -89,7 +89,7 @@ Name | Type | Description | Notes **summary_arg_count** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] **ios_relevance_score** | **float, none_type** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] **ios_interruption_level** | **str, none_type** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] -**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] +**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] **email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -99,6 +99,8 @@ Name | Type | Description | Notes **include_unsubscribed** | **bool, none_type** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | **[str], none_type** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **email_sender_domain** | **str, none_type** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] +**kind** | **str, none_type** | Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. | [optional] if omitted the server will use the default value of "warmup" +**email_warm_up** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] **sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] diff --git a/docs/EmailWarmUp.md b/docs/EmailWarmUp.md new file mode 100644 index 0000000..92c7bc3 --- /dev/null +++ b/docs/EmailWarmUp.md @@ -0,0 +1,16 @@ +# EmailWarmUp + +Channel: Email Present only when this notification's `kind` is \"warmup\". The Auto Warm Up campaign's stage schedule, scheduling strategy, and live status. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stages** | [**[EmailWarmUpStage]**](EmailWarmUpStage.md) | The campaign's sending schedule, stage by stage. | [optional] +**strategy** | **str** | How the stage schedule was produced: * `recommended` - OneSignal generated (and may still adjust) the schedule based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages were provided as-is in the create request. | [optional] +**status** | **str** | Current status of the campaign: * `initializing` - The stages have been submitted and the schedule is being set up. * `draft` - The campaign has been created but has not started sending. * `active` - The campaign is currently working through its stages. * `finished` - All stages have completed. * `canceled` - The campaign was canceled before finishing. | [optional] +**is_live** | **bool** | Whether the campaign is currently live (actively sending). | [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/EmailWarmUpRequest.md b/docs/EmailWarmUpRequest.md new file mode 100644 index 0000000..651192e --- /dev/null +++ b/docs/EmailWarmUpRequest.md @@ -0,0 +1,14 @@ +# EmailWarmUpRequest + +Channel: Email Required when `kind` is \"warmup\". The gradual sending schedule for the Auto Warm Up campaign. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stages** | [**[EmailWarmUpStage]**](EmailWarmUpStage.md) | Required. The ordered stages that make up the campaign's sending schedule. | +**strategy** | **str, none_type** | How the stage schedule should be treated: * `recommended` - (Default) OneSignal may adjust the provided stages based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages provided are sent as-is. | [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/EmailWarmUpStage.md b/docs/EmailWarmUpStage.md new file mode 100644 index 0000000..5e24840 --- /dev/null +++ b/docs/EmailWarmUpStage.md @@ -0,0 +1,16 @@ +# EmailWarmUpStage + +Channel: Email One stage of an Auto Warm Up campaign's sending schedule. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start** | **datetime** | ISO 8601 timestamp for the start of this stage. Sending for this stage will not begin before this time. | +**end** | **datetime** | ISO 8601 timestamp for the end of this stage. This stage's quota is expected to be sent by this time. | +**quota** | **int** | Number of emails to send during this stage. | +**acked** | **bool** | Whether this stage has been picked up and acknowledged by the warm-up scheduler. Not accepted on create. This is only present when reading back a campaign. | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to 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/Notification.md b/docs/Notification.md index ceab99f..0b2bfaf 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -103,7 +103,7 @@ Name | Type | Description | Notes **summary_arg_count** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] **ios_relevance_score** | **float, none_type** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] **ios_interruption_level** | **str, none_type** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] -**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] +**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] **email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -113,6 +113,8 @@ Name | Type | Description | Notes **include_unsubscribed** | **bool, none_type** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | **[str], none_type** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **email_sender_domain** | **str, none_type** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] +**kind** | **str, none_type** | Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. | [optional] if omitted the server will use the default value of "warmup" +**email_warm_up** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] **sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 876cab4..c381257 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -103,7 +103,7 @@ Name | Type | Description | Notes **summary_arg_count** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] **ios_relevance_score** | **float, none_type** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] **ios_interruption_level** | **str, none_type** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] -**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] +**email_subject** | **str, none_type** | Channel: Email Required. The subject of the email. | [optional] **email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -113,6 +113,8 @@ Name | Type | Description | Notes **include_unsubscribed** | **bool, none_type** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | **[str], none_type** | BCC recipients that were set on this email notification. | [optional] **email_sender_domain** | **str, none_type** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] +**kind** | **str, none_type** | Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. | [optional] if omitted the server will use the default value of "warmup" +**email_warm_up** | [**EmailWarmUp**](EmailWarmUp.md) | | [optional] **sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] diff --git a/docs/NotificationWithMetaAllOf.md b/docs/NotificationWithMetaAllOf.md index 8fe7a06..3e38de0 100644 --- a/docs/NotificationWithMetaAllOf.md +++ b/docs/NotificationWithMetaAllOf.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **canceled** | **bool** | Indicates whether the notification was canceled before it could be sent. | [optional] **email_bcc** | **[str], none_type** | BCC recipients that were set on this email notification. | [optional] **bcc_sent** | **int, none_type** | Number of BCC copies successfully sent for this notification. | [optional] +**email_warm_up** | [**EmailWarmUp**](EmailWarmUp.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/onesignal/__init__.py b/onesignal/__init__.py index 626658e..1cb42e9 100644 --- a/onesignal/__init__.py +++ b/onesignal/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "5.13.0" +__version__ = "5.14.0" # import ApiClient from onesignal.api_client import ApiClient diff --git a/onesignal/api_client.py b/onesignal/api_client.py index 1d51d49..cbf1b41 100644 --- a/onesignal/api_client.py +++ b/onesignal/api_client.py @@ -76,7 +76,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.13.0/python' + self.user_agent = 'OpenAPI-Generator/5.14.0/python' def __enter__(self): return self @@ -141,7 +141,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.13.0" + header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.14.0" if self.cookie: header_params['Cookie'] = self.cookie if header_params: diff --git a/onesignal/configuration.py b/onesignal/configuration.py index 797b872..b6ae2c0 100644 --- a/onesignal/configuration.py +++ b/onesignal/configuration.py @@ -398,8 +398,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 5.13.0\n"\ - "SDK Package Version: 5.13.0".\ + "Version of the API: 5.14.0\n"\ + "SDK Package Version: 5.14.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/onesignal/model/basic_notification.py b/onesignal/model/basic_notification.py index 322a983..24970d2 100644 --- a/onesignal/model/basic_notification.py +++ b/onesignal/model/basic_notification.py @@ -33,6 +33,7 @@ def lazy_import(): from onesignal.model.basic_notification_all_of import BasicNotificationAllOf from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button + from onesignal.model.email_warm_up_request import EmailWarmUpRequest from onesignal.model.filter_expression import FilterExpression from onesignal.model.include_aliases import IncludeAliases from onesignal.model.language_string_map import LanguageStringMap @@ -41,6 +42,7 @@ def lazy_import(): globals()['BasicNotificationAllOf'] = BasicNotificationAllOf globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button + globals()['EmailWarmUpRequest'] = EmailWarmUpRequest globals()['FilterExpression'] = FilterExpression globals()['IncludeAliases'] = IncludeAliases globals()['LanguageStringMap'] = LanguageStringMap @@ -82,6 +84,10 @@ class BasicNotification(ModelComposed): 'SUM': "sum", 'COUNT': "count", }, + ('kind',): { + 'None': None, + 'WARMUP': "warmup", + }, ('huawei_category',): { 'None': None, 'IM': "IM", @@ -237,6 +243,8 @@ def openapi_types(): 'include_unsubscribed': (bool, none_type,), # noqa: E501 'email_bcc': ([str], none_type,), # noqa: E501 'email_sender_domain': (str, none_type,), # noqa: E501 + 'kind': (str, none_type,), # noqa: E501 + 'email_warm_up': (EmailWarmUpRequest,), # noqa: E501 'sms_from': (str, none_type,), # noqa: E501 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 @@ -363,6 +371,8 @@ def discriminator(): 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 'email_bcc': 'email_bcc', # noqa: E501 'email_sender_domain': 'email_sender_domain', # noqa: E501 + 'kind': 'kind', # noqa: E501 + 'email_warm_up': 'email_warm_up', # noqa: E501 'sms_from': 'sms_from', # noqa: E501 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 @@ -514,7 +524,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -524,6 +534,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUpRequest): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 @@ -735,7 +747,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -745,6 +757,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUpRequest): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 diff --git a/onesignal/model/basic_notification_all_of.py b/onesignal/model/basic_notification_all_of.py index 67a7809..c1f1cd7 100644 --- a/onesignal/model/basic_notification_all_of.py +++ b/onesignal/model/basic_notification_all_of.py @@ -32,11 +32,13 @@ def lazy_import(): from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button + from onesignal.model.email_warm_up_request import EmailWarmUpRequest from onesignal.model.filter_expression import FilterExpression from onesignal.model.language_string_map import LanguageStringMap from onesignal.model.web_button import WebButton globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button + globals()['EmailWarmUpRequest'] = EmailWarmUpRequest globals()['FilterExpression'] = FilterExpression globals()['LanguageStringMap'] = LanguageStringMap globals()['WebButton'] = WebButton @@ -71,6 +73,10 @@ class BasicNotificationAllOf(ModelNormal): 'SUM': "sum", 'COUNT': "count", }, + ('kind',): { + 'None': None, + 'WARMUP': "warmup", + }, ('huawei_category',): { 'None': None, 'IM': "IM", @@ -212,6 +218,8 @@ def openapi_types(): 'include_unsubscribed': (bool, none_type,), # noqa: E501 'email_bcc': ([str], none_type,), # noqa: E501 'email_sender_domain': (str, none_type,), # noqa: E501 + 'kind': (str, none_type,), # noqa: E501 + 'email_warm_up': (EmailWarmUpRequest,), # noqa: E501 'sms_from': (str, none_type,), # noqa: E501 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 @@ -324,6 +332,8 @@ def discriminator(): 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 'email_bcc': 'email_bcc', # noqa: E501 'email_sender_domain': 'email_sender_domain', # noqa: E501 + 'kind': 'kind', # noqa: E501 + 'email_warm_up': 'email_warm_up', # noqa: E501 'sms_from': 'sms_from', # noqa: E501 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 @@ -463,7 +473,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -473,6 +483,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUpRequest): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 @@ -652,7 +664,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -662,6 +674,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUpRequest): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 diff --git a/onesignal/model/email_warm_up.py b/onesignal/model/email_warm_up.py new file mode 100644 index 0000000..a154f71 --- /dev/null +++ b/onesignal/model/email_warm_up.py @@ -0,0 +1,292 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + 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.email_warm_up_stage import EmailWarmUpStage + globals()['EmailWarmUpStage'] = EmailWarmUpStage + + +class EmailWarmUp(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 = { + ('strategy',): { + 'RECOMMENDED': "recommended", + 'CUSTOM': "custom", + }, + ('status',): { + 'INITIALIZING': "initializing", + 'DRAFT': "draft", + 'ACTIVE': "active", + 'FINISHED': "finished", + 'CANCELED': "canceled", + }, + } + + 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 { + 'stages': ([EmailWarmUpStage],), # noqa: E501 + 'strategy': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'is_live': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'stages': 'stages', # noqa: E501 + 'strategy': 'strategy', # noqa: E501 + 'status': 'status', # noqa: E501 + 'is_live': 'is_live', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EmailWarmUp - 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,) + stages ([EmailWarmUpStage]): The campaign's sending schedule, stage by stage.. [optional] # noqa: E501 + strategy (str): How the stage schedule was produced: * `recommended` - OneSignal generated (and may still adjust) the schedule based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages were provided as-is in the create request. . [optional] # noqa: E501 + status (str): Current status of the campaign: * `initializing` - The stages have been submitted and the schedule is being set up. * `draft` - The campaign has been created but has not started sending. * `active` - The campaign is currently working through its stages. * `finished` - All stages have completed. * `canceled` - The campaign was canceled before finishing. . [optional] # noqa: E501 + is_live (bool): Whether the campaign is currently live (actively sending).. [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 + """EmailWarmUp - 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,) + stages ([EmailWarmUpStage]): The campaign's sending schedule, stage by stage.. [optional] # noqa: E501 + strategy (str): How the stage schedule was produced: * `recommended` - OneSignal generated (and may still adjust) the schedule based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages were provided as-is in the create request. . [optional] # noqa: E501 + status (str): Current status of the campaign: * `initializing` - The stages have been submitted and the schedule is being set up. * `draft` - The campaign has been created but has not started sending. * `active` - The campaign is currently working through its stages. * `finished` - All stages have completed. * `canceled` - The campaign was canceled before finishing. . [optional] # noqa: E501 + is_live (bool): Whether the campaign is currently live (actively sending).. [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/email_warm_up_request.py b/onesignal/model/email_warm_up_request.py new file mode 100644 index 0000000..7c24c44 --- /dev/null +++ b/onesignal/model/email_warm_up_request.py @@ -0,0 +1,284 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + 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.email_warm_up_stage import EmailWarmUpStage + globals()['EmailWarmUpStage'] = EmailWarmUpStage + + +class EmailWarmUpRequest(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 = { + ('strategy',): { + 'None': None, + 'RECOMMENDED': "recommended", + 'CUSTOM': "custom", + }, + } + + 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 = True + + @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 { + 'stages': ([EmailWarmUpStage],), # noqa: E501 + 'strategy': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'stages': 'stages', # noqa: E501 + 'strategy': 'strategy', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, stages, *args, **kwargs): # noqa: E501 + """EmailWarmUpRequest - a model defined in OpenAPI + + Args: + stages ([EmailWarmUpStage]): Required. The ordered stages that make up the campaign's sending schedule. + + 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,) + strategy (str, none_type): How the stage schedule should be treated: * `recommended` - (Default) OneSignal may adjust the provided stages based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages provided are sent as-is. . [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.stages = stages + 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, stages, *args, **kwargs): # noqa: E501 + """EmailWarmUpRequest - a model defined in OpenAPI + + Args: + stages ([EmailWarmUpStage]): Required. The ordered stages that make up the campaign's sending schedule. + + 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,) + strategy (str, none_type): How the stage schedule should be treated: * `recommended` - (Default) OneSignal may adjust the provided stages based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages provided are sent as-is. . [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.stages = stages + 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/email_warm_up_stage.py b/onesignal/model/email_warm_up_stage.py new file mode 100644 index 0000000..121d996 --- /dev/null +++ b/onesignal/model/email_warm_up_stage.py @@ -0,0 +1,289 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + 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 EmailWarmUpStage(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 = { + ('quota',): { + 'inclusive_minimum': 0, + }, + } + + @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 { + 'start': (datetime,), # noqa: E501 + 'end': (datetime,), # noqa: E501 + 'quota': (int,), # noqa: E501 + 'acked': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'start': 'start', # noqa: E501 + 'end': 'end', # noqa: E501 + 'quota': 'quota', # noqa: E501 + 'acked': 'acked', # noqa: E501 + } + + read_only_vars = { + 'acked', # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, start, end, quota, *args, **kwargs): # noqa: E501 + """EmailWarmUpStage - a model defined in OpenAPI + + Args: + start (datetime): ISO 8601 timestamp for the start of this stage. Sending for this stage will not begin before this time. + end (datetime): ISO 8601 timestamp for the end of this stage. This stage's quota is expected to be sent by this time. + quota (int): Number of emails to send during this stage. + + 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,) + acked (bool): Whether this stage has been picked up and acknowledged by the warm-up scheduler. Not accepted on create. This is only present when reading back a campaign.. [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.start = start + self.end = end + self.quota = quota + 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, start, end, quota, *args, **kwargs): # noqa: E501 + """EmailWarmUpStage - a model defined in OpenAPI + + Args: + start (datetime): ISO 8601 timestamp for the start of this stage. Sending for this stage will not begin before this time. + end (datetime): ISO 8601 timestamp for the end of this stage. This stage's quota is expected to be sent by this time. + quota (int): Number of emails to send during this stage. + + 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,) + acked (bool): Whether this stage has been picked up and acknowledged by the warm-up scheduler. Not accepted on create. This is only present when reading back a campaign.. [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.start = start + self.end = end + self.quota = quota + 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 eea0ab0..38dfc19 100644 --- a/onesignal/model/notification.py +++ b/onesignal/model/notification.py @@ -33,6 +33,7 @@ def lazy_import(): from onesignal.model.basic_notification import BasicNotification from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button + from onesignal.model.email_warm_up_request import EmailWarmUpRequest from onesignal.model.filter_expression import FilterExpression from onesignal.model.include_aliases import IncludeAliases from onesignal.model.language_string_map import LanguageStringMap @@ -41,6 +42,7 @@ def lazy_import(): globals()['BasicNotification'] = BasicNotification globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button + globals()['EmailWarmUpRequest'] = EmailWarmUpRequest globals()['FilterExpression'] = FilterExpression globals()['IncludeAliases'] = IncludeAliases globals()['LanguageStringMap'] = LanguageStringMap @@ -82,6 +84,10 @@ class Notification(ModelComposed): 'SUM': "sum", 'COUNT': "count", }, + ('kind',): { + 'None': None, + 'WARMUP': "warmup", + }, ('huawei_category',): { 'None': None, 'IM': "IM", @@ -237,6 +243,8 @@ def openapi_types(): 'include_unsubscribed': (bool, none_type,), # noqa: E501 'email_bcc': ([str], none_type,), # noqa: E501 'email_sender_domain': (str, none_type,), # noqa: E501 + 'kind': (str, none_type,), # noqa: E501 + 'email_warm_up': (EmailWarmUpRequest,), # noqa: E501 'sms_from': (str, none_type,), # noqa: E501 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 @@ -364,6 +372,8 @@ def discriminator(): 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 'email_bcc': 'email_bcc', # noqa: E501 'email_sender_domain': 'email_sender_domain', # noqa: E501 + 'kind': 'kind', # noqa: E501 + 'email_warm_up': 'email_warm_up', # noqa: E501 'sms_from': 'sms_from', # noqa: E501 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 @@ -516,7 +526,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -526,6 +536,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUpRequest): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 @@ -738,7 +750,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -748,6 +760,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUpRequest): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 diff --git a/onesignal/model/notification_with_meta.py b/onesignal/model/notification_with_meta.py index 6dfb519..349147a 100644 --- a/onesignal/model/notification_with_meta.py +++ b/onesignal/model/notification_with_meta.py @@ -34,6 +34,7 @@ def lazy_import(): from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button from onesignal.model.delivery_data import DeliveryData + from onesignal.model.email_warm_up import EmailWarmUp from onesignal.model.filter_expression import FilterExpression from onesignal.model.include_aliases import IncludeAliases from onesignal.model.language_string_map import LanguageStringMap @@ -46,6 +47,7 @@ def lazy_import(): globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button globals()['DeliveryData'] = DeliveryData + globals()['EmailWarmUp'] = EmailWarmUp globals()['FilterExpression'] = FilterExpression globals()['IncludeAliases'] = IncludeAliases globals()['LanguageStringMap'] = LanguageStringMap @@ -90,6 +92,10 @@ class NotificationWithMeta(ModelComposed): 'SUM': "sum", 'COUNT': "count", }, + ('kind',): { + 'None': None, + 'WARMUP': "warmup", + }, ('huawei_category',): { 'None': None, 'IM': "IM", @@ -242,6 +248,8 @@ def openapi_types(): 'include_unsubscribed': (bool, none_type,), # noqa: E501 'email_bcc': ([str], none_type,), # noqa: E501 'email_sender_domain': (str, none_type,), # noqa: E501 + 'kind': (str, none_type,), # noqa: E501 + 'email_warm_up': (EmailWarmUp,), # noqa: E501 'sms_from': (str, none_type,), # noqa: E501 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 @@ -381,6 +389,8 @@ def discriminator(): 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 'email_bcc': 'email_bcc', # noqa: E501 'email_sender_domain': 'email_sender_domain', # noqa: E501 + 'kind': 'kind', # noqa: E501 + 'email_warm_up': 'email_warm_up', # noqa: E501 'sms_from': 'sms_from', # noqa: E501 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 @@ -545,7 +555,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -555,6 +565,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): BCC recipients that were set on this email notification.. [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUp): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 @@ -779,7 +791,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 summary_arg_count (int): Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . [optional] # noqa: E501 ios_relevance_score (float, none_type): Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . [optional] # noqa: E501 ios_interruption_level (str, none_type): Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . [optional] # noqa: E501 - email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 + email_subject (str, none_type): Channel: Email Required. The subject of the email. . [optional] # noqa: E501 email_body (str): Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 email_from_name (str, none_type): Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 email_from_address (str, none_type): Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . [optional] # noqa: E501 @@ -789,6 +801,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 include_unsubscribed (bool, none_type): Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. [optional] # noqa: E501 email_bcc ([str], none_type): BCC recipients that were set on this email notification.. [optional] # noqa: E501 email_sender_domain (str, none_type): Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. . [optional] # noqa: E501 + kind (str, none_type): Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. . [optional] if omitted the server will use the default value of "warmup" # noqa: E501 + email_warm_up (EmailWarmUp): [optional] # noqa: E501 sms_from (str, none_type): Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . [optional] # noqa: E501 sms_media_urls ([str], none_type): Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . [optional] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 diff --git a/onesignal/model/notification_with_meta_all_of.py b/onesignal/model/notification_with_meta_all_of.py index 7da7549..2d7d037 100644 --- a/onesignal/model/notification_with_meta_all_of.py +++ b/onesignal/model/notification_with_meta_all_of.py @@ -30,7 +30,9 @@ def lazy_import(): + from onesignal.model.email_warm_up import EmailWarmUp from onesignal.model.platform_delivery_data import PlatformDeliveryData + globals()['EmailWarmUp'] = EmailWarmUp globals()['PlatformDeliveryData'] = PlatformDeliveryData @@ -101,6 +103,7 @@ def openapi_types(): 'canceled': (bool,), # noqa: E501 'email_bcc': ([str], none_type,), # noqa: E501 'bcc_sent': (int, none_type,), # noqa: E501 + 'email_warm_up': (EmailWarmUp,), # noqa: E501 } @cached_property @@ -123,6 +126,7 @@ def discriminator(): 'canceled': 'canceled', # noqa: E501 'email_bcc': 'email_bcc', # noqa: E501 'bcc_sent': 'bcc_sent', # noqa: E501 + 'email_warm_up': 'email_warm_up', # noqa: E501 } read_only_vars = { @@ -180,6 +184,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 canceled (bool): Indicates whether the notification was canceled before it could be sent.. [optional] # noqa: E501 email_bcc ([str], none_type): BCC recipients that were set on this email notification.. [optional] # noqa: E501 bcc_sent (int, none_type): Number of BCC copies successfully sent for this notification.. [optional] # noqa: E501 + email_warm_up (EmailWarmUp): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -279,6 +284,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 canceled (bool): Indicates whether the notification was canceled before it could be sent.. [optional] # noqa: E501 email_bcc ([str], none_type): BCC recipients that were set on this email notification.. [optional] # noqa: E501 bcc_sent (int, none_type): Number of BCC copies successfully sent for this notification.. [optional] # noqa: E501 + email_warm_up (EmailWarmUp): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/onesignal/models/__init__.py b/onesignal/models/__init__.py index 4a54d63..baba9fe 100644 --- a/onesignal/models/__init__.py +++ b/onesignal/models/__init__.py @@ -35,6 +35,9 @@ from onesignal.model.custom_event import CustomEvent from onesignal.model.custom_events_request import CustomEventsRequest from onesignal.model.delivery_data import DeliveryData +from onesignal.model.email_warm_up import EmailWarmUp +from onesignal.model.email_warm_up_request import EmailWarmUpRequest +from onesignal.model.email_warm_up_stage import EmailWarmUpStage from onesignal.model.export_events_success_response import ExportEventsSuccessResponse from onesignal.model.export_subscriptions_request_body import ExportSubscriptionsRequestBody from onesignal.model.export_subscriptions_success_response import ExportSubscriptionsSuccessResponse diff --git a/setup.py b/setup.py index 2114e97..9056774 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "onesignal_python_api" -VERSION = "5.13.0" +VERSION = "5.14.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_basic_notification.py b/test/test_basic_notification.py index 67dec93..86cf6d1 100644 --- a/test/test_basic_notification.py +++ b/test/test_basic_notification.py @@ -15,6 +15,7 @@ from onesignal.model.basic_notification_all_of import BasicNotificationAllOf from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button +from onesignal.model.email_warm_up_request import EmailWarmUpRequest from onesignal.model.filter_expression import FilterExpression from onesignal.model.include_aliases import IncludeAliases from onesignal.model.language_string_map import LanguageStringMap @@ -23,6 +24,7 @@ globals()['BasicNotificationAllOf'] = BasicNotificationAllOf globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button +globals()['EmailWarmUpRequest'] = EmailWarmUpRequest globals()['FilterExpression'] = FilterExpression globals()['IncludeAliases'] = IncludeAliases globals()['LanguageStringMap'] = LanguageStringMap diff --git a/test/test_basic_notification_all_of.py b/test/test_basic_notification_all_of.py index ff035e7..c2b6df9 100644 --- a/test/test_basic_notification_all_of.py +++ b/test/test_basic_notification_all_of.py @@ -14,11 +14,13 @@ import onesignal from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button +from onesignal.model.email_warm_up_request import EmailWarmUpRequest from onesignal.model.filter_expression import FilterExpression from onesignal.model.language_string_map import LanguageStringMap from onesignal.model.web_button import WebButton globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button +globals()['EmailWarmUpRequest'] = EmailWarmUpRequest globals()['FilterExpression'] = FilterExpression globals()['LanguageStringMap'] = LanguageStringMap globals()['WebButton'] = WebButton diff --git a/test/test_email_warm_up.py b/test/test_email_warm_up.py new file mode 100644 index 0000000..652676e --- /dev/null +++ b/test/test_email_warm_up.py @@ -0,0 +1,37 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.email_warm_up_stage import EmailWarmUpStage +globals()['EmailWarmUpStage'] = EmailWarmUpStage +from onesignal.model.email_warm_up import EmailWarmUp + + +class TestEmailWarmUp(unittest.TestCase): + """EmailWarmUp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmailWarmUp(self): + """Test EmailWarmUp""" + # FIXME: construct object with mandatory attributes with example values + # model = EmailWarmUp() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_warm_up_request.py b/test/test_email_warm_up_request.py new file mode 100644 index 0000000..b0ce58c --- /dev/null +++ b/test/test_email_warm_up_request.py @@ -0,0 +1,37 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.email_warm_up_stage import EmailWarmUpStage +globals()['EmailWarmUpStage'] = EmailWarmUpStage +from onesignal.model.email_warm_up_request import EmailWarmUpRequest + + +class TestEmailWarmUpRequest(unittest.TestCase): + """EmailWarmUpRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmailWarmUpRequest(self): + """Test EmailWarmUpRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = EmailWarmUpRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_warm_up_stage.py b/test/test_email_warm_up_stage.py new file mode 100644 index 0000000..a1a503f --- /dev/null +++ b/test/test_email_warm_up_stage.py @@ -0,0 +1,35 @@ +""" + OneSignal + + A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501 + + Contact: devrel@onesignal.com + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import onesignal +from onesignal.model.email_warm_up_stage import EmailWarmUpStage + + +class TestEmailWarmUpStage(unittest.TestCase): + """EmailWarmUpStage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmailWarmUpStage(self): + """Test EmailWarmUpStage""" + # FIXME: construct object with mandatory attributes with example values + # model = EmailWarmUpStage() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification.py b/test/test_notification.py index 8b2c9b5..a7c8cc2 100644 --- a/test/test_notification.py +++ b/test/test_notification.py @@ -15,6 +15,7 @@ from onesignal.model.basic_notification import BasicNotification from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button +from onesignal.model.email_warm_up_request import EmailWarmUpRequest from onesignal.model.filter_expression import FilterExpression from onesignal.model.include_aliases import IncludeAliases from onesignal.model.language_string_map import LanguageStringMap @@ -23,6 +24,7 @@ globals()['BasicNotification'] = BasicNotification globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button +globals()['EmailWarmUpRequest'] = EmailWarmUpRequest globals()['FilterExpression'] = FilterExpression globals()['IncludeAliases'] = IncludeAliases globals()['LanguageStringMap'] = LanguageStringMap diff --git a/test/test_notification_with_meta.py b/test/test_notification_with_meta.py index c0a9b3b..7bbbb40 100644 --- a/test/test_notification_with_meta.py +++ b/test/test_notification_with_meta.py @@ -16,6 +16,7 @@ from onesignal.model.basic_notification_all_of_android_background_layout import BasicNotificationAllOfAndroidBackgroundLayout from onesignal.model.button import Button from onesignal.model.delivery_data import DeliveryData +from onesignal.model.email_warm_up import EmailWarmUp from onesignal.model.filter_expression import FilterExpression from onesignal.model.include_aliases import IncludeAliases from onesignal.model.language_string_map import LanguageStringMap @@ -28,6 +29,7 @@ globals()['BasicNotificationAllOfAndroidBackgroundLayout'] = BasicNotificationAllOfAndroidBackgroundLayout globals()['Button'] = Button globals()['DeliveryData'] = DeliveryData +globals()['EmailWarmUp'] = EmailWarmUp globals()['FilterExpression'] = FilterExpression globals()['IncludeAliases'] = IncludeAliases globals()['LanguageStringMap'] = LanguageStringMap diff --git a/test/test_notification_with_meta_all_of.py b/test/test_notification_with_meta_all_of.py index 0ef9305..465c97f 100644 --- a/test/test_notification_with_meta_all_of.py +++ b/test/test_notification_with_meta_all_of.py @@ -12,7 +12,9 @@ import unittest import onesignal +from onesignal.model.email_warm_up import EmailWarmUp from onesignal.model.platform_delivery_data import PlatformDeliveryData +globals()['EmailWarmUp'] = EmailWarmUp globals()['PlatformDeliveryData'] = PlatformDeliveryData from onesignal.model.notification_with_meta_all_of import NotificationWithMetaAllOf