diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4d95c13..c0a9aac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,4 +29,4 @@ jobs: -p @semantic-release/git \ -p @semantic-release/github \ -p conventional-changelog-conventionalcommits \ - semantic-release \ No newline at end of file + semantic-release --dry-run \ No newline at end of file diff --git a/docs/Model/BasicNotification.md b/docs/Model/BasicNotification.md index d6d4239..a2d26c3 100644 --- a/docs/Model/BasicNotification.md +++ b/docs/Model/BasicNotification.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **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** | **bool** | 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** | **bool** | 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,5 +113,10 @@ Name | Type | Description | Notes **sms_media_urls** | **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** | [**\onesignal\client\model\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** | **int** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | **int** | 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] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BasicNotificationAllOf.md b/docs/Model/BasicNotificationAllOf.md index 8d5d7a0..b8f59fb 100644 --- a/docs/Model/BasicNotificationAllOf.md +++ b/docs/Model/BasicNotificationAllOf.md @@ -92,6 +92,7 @@ Name | Type | Description | Notes **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** | **bool** | 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** | **bool** | 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,5 +100,10 @@ Name | Type | Description | Notes **sms_media_urls** | **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** | [**\onesignal\client\model\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** | **int** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | **int** | 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] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Notification.md b/docs/Model/Notification.md index cf9f31f..a52ec43 100644 --- a/docs/Model/Notification.md +++ b/docs/Model/Notification.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **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** | **bool** | 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** | **bool** | 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 @@ Name | Type | Description | Notes **sms_media_urls** | **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** | [**\onesignal\client\model\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** | **int** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | **int** | 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** | **\DateTime** | 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] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NotificationWithMeta.md b/docs/Model/NotificationWithMeta.md index 5e5d39f..88e5df5 100644 --- a/docs/Model/NotificationWithMeta.md +++ b/docs/Model/NotificationWithMeta.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **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** | **bool** | 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** | **bool** | 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 @@ Name | Type | Description | Notes **sms_media_urls** | **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** | [**\onesignal\client\model\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** | **int** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | **int** | 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** | **int** | Number of notifications that were successfully delivered. | [optional] **failed** | **int** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] **errored** | **int** | 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] diff --git a/lib/model/BasicNotification.php b/lib/model/BasicNotification.php index 933cbba..0ecba96 100644 --- a/lib/model/BasicNotification.php +++ b/lib/model/BasicNotification.php @@ -161,13 +161,19 @@ class BasicNotification implements ModelInterface, ArrayAccess, \JsonSerializabl 'email_body' => 'string', 'email_from_name' => 'string', 'email_from_address' => 'string', + 'email_reply_to_address' => 'string', 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', 'sms_from' => 'string', 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', - 'custom_data' => 'object' + 'custom_data' => 'object', + 'huawei_badge_class' => 'string', + 'huawei_badge_add_num' => 'int', + 'huawei_badge_set_num' => 'int', + 'huawei_category' => 'string', + 'huawei_bi_tag' => 'string' ]; /** @@ -279,13 +285,19 @@ class BasicNotification implements ModelInterface, ArrayAccess, \JsonSerializabl '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 ]; /** @@ -416,13 +428,19 @@ public static function openAPIFormats() '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' ]; /** @@ -532,13 +550,19 @@ public static function openAPIFormats() 'email_body' => 'setEmailBody', 'email_from_name' => 'setEmailFromName', 'email_from_address' => 'setEmailFromAddress', + 'email_reply_to_address' => 'setEmailReplyToAddress', 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', 'sms_from' => 'setSmsFrom', 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', - 'custom_data' => 'setCustomData' + 'custom_data' => 'setCustomData', + 'huawei_badge_class' => 'setHuaweiBadgeClass', + 'huawei_badge_add_num' => 'setHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'setHuaweiBadgeSetNum', + 'huawei_category' => 'setHuaweiCategory', + 'huawei_bi_tag' => 'setHuaweiBiTag' ]; /** @@ -648,13 +672,19 @@ public static function openAPIFormats() 'email_body' => 'getEmailBody', 'email_from_name' => 'getEmailFromName', 'email_from_address' => 'getEmailFromAddress', + 'email_reply_to_address' => 'getEmailReplyToAddress', 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', 'sms_from' => 'getSmsFrom', 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', - 'custom_data' => 'getCustomData' + 'custom_data' => 'getCustomData', + 'huawei_badge_class' => 'getHuaweiBadgeClass', + 'huawei_badge_add_num' => 'getHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'getHuaweiBadgeSetNum', + 'huawei_category' => 'getHuaweiCategory', + 'huawei_bi_tag' => 'getHuaweiBiTag' ]; /** @@ -703,6 +733,18 @@ public function getModelName() public const TARGET_CHANNEL_SMS = 'sms'; public const AGGREGATION_SUM = 'sum'; public const AGGREGATION_COUNT = 'count'; + public const HUAWEI_CATEGORY_IM = 'IM'; + public const HUAWEI_CATEGORY_VOIP = 'VOIP'; + public const HUAWEI_CATEGORY_SUBSCRIPTION = 'SUBSCRIPTION'; + public const HUAWEI_CATEGORY_TRAVEL = 'TRAVEL'; + public const HUAWEI_CATEGORY_HEALTH = 'HEALTH'; + public const HUAWEI_CATEGORY_WORK = 'WORK'; + public const HUAWEI_CATEGORY_ACCOUNT = 'ACCOUNT'; + public const HUAWEI_CATEGORY_EXPRESS = 'EXPRESS'; + public const HUAWEI_CATEGORY_FINANCE = 'FINANCE'; + public const HUAWEI_CATEGORY_DEVICE_REMINDER = 'DEVICE_REMINDER'; + public const HUAWEI_CATEGORY_MAIL = 'MAIL'; + public const HUAWEI_CATEGORY_MARKETING = 'MARKETING'; /** * Gets allowable values of the enum @@ -731,6 +773,29 @@ public function getAggregationAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHuaweiCategoryAllowableValues() + { + return [ + self::HUAWEI_CATEGORY_IM, + self::HUAWEI_CATEGORY_VOIP, + self::HUAWEI_CATEGORY_SUBSCRIPTION, + self::HUAWEI_CATEGORY_TRAVEL, + self::HUAWEI_CATEGORY_HEALTH, + self::HUAWEI_CATEGORY_WORK, + self::HUAWEI_CATEGORY_ACCOUNT, + self::HUAWEI_CATEGORY_EXPRESS, + self::HUAWEI_CATEGORY_FINANCE, + self::HUAWEI_CATEGORY_DEVICE_REMINDER, + self::HUAWEI_CATEGORY_MAIL, + self::HUAWEI_CATEGORY_MARKETING, + ]; + } + /** * Associative array for storing property values * @@ -847,6 +912,7 @@ public function __construct(?array $data = null) $this->container['email_body'] = $data['email_body'] ?? null; $this->container['email_from_name'] = $data['email_from_name'] ?? null; $this->container['email_from_address'] = $data['email_from_address'] ?? null; + $this->container['email_reply_to_address'] = $data['email_reply_to_address'] ?? null; $this->container['email_preheader'] = $data['email_preheader'] ?? null; $this->container['disable_email_click_tracking'] = $data['disable_email_click_tracking'] ?? null; $this->container['include_unsubscribed'] = $data['include_unsubscribed'] ?? null; @@ -854,6 +920,11 @@ public function __construct(?array $data = null) $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; $this->container['custom_data'] = $data['custom_data'] ?? null; + $this->container['huawei_badge_class'] = $data['huawei_badge_class'] ?? null; + $this->container['huawei_badge_add_num'] = $data['huawei_badge_add_num'] ?? null; + $this->container['huawei_badge_set_num'] = $data['huawei_badge_set_num'] ?? null; + $this->container['huawei_category'] = $data['huawei_category'] ?? null; + $this->container['huawei_bi_tag'] = $data['huawei_bi_tag'] ?? null; } /** @@ -886,6 +957,15 @@ public function listInvalidProperties() if ($this->container['app_id'] === null) { $invalidProperties[] = "'app_id' can't be null"; } + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($this->container['huawei_category']) && !in_array($this->container['huawei_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'huawei_category', must be one of '%s'", + $this->container['huawei_category'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -3347,6 +3427,30 @@ public function setEmailFromAddress($email_from_address) return $this; } + /** + * Gets email_reply_to_address + * + * @return string|null + */ + public function getEmailReplyToAddress() + { + return $this->container['email_reply_to_address']; + } + + /** + * Sets email_reply_to_address + * + * @param string|null $email_reply_to_address Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + * + * @return self + */ + public function setEmailReplyToAddress($email_reply_to_address) + { + $this->container['email_reply_to_address'] = $email_reply_to_address; + + return $this; + } + /** * Gets email_preheader * @@ -3514,6 +3618,136 @@ public function setCustomData($custom_data) return $this; } + + /** + * Gets huawei_badge_class + * + * @return string|null + */ + public function getHuaweiBadgeClass() + { + return $this->container['huawei_badge_class']; + } + + /** + * Sets huawei_badge_class + * + * @param string|null $huawei_badge_class Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + * + * @return self + */ + public function setHuaweiBadgeClass($huawei_badge_class) + { + $this->container['huawei_badge_class'] = $huawei_badge_class; + + return $this; + } + + /** + * Gets huawei_badge_add_num + * + * @return int|null + */ + public function getHuaweiBadgeAddNum() + { + return $this->container['huawei_badge_add_num']; + } + + /** + * Sets huawei_badge_add_num + * + * @param int|null $huawei_badge_add_num Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + * + * @return self + */ + public function setHuaweiBadgeAddNum($huawei_badge_add_num) + { + $this->container['huawei_badge_add_num'] = $huawei_badge_add_num; + + return $this; + } + + /** + * Gets huawei_badge_set_num + * + * @return int|null + */ + public function getHuaweiBadgeSetNum() + { + return $this->container['huawei_badge_set_num']; + } + + /** + * Sets huawei_badge_set_num + * + * @param int|null $huawei_badge_set_num Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + * + * @return self + */ + public function setHuaweiBadgeSetNum($huawei_badge_set_num) + { + $this->container['huawei_badge_set_num'] = $huawei_badge_set_num; + + return $this; + } + + /** + * Gets huawei_category + * + * @return string|null + */ + public function getHuaweiCategory() + { + return $this->container['huawei_category']; + } + + /** + * Sets huawei_category + * + * @param string|null $huawei_category Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + * + * @return self + */ + public function setHuaweiCategory($huawei_category) + { + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($huawei_category) && !in_array($huawei_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'huawei_category', must be one of '%s'", + $huawei_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['huawei_category'] = $huawei_category; + + return $this; + } + + /** + * Gets huawei_bi_tag + * + * @return string|null + */ + public function getHuaweiBiTag() + { + return $this->container['huawei_bi_tag']; + } + + /** + * Sets huawei_bi_tag + * + * @param string|null $huawei_bi_tag Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + * + * @return self + */ + public function setHuaweiBiTag($huawei_bi_tag) + { + $this->container['huawei_bi_tag'] = $huawei_bi_tag; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/model/BasicNotificationAllOf.php b/lib/model/BasicNotificationAllOf.php index 721e11f..dd61c09 100644 --- a/lib/model/BasicNotificationAllOf.php +++ b/lib/model/BasicNotificationAllOf.php @@ -148,13 +148,19 @@ class BasicNotificationAllOf implements ModelInterface, ArrayAccess, \JsonSerial 'email_body' => 'string', 'email_from_name' => 'string', 'email_from_address' => 'string', + 'email_reply_to_address' => 'string', 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', 'sms_from' => 'string', 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', - 'custom_data' => 'object' + 'custom_data' => 'object', + 'huawei_badge_class' => 'string', + 'huawei_badge_add_num' => 'int', + 'huawei_badge_set_num' => 'int', + 'huawei_category' => 'string', + 'huawei_bi_tag' => 'string' ]; /** @@ -253,13 +259,19 @@ class BasicNotificationAllOf implements ModelInterface, ArrayAccess, \JsonSerial '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 ]; /** @@ -377,13 +389,19 @@ public static function openAPIFormats() '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' ]; /** @@ -480,13 +498,19 @@ public static function openAPIFormats() 'email_body' => 'setEmailBody', 'email_from_name' => 'setEmailFromName', 'email_from_address' => 'setEmailFromAddress', + 'email_reply_to_address' => 'setEmailReplyToAddress', 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', 'sms_from' => 'setSmsFrom', 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', - 'custom_data' => 'setCustomData' + 'custom_data' => 'setCustomData', + 'huawei_badge_class' => 'setHuaweiBadgeClass', + 'huawei_badge_add_num' => 'setHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'setHuaweiBadgeSetNum', + 'huawei_category' => 'setHuaweiCategory', + 'huawei_bi_tag' => 'setHuaweiBiTag' ]; /** @@ -583,13 +607,19 @@ public static function openAPIFormats() 'email_body' => 'getEmailBody', 'email_from_name' => 'getEmailFromName', 'email_from_address' => 'getEmailFromAddress', + 'email_reply_to_address' => 'getEmailReplyToAddress', 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', 'sms_from' => 'getSmsFrom', 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', - 'custom_data' => 'getCustomData' + 'custom_data' => 'getCustomData', + 'huawei_badge_class' => 'getHuaweiBadgeClass', + 'huawei_badge_add_num' => 'getHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'getHuaweiBadgeSetNum', + 'huawei_category' => 'getHuaweiCategory', + 'huawei_bi_tag' => 'getHuaweiBiTag' ]; /** @@ -635,6 +665,18 @@ public function getModelName() public const AGGREGATION_SUM = 'sum'; public const AGGREGATION_COUNT = 'count'; + public const HUAWEI_CATEGORY_IM = 'IM'; + public const HUAWEI_CATEGORY_VOIP = 'VOIP'; + public const HUAWEI_CATEGORY_SUBSCRIPTION = 'SUBSCRIPTION'; + public const HUAWEI_CATEGORY_TRAVEL = 'TRAVEL'; + public const HUAWEI_CATEGORY_HEALTH = 'HEALTH'; + public const HUAWEI_CATEGORY_WORK = 'WORK'; + public const HUAWEI_CATEGORY_ACCOUNT = 'ACCOUNT'; + public const HUAWEI_CATEGORY_EXPRESS = 'EXPRESS'; + public const HUAWEI_CATEGORY_FINANCE = 'FINANCE'; + public const HUAWEI_CATEGORY_DEVICE_REMINDER = 'DEVICE_REMINDER'; + public const HUAWEI_CATEGORY_MAIL = 'MAIL'; + public const HUAWEI_CATEGORY_MARKETING = 'MARKETING'; /** * Gets allowable values of the enum @@ -649,6 +691,29 @@ public function getAggregationAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHuaweiCategoryAllowableValues() + { + return [ + self::HUAWEI_CATEGORY_IM, + self::HUAWEI_CATEGORY_VOIP, + self::HUAWEI_CATEGORY_SUBSCRIPTION, + self::HUAWEI_CATEGORY_TRAVEL, + self::HUAWEI_CATEGORY_HEALTH, + self::HUAWEI_CATEGORY_WORK, + self::HUAWEI_CATEGORY_ACCOUNT, + self::HUAWEI_CATEGORY_EXPRESS, + self::HUAWEI_CATEGORY_FINANCE, + self::HUAWEI_CATEGORY_DEVICE_REMINDER, + self::HUAWEI_CATEGORY_MAIL, + self::HUAWEI_CATEGORY_MARKETING, + ]; + } + /** * Associative array for storing property values * @@ -752,6 +817,7 @@ public function __construct(?array $data = null) $this->container['email_body'] = $data['email_body'] ?? null; $this->container['email_from_name'] = $data['email_from_name'] ?? null; $this->container['email_from_address'] = $data['email_from_address'] ?? null; + $this->container['email_reply_to_address'] = $data['email_reply_to_address'] ?? null; $this->container['email_preheader'] = $data['email_preheader'] ?? null; $this->container['disable_email_click_tracking'] = $data['disable_email_click_tracking'] ?? null; $this->container['include_unsubscribed'] = $data['include_unsubscribed'] ?? null; @@ -759,6 +825,11 @@ public function __construct(?array $data = null) $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; $this->container['custom_data'] = $data['custom_data'] ?? null; + $this->container['huawei_badge_class'] = $data['huawei_badge_class'] ?? null; + $this->container['huawei_badge_add_num'] = $data['huawei_badge_add_num'] ?? null; + $this->container['huawei_badge_set_num'] = $data['huawei_badge_set_num'] ?? null; + $this->container['huawei_category'] = $data['huawei_category'] ?? null; + $this->container['huawei_bi_tag'] = $data['huawei_bi_tag'] ?? null; } /** @@ -779,6 +850,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($this->container['huawei_category']) && !in_array($this->container['huawei_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'huawei_category', must be one of '%s'", + $this->container['huawei_category'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -2918,6 +2998,30 @@ public function setEmailFromAddress($email_from_address) return $this; } + /** + * Gets email_reply_to_address + * + * @return string|null + */ + public function getEmailReplyToAddress() + { + return $this->container['email_reply_to_address']; + } + + /** + * Sets email_reply_to_address + * + * @param string|null $email_reply_to_address Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + * + * @return self + */ + public function setEmailReplyToAddress($email_reply_to_address) + { + $this->container['email_reply_to_address'] = $email_reply_to_address; + + return $this; + } + /** * Gets email_preheader * @@ -3085,6 +3189,136 @@ public function setCustomData($custom_data) return $this; } + + /** + * Gets huawei_badge_class + * + * @return string|null + */ + public function getHuaweiBadgeClass() + { + return $this->container['huawei_badge_class']; + } + + /** + * Sets huawei_badge_class + * + * @param string|null $huawei_badge_class Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + * + * @return self + */ + public function setHuaweiBadgeClass($huawei_badge_class) + { + $this->container['huawei_badge_class'] = $huawei_badge_class; + + return $this; + } + + /** + * Gets huawei_badge_add_num + * + * @return int|null + */ + public function getHuaweiBadgeAddNum() + { + return $this->container['huawei_badge_add_num']; + } + + /** + * Sets huawei_badge_add_num + * + * @param int|null $huawei_badge_add_num Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + * + * @return self + */ + public function setHuaweiBadgeAddNum($huawei_badge_add_num) + { + $this->container['huawei_badge_add_num'] = $huawei_badge_add_num; + + return $this; + } + + /** + * Gets huawei_badge_set_num + * + * @return int|null + */ + public function getHuaweiBadgeSetNum() + { + return $this->container['huawei_badge_set_num']; + } + + /** + * Sets huawei_badge_set_num + * + * @param int|null $huawei_badge_set_num Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + * + * @return self + */ + public function setHuaweiBadgeSetNum($huawei_badge_set_num) + { + $this->container['huawei_badge_set_num'] = $huawei_badge_set_num; + + return $this; + } + + /** + * Gets huawei_category + * + * @return string|null + */ + public function getHuaweiCategory() + { + return $this->container['huawei_category']; + } + + /** + * Sets huawei_category + * + * @param string|null $huawei_category Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + * + * @return self + */ + public function setHuaweiCategory($huawei_category) + { + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($huawei_category) && !in_array($huawei_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'huawei_category', must be one of '%s'", + $huawei_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['huawei_category'] = $huawei_category; + + return $this; + } + + /** + * Gets huawei_bi_tag + * + * @return string|null + */ + public function getHuaweiBiTag() + { + return $this->container['huawei_bi_tag']; + } + + /** + * Sets huawei_bi_tag + * + * @param string|null $huawei_bi_tag Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + * + * @return self + */ + public function setHuaweiBiTag($huawei_bi_tag) + { + $this->container['huawei_bi_tag'] = $huawei_bi_tag; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/model/Notification.php b/lib/model/Notification.php index 10e0edb..dbfc77d 100644 --- a/lib/model/Notification.php +++ b/lib/model/Notification.php @@ -161,6 +161,7 @@ class Notification implements ModelInterface, ArrayAccess, \JsonSerializable 'email_body' => 'string', 'email_from_name' => 'string', 'email_from_address' => 'string', + 'email_reply_to_address' => 'string', 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', @@ -168,6 +169,11 @@ class Notification implements ModelInterface, ArrayAccess, \JsonSerializable 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', 'custom_data' => 'object', + 'huawei_badge_class' => 'string', + 'huawei_badge_add_num' => 'int', + 'huawei_badge_set_num' => 'int', + 'huawei_category' => 'string', + 'huawei_bi_tag' => 'string', 'send_after' => '\DateTime' ]; @@ -280,6 +286,7 @@ class Notification implements ModelInterface, ArrayAccess, \JsonSerializable '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, @@ -287,6 +294,11 @@ class Notification implements ModelInterface, ArrayAccess, \JsonSerializable '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' => 'date-time' ]; @@ -418,6 +430,7 @@ public static function openAPIFormats() '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', @@ -425,6 +438,11 @@ public static function openAPIFormats() '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' ]; @@ -535,6 +553,7 @@ public static function openAPIFormats() 'email_body' => 'setEmailBody', 'email_from_name' => 'setEmailFromName', 'email_from_address' => 'setEmailFromAddress', + 'email_reply_to_address' => 'setEmailReplyToAddress', 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', @@ -542,6 +561,11 @@ public static function openAPIFormats() 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', 'custom_data' => 'setCustomData', + 'huawei_badge_class' => 'setHuaweiBadgeClass', + 'huawei_badge_add_num' => 'setHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'setHuaweiBadgeSetNum', + 'huawei_category' => 'setHuaweiCategory', + 'huawei_bi_tag' => 'setHuaweiBiTag', 'send_after' => 'setSendAfter' ]; @@ -652,6 +676,7 @@ public static function openAPIFormats() 'email_body' => 'getEmailBody', 'email_from_name' => 'getEmailFromName', 'email_from_address' => 'getEmailFromAddress', + 'email_reply_to_address' => 'getEmailReplyToAddress', 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', @@ -659,6 +684,11 @@ public static function openAPIFormats() 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', 'custom_data' => 'getCustomData', + 'huawei_badge_class' => 'getHuaweiBadgeClass', + 'huawei_badge_add_num' => 'getHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'getHuaweiBadgeSetNum', + 'huawei_category' => 'getHuaweiCategory', + 'huawei_bi_tag' => 'getHuaweiBiTag', 'send_after' => 'getSendAfter' ]; @@ -708,6 +738,18 @@ public function getModelName() public const TARGET_CHANNEL_SMS = 'sms'; public const AGGREGATION_SUM = 'sum'; public const AGGREGATION_COUNT = 'count'; + public const HUAWEI_CATEGORY_IM = 'IM'; + public const HUAWEI_CATEGORY_VOIP = 'VOIP'; + public const HUAWEI_CATEGORY_SUBSCRIPTION = 'SUBSCRIPTION'; + public const HUAWEI_CATEGORY_TRAVEL = 'TRAVEL'; + public const HUAWEI_CATEGORY_HEALTH = 'HEALTH'; + public const HUAWEI_CATEGORY_WORK = 'WORK'; + public const HUAWEI_CATEGORY_ACCOUNT = 'ACCOUNT'; + public const HUAWEI_CATEGORY_EXPRESS = 'EXPRESS'; + public const HUAWEI_CATEGORY_FINANCE = 'FINANCE'; + public const HUAWEI_CATEGORY_DEVICE_REMINDER = 'DEVICE_REMINDER'; + public const HUAWEI_CATEGORY_MAIL = 'MAIL'; + public const HUAWEI_CATEGORY_MARKETING = 'MARKETING'; /** * Gets allowable values of the enum @@ -736,6 +778,29 @@ public function getAggregationAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHuaweiCategoryAllowableValues() + { + return [ + self::HUAWEI_CATEGORY_IM, + self::HUAWEI_CATEGORY_VOIP, + self::HUAWEI_CATEGORY_SUBSCRIPTION, + self::HUAWEI_CATEGORY_TRAVEL, + self::HUAWEI_CATEGORY_HEALTH, + self::HUAWEI_CATEGORY_WORK, + self::HUAWEI_CATEGORY_ACCOUNT, + self::HUAWEI_CATEGORY_EXPRESS, + self::HUAWEI_CATEGORY_FINANCE, + self::HUAWEI_CATEGORY_DEVICE_REMINDER, + self::HUAWEI_CATEGORY_MAIL, + self::HUAWEI_CATEGORY_MARKETING, + ]; + } + /** * Associative array for storing property values * @@ -852,6 +917,7 @@ public function __construct(?array $data = null) $this->container['email_body'] = $data['email_body'] ?? null; $this->container['email_from_name'] = $data['email_from_name'] ?? null; $this->container['email_from_address'] = $data['email_from_address'] ?? null; + $this->container['email_reply_to_address'] = $data['email_reply_to_address'] ?? null; $this->container['email_preheader'] = $data['email_preheader'] ?? null; $this->container['disable_email_click_tracking'] = $data['disable_email_click_tracking'] ?? null; $this->container['include_unsubscribed'] = $data['include_unsubscribed'] ?? null; @@ -859,6 +925,11 @@ public function __construct(?array $data = null) $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; $this->container['custom_data'] = $data['custom_data'] ?? null; + $this->container['huawei_badge_class'] = $data['huawei_badge_class'] ?? null; + $this->container['huawei_badge_add_num'] = $data['huawei_badge_add_num'] ?? null; + $this->container['huawei_badge_set_num'] = $data['huawei_badge_set_num'] ?? null; + $this->container['huawei_category'] = $data['huawei_category'] ?? null; + $this->container['huawei_bi_tag'] = $data['huawei_bi_tag'] ?? null; $this->container['send_after'] = $data['send_after'] ?? null; } @@ -892,6 +963,15 @@ public function listInvalidProperties() if ($this->container['app_id'] === null) { $invalidProperties[] = "'app_id' can't be null"; } + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($this->container['huawei_category']) && !in_array($this->container['huawei_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'huawei_category', must be one of '%s'", + $this->container['huawei_category'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -3353,6 +3433,30 @@ public function setEmailFromAddress($email_from_address) return $this; } + /** + * Gets email_reply_to_address + * + * @return string|null + */ + public function getEmailReplyToAddress() + { + return $this->container['email_reply_to_address']; + } + + /** + * Sets email_reply_to_address + * + * @param string|null $email_reply_to_address Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + * + * @return self + */ + public function setEmailReplyToAddress($email_reply_to_address) + { + $this->container['email_reply_to_address'] = $email_reply_to_address; + + return $this; + } + /** * Gets email_preheader * @@ -3521,6 +3625,136 @@ public function setCustomData($custom_data) return $this; } + /** + * Gets huawei_badge_class + * + * @return string|null + */ + public function getHuaweiBadgeClass() + { + return $this->container['huawei_badge_class']; + } + + /** + * Sets huawei_badge_class + * + * @param string|null $huawei_badge_class Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + * + * @return self + */ + public function setHuaweiBadgeClass($huawei_badge_class) + { + $this->container['huawei_badge_class'] = $huawei_badge_class; + + return $this; + } + + /** + * Gets huawei_badge_add_num + * + * @return int|null + */ + public function getHuaweiBadgeAddNum() + { + return $this->container['huawei_badge_add_num']; + } + + /** + * Sets huawei_badge_add_num + * + * @param int|null $huawei_badge_add_num Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + * + * @return self + */ + public function setHuaweiBadgeAddNum($huawei_badge_add_num) + { + $this->container['huawei_badge_add_num'] = $huawei_badge_add_num; + + return $this; + } + + /** + * Gets huawei_badge_set_num + * + * @return int|null + */ + public function getHuaweiBadgeSetNum() + { + return $this->container['huawei_badge_set_num']; + } + + /** + * Sets huawei_badge_set_num + * + * @param int|null $huawei_badge_set_num Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + * + * @return self + */ + public function setHuaweiBadgeSetNum($huawei_badge_set_num) + { + $this->container['huawei_badge_set_num'] = $huawei_badge_set_num; + + return $this; + } + + /** + * Gets huawei_category + * + * @return string|null + */ + public function getHuaweiCategory() + { + return $this->container['huawei_category']; + } + + /** + * Sets huawei_category + * + * @param string|null $huawei_category Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + * + * @return self + */ + public function setHuaweiCategory($huawei_category) + { + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($huawei_category) && !in_array($huawei_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'huawei_category', must be one of '%s'", + $huawei_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['huawei_category'] = $huawei_category; + + return $this; + } + + /** + * Gets huawei_bi_tag + * + * @return string|null + */ + public function getHuaweiBiTag() + { + return $this->container['huawei_bi_tag']; + } + + /** + * Sets huawei_bi_tag + * + * @param string|null $huawei_bi_tag Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + * + * @return self + */ + public function setHuaweiBiTag($huawei_bi_tag) + { + $this->container['huawei_bi_tag'] = $huawei_bi_tag; + + return $this; + } + /** * Gets send_after * diff --git a/lib/model/NotificationWithMeta.php b/lib/model/NotificationWithMeta.php index 0d7ba11..b005172 100644 --- a/lib/model/NotificationWithMeta.php +++ b/lib/model/NotificationWithMeta.php @@ -161,6 +161,7 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ 'email_body' => 'string', 'email_from_name' => 'string', 'email_from_address' => 'string', + 'email_reply_to_address' => 'string', 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', @@ -168,6 +169,11 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', 'custom_data' => 'object', + 'huawei_badge_class' => 'string', + 'huawei_badge_add_num' => 'int', + 'huawei_badge_set_num' => 'int', + 'huawei_category' => 'string', + 'huawei_bi_tag' => 'string', 'successful' => 'int', 'failed' => 'int', 'errored' => 'int', @@ -291,6 +297,7 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ '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, @@ -298,6 +305,11 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ '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, @@ -440,6 +452,7 @@ public static function openAPIFormats() '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', @@ -447,6 +460,11 @@ public static function openAPIFormats() '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', @@ -568,6 +586,7 @@ public static function openAPIFormats() 'email_body' => 'setEmailBody', 'email_from_name' => 'setEmailFromName', 'email_from_address' => 'setEmailFromAddress', + 'email_reply_to_address' => 'setEmailReplyToAddress', 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', @@ -575,6 +594,11 @@ public static function openAPIFormats() 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', 'custom_data' => 'setCustomData', + 'huawei_badge_class' => 'setHuaweiBadgeClass', + 'huawei_badge_add_num' => 'setHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'setHuaweiBadgeSetNum', + 'huawei_category' => 'setHuaweiCategory', + 'huawei_bi_tag' => 'setHuaweiBiTag', 'successful' => 'setSuccessful', 'failed' => 'setFailed', 'errored' => 'setErrored', @@ -696,6 +720,7 @@ public static function openAPIFormats() 'email_body' => 'getEmailBody', 'email_from_name' => 'getEmailFromName', 'email_from_address' => 'getEmailFromAddress', + 'email_reply_to_address' => 'getEmailReplyToAddress', 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', @@ -703,6 +728,11 @@ public static function openAPIFormats() 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', 'custom_data' => 'getCustomData', + 'huawei_badge_class' => 'getHuaweiBadgeClass', + 'huawei_badge_add_num' => 'getHuaweiBadgeAddNum', + 'huawei_badge_set_num' => 'getHuaweiBadgeSetNum', + 'huawei_category' => 'getHuaweiCategory', + 'huawei_bi_tag' => 'getHuaweiBiTag', 'successful' => 'getSuccessful', 'failed' => 'getFailed', 'errored' => 'getErrored', @@ -763,6 +793,18 @@ public function getModelName() public const TARGET_CHANNEL_SMS = 'sms'; public const AGGREGATION_SUM = 'sum'; public const AGGREGATION_COUNT = 'count'; + public const HUAWEI_CATEGORY_IM = 'IM'; + public const HUAWEI_CATEGORY_VOIP = 'VOIP'; + public const HUAWEI_CATEGORY_SUBSCRIPTION = 'SUBSCRIPTION'; + public const HUAWEI_CATEGORY_TRAVEL = 'TRAVEL'; + public const HUAWEI_CATEGORY_HEALTH = 'HEALTH'; + public const HUAWEI_CATEGORY_WORK = 'WORK'; + public const HUAWEI_CATEGORY_ACCOUNT = 'ACCOUNT'; + public const HUAWEI_CATEGORY_EXPRESS = 'EXPRESS'; + public const HUAWEI_CATEGORY_FINANCE = 'FINANCE'; + public const HUAWEI_CATEGORY_DEVICE_REMINDER = 'DEVICE_REMINDER'; + public const HUAWEI_CATEGORY_MAIL = 'MAIL'; + public const HUAWEI_CATEGORY_MARKETING = 'MARKETING'; /** * Gets allowable values of the enum @@ -791,6 +833,29 @@ public function getAggregationAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getHuaweiCategoryAllowableValues() + { + return [ + self::HUAWEI_CATEGORY_IM, + self::HUAWEI_CATEGORY_VOIP, + self::HUAWEI_CATEGORY_SUBSCRIPTION, + self::HUAWEI_CATEGORY_TRAVEL, + self::HUAWEI_CATEGORY_HEALTH, + self::HUAWEI_CATEGORY_WORK, + self::HUAWEI_CATEGORY_ACCOUNT, + self::HUAWEI_CATEGORY_EXPRESS, + self::HUAWEI_CATEGORY_FINANCE, + self::HUAWEI_CATEGORY_DEVICE_REMINDER, + self::HUAWEI_CATEGORY_MAIL, + self::HUAWEI_CATEGORY_MARKETING, + ]; + } + /** * Associative array for storing property values * @@ -907,6 +972,7 @@ public function __construct(?array $data = null) $this->container['email_body'] = $data['email_body'] ?? null; $this->container['email_from_name'] = $data['email_from_name'] ?? null; $this->container['email_from_address'] = $data['email_from_address'] ?? null; + $this->container['email_reply_to_address'] = $data['email_reply_to_address'] ?? null; $this->container['email_preheader'] = $data['email_preheader'] ?? null; $this->container['disable_email_click_tracking'] = $data['disable_email_click_tracking'] ?? null; $this->container['include_unsubscribed'] = $data['include_unsubscribed'] ?? null; @@ -914,6 +980,11 @@ public function __construct(?array $data = null) $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; $this->container['custom_data'] = $data['custom_data'] ?? null; + $this->container['huawei_badge_class'] = $data['huawei_badge_class'] ?? null; + $this->container['huawei_badge_add_num'] = $data['huawei_badge_add_num'] ?? null; + $this->container['huawei_badge_set_num'] = $data['huawei_badge_set_num'] ?? null; + $this->container['huawei_category'] = $data['huawei_category'] ?? null; + $this->container['huawei_bi_tag'] = $data['huawei_bi_tag'] ?? null; $this->container['successful'] = $data['successful'] ?? null; $this->container['failed'] = $data['failed'] ?? null; $this->container['errored'] = $data['errored'] ?? null; @@ -958,6 +1029,15 @@ public function listInvalidProperties() if ($this->container['app_id'] === null) { $invalidProperties[] = "'app_id' can't be null"; } + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($this->container['huawei_category']) && !in_array($this->container['huawei_category'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'huawei_category', must be one of '%s'", + $this->container['huawei_category'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -3419,6 +3499,30 @@ public function setEmailFromAddress($email_from_address) return $this; } + /** + * Gets email_reply_to_address + * + * @return string|null + */ + public function getEmailReplyToAddress() + { + return $this->container['email_reply_to_address']; + } + + /** + * Sets email_reply_to_address + * + * @param string|null $email_reply_to_address Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + * + * @return self + */ + public function setEmailReplyToAddress($email_reply_to_address) + { + $this->container['email_reply_to_address'] = $email_reply_to_address; + + return $this; + } + /** * Gets email_preheader * @@ -3587,6 +3691,136 @@ public function setCustomData($custom_data) return $this; } + /** + * Gets huawei_badge_class + * + * @return string|null + */ + public function getHuaweiBadgeClass() + { + return $this->container['huawei_badge_class']; + } + + /** + * Sets huawei_badge_class + * + * @param string|null $huawei_badge_class Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + * + * @return self + */ + public function setHuaweiBadgeClass($huawei_badge_class) + { + $this->container['huawei_badge_class'] = $huawei_badge_class; + + return $this; + } + + /** + * Gets huawei_badge_add_num + * + * @return int|null + */ + public function getHuaweiBadgeAddNum() + { + return $this->container['huawei_badge_add_num']; + } + + /** + * Sets huawei_badge_add_num + * + * @param int|null $huawei_badge_add_num Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + * + * @return self + */ + public function setHuaweiBadgeAddNum($huawei_badge_add_num) + { + $this->container['huawei_badge_add_num'] = $huawei_badge_add_num; + + return $this; + } + + /** + * Gets huawei_badge_set_num + * + * @return int|null + */ + public function getHuaweiBadgeSetNum() + { + return $this->container['huawei_badge_set_num']; + } + + /** + * Sets huawei_badge_set_num + * + * @param int|null $huawei_badge_set_num Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + * + * @return self + */ + public function setHuaweiBadgeSetNum($huawei_badge_set_num) + { + $this->container['huawei_badge_set_num'] = $huawei_badge_set_num; + + return $this; + } + + /** + * Gets huawei_category + * + * @return string|null + */ + public function getHuaweiCategory() + { + return $this->container['huawei_category']; + } + + /** + * Sets huawei_category + * + * @param string|null $huawei_category Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + * + * @return self + */ + public function setHuaweiCategory($huawei_category) + { + $allowedValues = $this->getHuaweiCategoryAllowableValues(); + if (!is_null($huawei_category) && !in_array($huawei_category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'huawei_category', must be one of '%s'", + $huawei_category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['huawei_category'] = $huawei_category; + + return $this; + } + + /** + * Gets huawei_bi_tag + * + * @return string|null + */ + public function getHuaweiBiTag() + { + return $this->container['huawei_bi_tag']; + } + + /** + * Sets huawei_bi_tag + * + * @param string|null $huawei_bi_tag Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + * + * @return self + */ + public function setHuaweiBiTag($huawei_bi_tag) + { + $this->container['huawei_bi_tag'] = $huawei_bi_tag; + + return $this; + } + /** * Gets successful *