From 2e60329a2816a70abc7dccbe64f7259d5f358c06 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 19 Mar 2026 00:12:09 +0000 Subject: [PATCH] feat: add v5.3.0-beta1 package updates --- .github/workflows/rubygems_deploy.yml | 2 +- docs/BasicNotification.md | 14 ++- docs/BasicNotificationAllOf.md | 14 ++- docs/Notification.md | 12 +++ docs/NotificationWithMeta.md | 12 +++ lib/onesignal/models/basic_notification.rb | 88 +++++++++++++++++-- .../models/basic_notification_all_of.rb | 88 +++++++++++++++++-- lib/onesignal/models/notification.rb | 80 ++++++++++++++++- .../models/notification_with_meta.rb | 80 ++++++++++++++++- spec/models/basic_notification_all_of_spec.rb | 40 +++++++++ spec/models/basic_notification_spec.rb | 40 +++++++++ spec/models/notification_spec.rb | 40 +++++++++ spec/models/notification_with_meta_spec.rb | 40 +++++++++ 13 files changed, 535 insertions(+), 15 deletions(-) diff --git a/.github/workflows/rubygems_deploy.yml b/.github/workflows/rubygems_deploy.yml index 56c21aa..9a33b9e 100644 --- a/.github/workflows/rubygems_deploy.yml +++ b/.github/workflows/rubygems_deploy.yml @@ -28,7 +28,7 @@ jobs: -p @semantic-release/git \ -p @semantic-release/github \ -p conventional-changelog-conventionalcommits \ - semantic-release + semantic-release --dry-run release: runs-on: ubuntu-latest permissions: diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index f8c6973..0109c8c 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -105,6 +105,7 @@ | **email_body** | **String** | 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 <a> 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** | **String** | 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** | **String** | 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] | +| **email_reply_to_address** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] | | **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] | | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | | **include_unsubscribed** | **Boolean** | 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] | @@ -112,6 +113,11 @@ | **sms_media_urls** | **Array<String>** | 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** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] | | **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] | +| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] | +| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] | +| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] | +| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] | +| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] | ## Example @@ -220,13 +226,19 @@ instance = OneSignal::BasicNotification.new( email_body: null, email_from_name: null, email_from_address: null, + email_reply_to_address: null, email_preheader: null, disable_email_click_tracking: null, include_unsubscribed: null, sms_from: null, sms_media_urls: null, filters: null, - custom_data: null + custom_data: null, + huawei_badge_class: null, + huawei_badge_add_num: null, + huawei_badge_set_num: null, + huawei_category: null, + huawei_bi_tag: null ) ``` diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index eddc225..864a76a 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -92,6 +92,7 @@ | **email_body** | **String** | 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 <a> 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** | **String** | 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** | **String** | 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] | +| **email_reply_to_address** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] | | **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] | | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | | **include_unsubscribed** | **Boolean** | 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] | @@ -99,6 +100,11 @@ | **sms_media_urls** | **Array<String>** | 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** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] | | **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] | +| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] | +| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] | +| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] | +| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] | +| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] | ## Example @@ -194,13 +200,19 @@ instance = OneSignal::BasicNotificationAllOf.new( email_body: null, email_from_name: null, email_from_address: null, + email_reply_to_address: null, email_preheader: null, disable_email_click_tracking: null, include_unsubscribed: null, sms_from: null, sms_media_urls: null, filters: null, - custom_data: null + custom_data: null, + huawei_badge_class: null, + huawei_badge_add_num: null, + huawei_badge_set_num: null, + huawei_category: null, + huawei_bi_tag: null ) ``` diff --git a/docs/Notification.md b/docs/Notification.md index 52156f6..631fe3a 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -105,6 +105,7 @@ | **email_body** | **String** | 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 <a> 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** | **String** | 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** | **String** | 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] | +| **email_reply_to_address** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] | | **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] | | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | | **include_unsubscribed** | **Boolean** | 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] | @@ -112,6 +113,11 @@ | **sms_media_urls** | **Array<String>** | 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** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] | | **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] | +| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] | +| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] | +| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] | +| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] | +| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] | | **send_after** | **Time** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] | ## Example @@ -221,6 +227,7 @@ instance = OneSignal::Notification.new( email_body: null, email_from_name: null, email_from_address: null, + email_reply_to_address: null, email_preheader: null, disable_email_click_tracking: null, include_unsubscribed: null, @@ -228,6 +235,11 @@ instance = OneSignal::Notification.new( sms_media_urls: null, filters: null, custom_data: null, + huawei_badge_class: null, + huawei_badge_add_num: null, + huawei_badge_set_num: null, + huawei_category: null, + huawei_bi_tag: null, send_after: null ) ``` diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 94c24fa..31790f8 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -105,6 +105,7 @@ | **email_body** | **String** | 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 <a> 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** | **String** | 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** | **String** | 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] | +| **email_reply_to_address** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] | | **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] | | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | | **include_unsubscribed** | **Boolean** | 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] | @@ -112,6 +113,11 @@ | **sms_media_urls** | **Array<String>** | 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** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] | | **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] | +| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] | +| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] | +| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] | +| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] | +| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] | | **successful** | **Integer** | Number of notifications that were successfully delivered. | [optional] | | **failed** | **Integer** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] | | **errored** | **Integer** | Number of notifications that could not be delivered due to an error. You can find more information by viewing the notification in the dashboard. | [optional] | @@ -232,6 +238,7 @@ instance = OneSignal::NotificationWithMeta.new( email_body: null, email_from_name: null, email_from_address: null, + email_reply_to_address: null, email_preheader: null, disable_email_click_tracking: null, include_unsubscribed: null, @@ -239,6 +246,11 @@ instance = OneSignal::NotificationWithMeta.new( sms_media_urls: null, filters: null, custom_data: null, + huawei_badge_class: null, + huawei_badge_add_num: null, + huawei_badge_set_num: null, + huawei_category: null, + huawei_bi_tag: null, successful: null, failed: null, errored: null, diff --git a/lib/onesignal/models/basic_notification.rb b/lib/onesignal/models/basic_notification.rb index b942f3b..ce23dcd 100644 --- a/lib/onesignal/models/basic_notification.rb +++ b/lib/onesignal/models/basic_notification.rb @@ -310,6 +310,9 @@ class BasicNotification # Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. attr_accessor :email_from_address + # Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + attr_accessor :email_reply_to_address + # Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. attr_accessor :email_preheader @@ -330,6 +333,21 @@ class BasicNotification # Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} attr_accessor :custom_data + # Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + attr_accessor :huawei_badge_class + + # Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + attr_accessor :huawei_badge_add_num + + # Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + attr_accessor :huawei_badge_set_num + + # Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + attr_accessor :huawei_category + + # Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + attr_accessor :huawei_bi_tag + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -456,13 +474,19 @@ def self.attribute_map :'email_body' => :'email_body', :'email_from_name' => :'email_from_name', :'email_from_address' => :'email_from_address', + :'email_reply_to_address' => :'email_reply_to_address', :'email_preheader' => :'email_preheader', :'disable_email_click_tracking' => :'disable_email_click_tracking', :'include_unsubscribed' => :'include_unsubscribed', :'sms_from' => :'sms_from', :'sms_media_urls' => :'sms_media_urls', :'filters' => :'filters', - :'custom_data' => :'custom_data' + :'custom_data' => :'custom_data', + :'huawei_badge_class' => :'huawei_badge_class', + :'huawei_badge_add_num' => :'huawei_badge_add_num', + :'huawei_badge_set_num' => :'huawei_badge_set_num', + :'huawei_category' => :'huawei_category', + :'huawei_bi_tag' => :'huawei_bi_tag' } end @@ -575,13 +599,19 @@ def self.openapi_types :'email_body' => :'String', :'email_from_name' => :'String', :'email_from_address' => :'String', + :'email_reply_to_address' => :'String', :'email_preheader' => :'String', :'disable_email_click_tracking' => :'Boolean', :'include_unsubscribed' => :'Boolean', :'sms_from' => :'String', :'sms_media_urls' => :'Array', :'filters' => :'Array', - :'custom_data' => :'Object' + :'custom_data' => :'Object', + :'huawei_badge_class' => :'String', + :'huawei_badge_add_num' => :'Integer', + :'huawei_badge_set_num' => :'Integer', + :'huawei_category' => :'String', + :'huawei_bi_tag' => :'String' } end @@ -665,12 +695,18 @@ def self.openapi_nullable :'email_subject', :'email_from_name', :'email_from_address', + :'email_reply_to_address', :'email_preheader', :'disable_email_click_tracking', :'sms_from', :'sms_media_urls', :'filters', - :'custom_data' + :'custom_data', + :'huawei_badge_class', + :'huawei_badge_add_num', + :'huawei_badge_set_num', + :'huawei_category', + :'huawei_bi_tag' ]) end @@ -1129,6 +1165,10 @@ def initialize(attributes = {}) self.email_from_address = attributes[:'email_from_address'] end + if attributes.key?(:'email_reply_to_address') + self.email_reply_to_address = attributes[:'email_reply_to_address'] + end + if attributes.key?(:'email_preheader') self.email_preheader = attributes[:'email_preheader'] end @@ -1160,6 +1200,26 @@ def initialize(attributes = {}) if attributes.key?(:'custom_data') self.custom_data = attributes[:'custom_data'] end + + if attributes.key?(:'huawei_badge_class') + self.huawei_badge_class = attributes[:'huawei_badge_class'] + end + + if attributes.key?(:'huawei_badge_add_num') + self.huawei_badge_add_num = attributes[:'huawei_badge_add_num'] + end + + if attributes.key?(:'huawei_badge_set_num') + self.huawei_badge_set_num = attributes[:'huawei_badge_set_num'] + end + + if attributes.key?(:'huawei_category') + self.huawei_category = attributes[:'huawei_category'] + end + + if attributes.key?(:'huawei_bi_tag') + self.huawei_bi_tag = attributes[:'huawei_bi_tag'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -1181,6 +1241,8 @@ def valid? aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"]) return false unless aggregation_validator.valid?(@aggregation) return false if @app_id.nil? + huawei_category_validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + return false unless huawei_category_validator.valid?(@huawei_category) true end @@ -1204,6 +1266,16 @@ def aggregation=(aggregation) @aggregation = aggregation end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] huawei_category Object to be assigned + def huawei_category=(huawei_category) + validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + unless validator.valid?(huawei_category) + fail ArgumentError, "invalid value for \"huawei_category\", must be one of #{validator.allowable_values}." + end + @huawei_category = huawei_category + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -1310,13 +1382,19 @@ def ==(o) email_body == o.email_body && email_from_name == o.email_from_name && email_from_address == o.email_from_address && + email_reply_to_address == o.email_reply_to_address && email_preheader == o.email_preheader && disable_email_click_tracking == o.disable_email_click_tracking && include_unsubscribed == o.include_unsubscribed && sms_from == o.sms_from && sms_media_urls == o.sms_media_urls && filters == o.filters && - custom_data == o.custom_data + custom_data == o.custom_data && + huawei_badge_class == o.huawei_badge_class && + huawei_badge_add_num == o.huawei_badge_add_num && + huawei_badge_set_num == o.huawei_badge_set_num && + huawei_category == o.huawei_category && + huawei_bi_tag == o.huawei_bi_tag end # @see the `==` method @@ -1328,7 +1406,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data].hash + [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_reply_to_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, huawei_badge_class, huawei_badge_add_num, huawei_badge_set_num, huawei_category, huawei_bi_tag].hash end # Builds the object from hash diff --git a/lib/onesignal/models/basic_notification_all_of.rb b/lib/onesignal/models/basic_notification_all_of.rb index 496a61f..d1c952f 100644 --- a/lib/onesignal/models/basic_notification_all_of.rb +++ b/lib/onesignal/models/basic_notification_all_of.rb @@ -272,6 +272,9 @@ class BasicNotificationAllOf # Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. attr_accessor :email_from_address + # Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + attr_accessor :email_reply_to_address + # Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. attr_accessor :email_preheader @@ -292,6 +295,21 @@ class BasicNotificationAllOf # Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} attr_accessor :custom_data + # Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + attr_accessor :huawei_badge_class + + # Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + attr_accessor :huawei_badge_add_num + + # Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + attr_accessor :huawei_badge_set_num + + # Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + attr_accessor :huawei_category + + # Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + attr_accessor :huawei_bi_tag + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -405,13 +423,19 @@ def self.attribute_map :'email_body' => :'email_body', :'email_from_name' => :'email_from_name', :'email_from_address' => :'email_from_address', + :'email_reply_to_address' => :'email_reply_to_address', :'email_preheader' => :'email_preheader', :'disable_email_click_tracking' => :'disable_email_click_tracking', :'include_unsubscribed' => :'include_unsubscribed', :'sms_from' => :'sms_from', :'sms_media_urls' => :'sms_media_urls', :'filters' => :'filters', - :'custom_data' => :'custom_data' + :'custom_data' => :'custom_data', + :'huawei_badge_class' => :'huawei_badge_class', + :'huawei_badge_add_num' => :'huawei_badge_add_num', + :'huawei_badge_set_num' => :'huawei_badge_set_num', + :'huawei_category' => :'huawei_category', + :'huawei_bi_tag' => :'huawei_bi_tag' } end @@ -511,13 +535,19 @@ def self.openapi_types :'email_body' => :'String', :'email_from_name' => :'String', :'email_from_address' => :'String', + :'email_reply_to_address' => :'String', :'email_preheader' => :'String', :'disable_email_click_tracking' => :'Boolean', :'include_unsubscribed' => :'Boolean', :'sms_from' => :'String', :'sms_media_urls' => :'Array', :'filters' => :'Array', - :'custom_data' => :'Object' + :'custom_data' => :'Object', + :'huawei_badge_class' => :'String', + :'huawei_badge_add_num' => :'Integer', + :'huawei_badge_set_num' => :'Integer', + :'huawei_category' => :'String', + :'huawei_bi_tag' => :'String' } end @@ -599,12 +629,18 @@ def self.openapi_nullable :'email_subject', :'email_from_name', :'email_from_address', + :'email_reply_to_address', :'email_preheader', :'disable_email_click_tracking', :'sms_from', :'sms_media_urls', :'filters', - :'custom_data' + :'custom_data', + :'huawei_badge_class', + :'huawei_badge_add_num', + :'huawei_badge_set_num', + :'huawei_category', + :'huawei_bi_tag' ]) end @@ -979,6 +1015,10 @@ def initialize(attributes = {}) self.email_from_address = attributes[:'email_from_address'] end + if attributes.key?(:'email_reply_to_address') + self.email_reply_to_address = attributes[:'email_reply_to_address'] + end + if attributes.key?(:'email_preheader') self.email_preheader = attributes[:'email_preheader'] end @@ -1010,6 +1050,26 @@ def initialize(attributes = {}) if attributes.key?(:'custom_data') self.custom_data = attributes[:'custom_data'] end + + if attributes.key?(:'huawei_badge_class') + self.huawei_badge_class = attributes[:'huawei_badge_class'] + end + + if attributes.key?(:'huawei_badge_add_num') + self.huawei_badge_add_num = attributes[:'huawei_badge_add_num'] + end + + if attributes.key?(:'huawei_badge_set_num') + self.huawei_badge_set_num = attributes[:'huawei_badge_set_num'] + end + + if attributes.key?(:'huawei_category') + self.huawei_category = attributes[:'huawei_category'] + end + + if attributes.key?(:'huawei_bi_tag') + self.huawei_bi_tag = attributes[:'huawei_bi_tag'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -1024,6 +1084,8 @@ def list_invalid_properties def valid? aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"]) return false unless aggregation_validator.valid?(@aggregation) + huawei_category_validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + return false unless huawei_category_validator.valid?(@huawei_category) true end @@ -1037,6 +1099,16 @@ def aggregation=(aggregation) @aggregation = aggregation end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] huawei_category Object to be assigned + def huawei_category=(huawei_category) + validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + unless validator.valid?(huawei_category) + fail ArgumentError, "invalid value for \"huawei_category\", must be one of #{validator.allowable_values}." + end + @huawei_category = huawei_category + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -1130,13 +1202,19 @@ def ==(o) email_body == o.email_body && email_from_name == o.email_from_name && email_from_address == o.email_from_address && + email_reply_to_address == o.email_reply_to_address && email_preheader == o.email_preheader && disable_email_click_tracking == o.disable_email_click_tracking && include_unsubscribed == o.include_unsubscribed && sms_from == o.sms_from && sms_media_urls == o.sms_media_urls && filters == o.filters && - custom_data == o.custom_data + custom_data == o.custom_data && + huawei_badge_class == o.huawei_badge_class && + huawei_badge_add_num == o.huawei_badge_add_num && + huawei_badge_set_num == o.huawei_badge_set_num && + huawei_category == o.huawei_category && + huawei_bi_tag == o.huawei_bi_tag end # @see the `==` method @@ -1148,7 +1226,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data].hash + [id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_reply_to_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, huawei_badge_class, huawei_badge_add_num, huawei_badge_set_num, huawei_category, huawei_bi_tag].hash end # Builds the object from hash diff --git a/lib/onesignal/models/notification.rb b/lib/onesignal/models/notification.rb index 085c844..4982cb5 100644 --- a/lib/onesignal/models/notification.rb +++ b/lib/onesignal/models/notification.rb @@ -310,6 +310,9 @@ class Notification # Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. attr_accessor :email_from_address + # Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + attr_accessor :email_reply_to_address + # Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. attr_accessor :email_preheader @@ -330,6 +333,21 @@ class Notification # Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} attr_accessor :custom_data + # Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + attr_accessor :huawei_badge_class + + # Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + attr_accessor :huawei_badge_add_num + + # Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + attr_accessor :huawei_badge_set_num + + # Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + attr_accessor :huawei_category + + # Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + attr_accessor :huawei_bi_tag + # Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. attr_accessor :send_after @@ -459,6 +477,7 @@ def self.attribute_map :'email_body' => :'email_body', :'email_from_name' => :'email_from_name', :'email_from_address' => :'email_from_address', + :'email_reply_to_address' => :'email_reply_to_address', :'email_preheader' => :'email_preheader', :'disable_email_click_tracking' => :'disable_email_click_tracking', :'include_unsubscribed' => :'include_unsubscribed', @@ -466,6 +485,11 @@ def self.attribute_map :'sms_media_urls' => :'sms_media_urls', :'filters' => :'filters', :'custom_data' => :'custom_data', + :'huawei_badge_class' => :'huawei_badge_class', + :'huawei_badge_add_num' => :'huawei_badge_add_num', + :'huawei_badge_set_num' => :'huawei_badge_set_num', + :'huawei_category' => :'huawei_category', + :'huawei_bi_tag' => :'huawei_bi_tag', :'send_after' => :'send_after' } end @@ -579,6 +603,7 @@ def self.openapi_types :'email_body' => :'String', :'email_from_name' => :'String', :'email_from_address' => :'String', + :'email_reply_to_address' => :'String', :'email_preheader' => :'String', :'disable_email_click_tracking' => :'Boolean', :'include_unsubscribed' => :'Boolean', @@ -586,6 +611,11 @@ def self.openapi_types :'sms_media_urls' => :'Array', :'filters' => :'Array', :'custom_data' => :'Object', + :'huawei_badge_class' => :'String', + :'huawei_badge_add_num' => :'Integer', + :'huawei_badge_set_num' => :'Integer', + :'huawei_category' => :'String', + :'huawei_bi_tag' => :'String', :'send_after' => :'Time' } end @@ -670,12 +700,18 @@ def self.openapi_nullable :'email_subject', :'email_from_name', :'email_from_address', + :'email_reply_to_address', :'email_preheader', :'disable_email_click_tracking', :'sms_from', :'sms_media_urls', :'filters', :'custom_data', + :'huawei_badge_class', + :'huawei_badge_add_num', + :'huawei_badge_set_num', + :'huawei_category', + :'huawei_bi_tag', :'send_after' ]) end @@ -1135,6 +1171,10 @@ def initialize(attributes = {}) self.email_from_address = attributes[:'email_from_address'] end + if attributes.key?(:'email_reply_to_address') + self.email_reply_to_address = attributes[:'email_reply_to_address'] + end + if attributes.key?(:'email_preheader') self.email_preheader = attributes[:'email_preheader'] end @@ -1167,6 +1207,26 @@ def initialize(attributes = {}) self.custom_data = attributes[:'custom_data'] end + if attributes.key?(:'huawei_badge_class') + self.huawei_badge_class = attributes[:'huawei_badge_class'] + end + + if attributes.key?(:'huawei_badge_add_num') + self.huawei_badge_add_num = attributes[:'huawei_badge_add_num'] + end + + if attributes.key?(:'huawei_badge_set_num') + self.huawei_badge_set_num = attributes[:'huawei_badge_set_num'] + end + + if attributes.key?(:'huawei_category') + self.huawei_category = attributes[:'huawei_category'] + end + + if attributes.key?(:'huawei_bi_tag') + self.huawei_bi_tag = attributes[:'huawei_bi_tag'] + end + if attributes.key?(:'send_after') self.send_after = attributes[:'send_after'] end @@ -1191,6 +1251,8 @@ def valid? aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"]) return false unless aggregation_validator.valid?(@aggregation) return false if @app_id.nil? + huawei_category_validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + return false unless huawei_category_validator.valid?(@huawei_category) true end @@ -1214,6 +1276,16 @@ def aggregation=(aggregation) @aggregation = aggregation end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] huawei_category Object to be assigned + def huawei_category=(huawei_category) + validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + unless validator.valid?(huawei_category) + fail ArgumentError, "invalid value for \"huawei_category\", must be one of #{validator.allowable_values}." + end + @huawei_category = huawei_category + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -1320,6 +1392,7 @@ def ==(o) email_body == o.email_body && email_from_name == o.email_from_name && email_from_address == o.email_from_address && + email_reply_to_address == o.email_reply_to_address && email_preheader == o.email_preheader && disable_email_click_tracking == o.disable_email_click_tracking && include_unsubscribed == o.include_unsubscribed && @@ -1327,6 +1400,11 @@ def ==(o) sms_media_urls == o.sms_media_urls && filters == o.filters && custom_data == o.custom_data && + huawei_badge_class == o.huawei_badge_class && + huawei_badge_add_num == o.huawei_badge_add_num && + huawei_badge_set_num == o.huawei_badge_set_num && + huawei_category == o.huawei_category && + huawei_bi_tag == o.huawei_bi_tag && send_after == o.send_after end @@ -1339,7 +1417,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, send_after].hash + [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_reply_to_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, huawei_badge_class, huawei_badge_add_num, huawei_badge_set_num, huawei_category, huawei_bi_tag, send_after].hash end # Builds the object from hash diff --git a/lib/onesignal/models/notification_with_meta.rb b/lib/onesignal/models/notification_with_meta.rb index ffc8182..f83d490 100644 --- a/lib/onesignal/models/notification_with_meta.rb +++ b/lib/onesignal/models/notification_with_meta.rb @@ -310,6 +310,9 @@ class NotificationWithMeta # Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. attr_accessor :email_from_address + # Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + attr_accessor :email_reply_to_address + # Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. attr_accessor :email_preheader @@ -330,6 +333,21 @@ class NotificationWithMeta # Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} attr_accessor :custom_data + # Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + attr_accessor :huawei_badge_class + + # Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + attr_accessor :huawei_badge_add_num + + # Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + attr_accessor :huawei_badge_set_num + + # Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + attr_accessor :huawei_category + + # Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + attr_accessor :huawei_bi_tag + # Number of notifications that were successfully delivered. attr_accessor :successful @@ -490,6 +508,7 @@ def self.attribute_map :'email_body' => :'email_body', :'email_from_name' => :'email_from_name', :'email_from_address' => :'email_from_address', + :'email_reply_to_address' => :'email_reply_to_address', :'email_preheader' => :'email_preheader', :'disable_email_click_tracking' => :'disable_email_click_tracking', :'include_unsubscribed' => :'include_unsubscribed', @@ -497,6 +516,11 @@ def self.attribute_map :'sms_media_urls' => :'sms_media_urls', :'filters' => :'filters', :'custom_data' => :'custom_data', + :'huawei_badge_class' => :'huawei_badge_class', + :'huawei_badge_add_num' => :'huawei_badge_add_num', + :'huawei_badge_set_num' => :'huawei_badge_set_num', + :'huawei_category' => :'huawei_category', + :'huawei_bi_tag' => :'huawei_bi_tag', :'successful' => :'successful', :'failed' => :'failed', :'errored' => :'errored', @@ -621,6 +645,7 @@ def self.openapi_types :'email_body' => :'String', :'email_from_name' => :'String', :'email_from_address' => :'String', + :'email_reply_to_address' => :'String', :'email_preheader' => :'String', :'disable_email_click_tracking' => :'Boolean', :'include_unsubscribed' => :'Boolean', @@ -628,6 +653,11 @@ def self.openapi_types :'sms_media_urls' => :'Array', :'filters' => :'Array', :'custom_data' => :'Object', + :'huawei_badge_class' => :'String', + :'huawei_badge_add_num' => :'Integer', + :'huawei_badge_set_num' => :'Integer', + :'huawei_category' => :'String', + :'huawei_bi_tag' => :'String', :'successful' => :'Integer', :'failed' => :'Integer', :'errored' => :'Integer', @@ -723,12 +753,18 @@ def self.openapi_nullable :'email_subject', :'email_from_name', :'email_from_address', + :'email_reply_to_address', :'email_preheader', :'disable_email_click_tracking', :'sms_from', :'sms_media_urls', :'filters', :'custom_data', + :'huawei_badge_class', + :'huawei_badge_add_num', + :'huawei_badge_set_num', + :'huawei_category', + :'huawei_bi_tag', :'received', :'send_after', :'completed_at', @@ -1192,6 +1228,10 @@ def initialize(attributes = {}) self.email_from_address = attributes[:'email_from_address'] end + if attributes.key?(:'email_reply_to_address') + self.email_reply_to_address = attributes[:'email_reply_to_address'] + end + if attributes.key?(:'email_preheader') self.email_preheader = attributes[:'email_preheader'] end @@ -1224,6 +1264,26 @@ def initialize(attributes = {}) self.custom_data = attributes[:'custom_data'] end + if attributes.key?(:'huawei_badge_class') + self.huawei_badge_class = attributes[:'huawei_badge_class'] + end + + if attributes.key?(:'huawei_badge_add_num') + self.huawei_badge_add_num = attributes[:'huawei_badge_add_num'] + end + + if attributes.key?(:'huawei_badge_set_num') + self.huawei_badge_set_num = attributes[:'huawei_badge_set_num'] + end + + if attributes.key?(:'huawei_category') + self.huawei_category = attributes[:'huawei_category'] + end + + if attributes.key?(:'huawei_bi_tag') + self.huawei_bi_tag = attributes[:'huawei_bi_tag'] + end + if attributes.key?(:'successful') self.successful = attributes[:'successful'] end @@ -1294,6 +1354,8 @@ def valid? aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"]) return false unless aggregation_validator.valid?(@aggregation) return false if @app_id.nil? + huawei_category_validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + return false unless huawei_category_validator.valid?(@huawei_category) true end @@ -1317,6 +1379,16 @@ def aggregation=(aggregation) @aggregation = aggregation end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] huawei_category Object to be assigned + def huawei_category=(huawei_category) + validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + unless validator.valid?(huawei_category) + fail ArgumentError, "invalid value for \"huawei_category\", must be one of #{validator.allowable_values}." + end + @huawei_category = huawei_category + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -1423,6 +1495,7 @@ def ==(o) email_body == o.email_body && email_from_name == o.email_from_name && email_from_address == o.email_from_address && + email_reply_to_address == o.email_reply_to_address && email_preheader == o.email_preheader && disable_email_click_tracking == o.disable_email_click_tracking && include_unsubscribed == o.include_unsubscribed && @@ -1430,6 +1503,11 @@ def ==(o) sms_media_urls == o.sms_media_urls && filters == o.filters && custom_data == o.custom_data && + huawei_badge_class == o.huawei_badge_class && + huawei_badge_add_num == o.huawei_badge_add_num && + huawei_badge_set_num == o.huawei_badge_set_num && + huawei_category == o.huawei_category && + huawei_bi_tag == o.huawei_bi_tag && successful == o.successful && failed == o.failed && errored == o.errored && @@ -1453,7 +1531,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, successful, failed, errored, converted, received, outcomes, remaining, queued_at, send_after, completed_at, platform_delivery_stats, canceled].hash + [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_reply_to_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, huawei_badge_class, huawei_badge_add_num, huawei_badge_set_num, huawei_category, huawei_bi_tag, successful, failed, errored, converted, received, outcomes, remaining, queued_at, send_after, completed_at, platform_delivery_stats, canceled].hash end # Builds the object from hash diff --git a/spec/models/basic_notification_all_of_spec.rb b/spec/models/basic_notification_all_of_spec.rb index 2f0f21b..e067b47 100644 --- a/spec/models/basic_notification_all_of_spec.rb +++ b/spec/models/basic_notification_all_of_spec.rb @@ -557,6 +557,12 @@ end end + describe 'test attribute "email_reply_to_address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "email_preheader"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -599,4 +605,38 @@ end end + describe 'test attribute "huawei_badge_class"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_add_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_set_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_category"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + # validator.allowable_values.each do |value| + # expect { instance.huawei_category = value }.not_to raise_error + # end + end + end + + describe 'test attribute "huawei_bi_tag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/basic_notification_spec.rb b/spec/models/basic_notification_spec.rb index 9909591..df61b1a 100644 --- a/spec/models/basic_notification_spec.rb +++ b/spec/models/basic_notification_spec.rb @@ -639,6 +639,12 @@ end end + describe 'test attribute "email_reply_to_address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "email_preheader"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -681,4 +687,38 @@ end end + describe 'test attribute "huawei_badge_class"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_add_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_set_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_category"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + # validator.allowable_values.each do |value| + # expect { instance.huawei_category = value }.not_to raise_error + # end + end + end + + describe 'test attribute "huawei_bi_tag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index b4d7617..d4dedf3 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -639,6 +639,12 @@ end end + describe 'test attribute "email_reply_to_address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "email_preheader"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -681,6 +687,40 @@ end end + describe 'test attribute "huawei_badge_class"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_add_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_set_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_category"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + # validator.allowable_values.each do |value| + # expect { instance.huawei_category = value }.not_to raise_error + # end + end + end + + describe 'test attribute "huawei_bi_tag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "send_after"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/notification_with_meta_spec.rb b/spec/models/notification_with_meta_spec.rb index 86cddd7..3940051 100644 --- a/spec/models/notification_with_meta_spec.rb +++ b/spec/models/notification_with_meta_spec.rb @@ -639,6 +639,12 @@ end end + describe 'test attribute "email_reply_to_address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "email_preheader"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -681,6 +687,40 @@ end end + describe 'test attribute "huawei_badge_class"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_add_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_badge_set_num"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "huawei_category"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"]) + # validator.allowable_values.each do |value| + # expect { instance.huawei_category = value }.not_to raise_error + # end + end + end + + describe 'test attribute "huawei_bi_tag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "successful"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers