From 98595b1067df6feaef4b1e9b71b378d1e33bce30 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 7 May 2026 22:33:26 +0000 Subject: [PATCH] feat: add v5.4.0 package updates --- .github/workflows/project.yml | 2 +- docs/Model/BasicNotification.md | 1 + docs/Model/BasicNotificationAllOf.md | 1 + docs/Model/CreateTemplateRequest.md | 1 + docs/Model/Notification.md | 1 + docs/Model/NotificationWithMeta.md | 2 + docs/Model/NotificationWithMetaAllOf.md | 2 + docs/Model/UpdateTemplateRequest.md | 1 + lib/model/BasicNotification.php | 38 ++++++++++++++ lib/model/BasicNotificationAllOf.php | 38 ++++++++++++++ lib/model/CreateTemplateRequest.php | 38 ++++++++++++++ lib/model/Notification.php | 38 ++++++++++++++ lib/model/NotificationWithMeta.php | 70 +++++++++++++++++++++++-- lib/model/NotificationWithMetaAllOf.php | 70 +++++++++++++++++++++++-- lib/model/UpdateTemplateRequest.php | 38 ++++++++++++++ 15 files changed, 330 insertions(+), 11 deletions(-) diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 69960fe..e6d4603 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -14,4 +14,4 @@ jobs: with: # SDK Server Project project-url: https://github.com/orgs/OneSignal/projects/11 - github-token: ${{ secrets.GH_PROJECTS_TOKEN }} + github-token: ${{ secrets.GH_PUSH_TOKEN }} diff --git a/docs/Model/BasicNotification.md b/docs/Model/BasicNotification.md index 1e19395..0209f75 100644 --- a/docs/Model/BasicNotification.md +++ b/docs/Model/BasicNotification.md @@ -109,6 +109,7 @@ Name | Type | Description | Notes **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] +**email_bcc** | **string[]** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **sms_from** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **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] diff --git a/docs/Model/BasicNotificationAllOf.md b/docs/Model/BasicNotificationAllOf.md index 1e9827a..2755491 100644 --- a/docs/Model/BasicNotificationAllOf.md +++ b/docs/Model/BasicNotificationAllOf.md @@ -96,6 +96,7 @@ Name | Type | Description | Notes **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] +**email_bcc** | **string[]** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **sms_from** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **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] diff --git a/docs/Model/CreateTemplateRequest.md b/docs/Model/CreateTemplateRequest.md index 7680227..2d1294f 100644 --- a/docs/Model/CreateTemplateRequest.md +++ b/docs/Model/CreateTemplateRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **is_email** | **bool** | Set true for an Email template. | [optional] **email_subject** | **string** | Subject of the email. | [optional] **email_body** | **string** | Body of the email (HTML supported). | [optional] +**email_bcc** | **string[]** | BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **is_sms** | **bool** | Set true for an SMS template. | [optional] **dynamic_content** | **string** | JSON string for dynamic content personalization. | [optional] diff --git a/docs/Model/Notification.md b/docs/Model/Notification.md index 7b8ddd7..c2563ee 100644 --- a/docs/Model/Notification.md +++ b/docs/Model/Notification.md @@ -109,6 +109,7 @@ Name | Type | Description | Notes **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] +**email_bcc** | **string[]** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **sms_from** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **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] diff --git a/docs/Model/NotificationWithMeta.md b/docs/Model/NotificationWithMeta.md index 383b675..5591df7 100644 --- a/docs/Model/NotificationWithMeta.md +++ b/docs/Model/NotificationWithMeta.md @@ -109,6 +109,7 @@ Name | Type | Description | Notes **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] +**email_bcc** | **string[]** | BCC recipients that were set on this email notification. | [optional] **sms_from** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **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] @@ -130,5 +131,6 @@ Name | Type | Description | Notes **completed_at** | **int** | Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after. | [optional] **platform_delivery_stats** | [**\onesignal\client\model\PlatformDeliveryData**](PlatformDeliveryData.md) | | [optional] **canceled** | **bool** | Indicates whether the notification was canceled before it could be sent. | [optional] +**bcc_sent** | **int** | Number of BCC copies successfully sent for this notification. | [optional] [[Back to API list]](https://github.com/OneSignal/onesignal-php-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-php-api) diff --git a/docs/Model/NotificationWithMetaAllOf.md b/docs/Model/NotificationWithMetaAllOf.md index bd38445..9670465 100644 --- a/docs/Model/NotificationWithMetaAllOf.md +++ b/docs/Model/NotificationWithMetaAllOf.md @@ -16,5 +16,7 @@ Name | Type | Description | Notes **received** | **int** | Confirmed Deliveries number of devices that received the push notification. Paid Feature Only. Free accounts will see 0. | [optional] **throttle_rate_per_minute** | **int** | number of push notifications sent per minute. Paid Feature Only. If throttling is not enabled for the app or the notification, and for free accounts, null is returned. Refer to Throttling for more details. | [optional] **canceled** | **bool** | Indicates whether the notification was canceled before it could be sent. | [optional] +**email_bcc** | **string[]** | BCC recipients that were set on this email notification. | [optional] +**bcc_sent** | **int** | Number of BCC copies successfully sent for this notification. | [optional] [[Back to API list]](https://github.com/OneSignal/onesignal-php-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-php-api) diff --git a/docs/Model/UpdateTemplateRequest.md b/docs/Model/UpdateTemplateRequest.md index 62993b4..5e94e92 100644 --- a/docs/Model/UpdateTemplateRequest.md +++ b/docs/Model/UpdateTemplateRequest.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **is_email** | **bool** | Set true for an Email template. | [optional] **email_subject** | **string** | Subject of the email. | [optional] **email_body** | **string** | Body of the email (HTML supported). | [optional] +**email_bcc** | **string[]** | BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] **is_sms** | **bool** | Set true for an SMS template. | [optional] **dynamic_content** | **string** | JSON string for dynamic content personalization. | [optional] diff --git a/lib/model/BasicNotification.php b/lib/model/BasicNotification.php index e6d1588..39d6e73 100644 --- a/lib/model/BasicNotification.php +++ b/lib/model/BasicNotification.php @@ -165,6 +165,7 @@ class BasicNotification implements ModelInterface, ArrayAccess, \JsonSerializabl 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', + 'email_bcc' => 'string[]', 'sms_from' => 'string', 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', @@ -289,6 +290,7 @@ class BasicNotification implements ModelInterface, ArrayAccess, \JsonSerializabl 'email_preheader' => null, 'disable_email_click_tracking' => null, 'include_unsubscribed' => null, + 'email_bcc' => null, 'sms_from' => null, 'sms_media_urls' => null, 'filters' => null, @@ -432,6 +434,7 @@ public static function openAPIFormats() 'email_preheader' => 'email_preheader', 'disable_email_click_tracking' => 'disable_email_click_tracking', 'include_unsubscribed' => 'include_unsubscribed', + 'email_bcc' => 'email_bcc', 'sms_from' => 'sms_from', 'sms_media_urls' => 'sms_media_urls', 'filters' => 'filters', @@ -554,6 +557,7 @@ public static function openAPIFormats() 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', + 'email_bcc' => 'setEmailBcc', 'sms_from' => 'setSmsFrom', 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', @@ -676,6 +680,7 @@ public static function openAPIFormats() 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', + 'email_bcc' => 'getEmailBcc', 'sms_from' => 'getSmsFrom', 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', @@ -916,6 +921,7 @@ public function __construct(?array $data = 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; + $this->container['email_bcc'] = $data['email_bcc'] ?? null; $this->container['sms_from'] = $data['sms_from'] ?? null; $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; @@ -957,6 +963,10 @@ public function listInvalidProperties() if ($this->container['app_id'] === null) { $invalidProperties[] = "'app_id' can't be null"; } + if (!is_null($this->container['email_bcc']) && (count($this->container['email_bcc']) > 5)) { + $invalidProperties[] = "invalid value for 'email_bcc', number of items must be less than or equal to 5."; + } + $allowedValues = $this->getHuaweiCategoryAllowableValues(); if (!is_null($this->container['huawei_category']) && !in_array($this->container['huawei_category'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -3523,6 +3533,34 @@ public function setIncludeUnsubscribed($include_unsubscribed) return $this; } + /** + * Gets email_bcc + * + * @return string[]|null + */ + public function getEmailBcc() + { + return $this->container['email_bcc']; + } + + /** + * Sets email_bcc + * + * @param string[]|null $email_bcc Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * + * @return self + */ + public function setEmailBcc($email_bcc) + { + + if (!is_null($email_bcc) && (count($email_bcc) > 5)) { + throw new \InvalidArgumentException('invalid value for $email_bcc when calling BasicNotification., number of items must be less than or equal to 5.'); + } + $this->container['email_bcc'] = $email_bcc; + + return $this; + } + /** * Gets sms_from * diff --git a/lib/model/BasicNotificationAllOf.php b/lib/model/BasicNotificationAllOf.php index 97ff79a..d374c22 100644 --- a/lib/model/BasicNotificationAllOf.php +++ b/lib/model/BasicNotificationAllOf.php @@ -152,6 +152,7 @@ class BasicNotificationAllOf implements ModelInterface, ArrayAccess, \JsonSerial 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', + 'email_bcc' => 'string[]', 'sms_from' => 'string', 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', @@ -263,6 +264,7 @@ class BasicNotificationAllOf implements ModelInterface, ArrayAccess, \JsonSerial 'email_preheader' => null, 'disable_email_click_tracking' => null, 'include_unsubscribed' => null, + 'email_bcc' => null, 'sms_from' => null, 'sms_media_urls' => null, 'filters' => null, @@ -393,6 +395,7 @@ public static function openAPIFormats() 'email_preheader' => 'email_preheader', 'disable_email_click_tracking' => 'disable_email_click_tracking', 'include_unsubscribed' => 'include_unsubscribed', + 'email_bcc' => 'email_bcc', 'sms_from' => 'sms_from', 'sms_media_urls' => 'sms_media_urls', 'filters' => 'filters', @@ -502,6 +505,7 @@ public static function openAPIFormats() 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', + 'email_bcc' => 'setEmailBcc', 'sms_from' => 'setSmsFrom', 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', @@ -611,6 +615,7 @@ public static function openAPIFormats() 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', + 'email_bcc' => 'getEmailBcc', 'sms_from' => 'getSmsFrom', 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', @@ -821,6 +826,7 @@ public function __construct(?array $data = 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; + $this->container['email_bcc'] = $data['email_bcc'] ?? null; $this->container['sms_from'] = $data['sms_from'] ?? null; $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; @@ -850,6 +856,10 @@ public function listInvalidProperties() ); } + if (!is_null($this->container['email_bcc']) && (count($this->container['email_bcc']) > 5)) { + $invalidProperties[] = "invalid value for 'email_bcc', number of items must be less than or equal to 5."; + } + $allowedValues = $this->getHuaweiCategoryAllowableValues(); if (!is_null($this->container['huawei_category']) && !in_array($this->container['huawei_category'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -3094,6 +3104,34 @@ public function setIncludeUnsubscribed($include_unsubscribed) return $this; } + /** + * Gets email_bcc + * + * @return string[]|null + */ + public function getEmailBcc() + { + return $this->container['email_bcc']; + } + + /** + * Sets email_bcc + * + * @param string[]|null $email_bcc Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * + * @return self + */ + public function setEmailBcc($email_bcc) + { + + if (!is_null($email_bcc) && (count($email_bcc) > 5)) { + throw new \InvalidArgumentException('invalid value for $email_bcc when calling BasicNotificationAllOf., number of items must be less than or equal to 5.'); + } + $this->container['email_bcc'] = $email_bcc; + + return $this; + } + /** * Gets sms_from * diff --git a/lib/model/CreateTemplateRequest.php b/lib/model/CreateTemplateRequest.php index 7d0ef83..446c081 100644 --- a/lib/model/CreateTemplateRequest.php +++ b/lib/model/CreateTemplateRequest.php @@ -68,6 +68,7 @@ class CreateTemplateRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'is_email' => 'bool', 'email_subject' => 'string', 'email_body' => 'string', + 'email_bcc' => 'string[]', 'is_sms' => 'bool', 'dynamic_content' => 'string' ]; @@ -88,6 +89,7 @@ class CreateTemplateRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'is_email' => null, 'email_subject' => null, 'email_body' => null, + 'email_bcc' => null, 'is_sms' => null, 'dynamic_content' => null ]; @@ -127,6 +129,7 @@ public static function openAPIFormats() 'is_email' => 'isEmail', 'email_subject' => 'email_subject', 'email_body' => 'email_body', + 'email_bcc' => 'email_bcc', 'is_sms' => 'isSMS', 'dynamic_content' => 'dynamic_content' ]; @@ -145,6 +148,7 @@ public static function openAPIFormats() 'is_email' => 'setIsEmail', 'email_subject' => 'setEmailSubject', 'email_body' => 'setEmailBody', + 'email_bcc' => 'setEmailBcc', 'is_sms' => 'setIsSms', 'dynamic_content' => 'setDynamicContent' ]; @@ -163,6 +167,7 @@ public static function openAPIFormats() 'is_email' => 'getIsEmail', 'email_subject' => 'getEmailSubject', 'email_body' => 'getEmailBody', + 'email_bcc' => 'getEmailBcc', 'is_sms' => 'getIsSms', 'dynamic_content' => 'getDynamicContent' ]; @@ -232,6 +237,7 @@ public function __construct(?array $data = null) $this->container['is_email'] = $data['is_email'] ?? null; $this->container['email_subject'] = $data['email_subject'] ?? null; $this->container['email_body'] = $data['email_body'] ?? null; + $this->container['email_bcc'] = $data['email_bcc'] ?? null; $this->container['is_sms'] = $data['is_sms'] ?? null; $this->container['dynamic_content'] = $data['dynamic_content'] ?? null; } @@ -254,6 +260,10 @@ public function listInvalidProperties() if ($this->container['contents'] === null) { $invalidProperties[] = "'contents' can't be null"; } + if (!is_null($this->container['email_bcc']) && (count($this->container['email_bcc']) > 5)) { + $invalidProperties[] = "invalid value for 'email_bcc', number of items must be less than or equal to 5."; + } + return $invalidProperties; } @@ -461,6 +471,34 @@ public function setEmailBody($email_body) return $this; } + /** + * Gets email_bcc + * + * @return string[]|null + */ + public function getEmailBcc() + { + return $this->container['email_bcc']; + } + + /** + * Sets email_bcc + * + * @param string[]|null $email_bcc BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * + * @return self + */ + public function setEmailBcc($email_bcc) + { + + if (!is_null($email_bcc) && (count($email_bcc) > 5)) { + throw new \InvalidArgumentException('invalid value for $email_bcc when calling CreateTemplateRequest., number of items must be less than or equal to 5.'); + } + $this->container['email_bcc'] = $email_bcc; + + return $this; + } + /** * Gets is_sms * diff --git a/lib/model/Notification.php b/lib/model/Notification.php index de1ff64..c91efc6 100644 --- a/lib/model/Notification.php +++ b/lib/model/Notification.php @@ -165,6 +165,7 @@ class Notification implements ModelInterface, ArrayAccess, \JsonSerializable 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', + 'email_bcc' => 'string[]', 'sms_from' => 'string', 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', @@ -290,6 +291,7 @@ class Notification implements ModelInterface, ArrayAccess, \JsonSerializable 'email_preheader' => null, 'disable_email_click_tracking' => null, 'include_unsubscribed' => null, + 'email_bcc' => null, 'sms_from' => null, 'sms_media_urls' => null, 'filters' => null, @@ -434,6 +436,7 @@ public static function openAPIFormats() 'email_preheader' => 'email_preheader', 'disable_email_click_tracking' => 'disable_email_click_tracking', 'include_unsubscribed' => 'include_unsubscribed', + 'email_bcc' => 'email_bcc', 'sms_from' => 'sms_from', 'sms_media_urls' => 'sms_media_urls', 'filters' => 'filters', @@ -557,6 +560,7 @@ public static function openAPIFormats() 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', + 'email_bcc' => 'setEmailBcc', 'sms_from' => 'setSmsFrom', 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', @@ -680,6 +684,7 @@ public static function openAPIFormats() 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', + 'email_bcc' => 'getEmailBcc', 'sms_from' => 'getSmsFrom', 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', @@ -921,6 +926,7 @@ public function __construct(?array $data = 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; + $this->container['email_bcc'] = $data['email_bcc'] ?? null; $this->container['sms_from'] = $data['sms_from'] ?? null; $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; @@ -963,6 +969,10 @@ public function listInvalidProperties() if ($this->container['app_id'] === null) { $invalidProperties[] = "'app_id' can't be null"; } + if (!is_null($this->container['email_bcc']) && (count($this->container['email_bcc']) > 5)) { + $invalidProperties[] = "invalid value for 'email_bcc', number of items must be less than or equal to 5."; + } + $allowedValues = $this->getHuaweiCategoryAllowableValues(); if (!is_null($this->container['huawei_category']) && !in_array($this->container['huawei_category'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -3529,6 +3539,34 @@ public function setIncludeUnsubscribed($include_unsubscribed) return $this; } + /** + * Gets email_bcc + * + * @return string[]|null + */ + public function getEmailBcc() + { + return $this->container['email_bcc']; + } + + /** + * Sets email_bcc + * + * @param string[]|null $email_bcc Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * + * @return self + */ + public function setEmailBcc($email_bcc) + { + + if (!is_null($email_bcc) && (count($email_bcc) > 5)) { + throw new \InvalidArgumentException('invalid value for $email_bcc when calling Notification., number of items must be less than or equal to 5.'); + } + $this->container['email_bcc'] = $email_bcc; + + return $this; + } + /** * Gets sms_from * diff --git a/lib/model/NotificationWithMeta.php b/lib/model/NotificationWithMeta.php index 42732d0..3170b94 100644 --- a/lib/model/NotificationWithMeta.php +++ b/lib/model/NotificationWithMeta.php @@ -165,6 +165,7 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ 'email_preheader' => 'string', 'disable_email_click_tracking' => 'bool', 'include_unsubscribed' => 'bool', + 'email_bcc' => 'string[]', 'sms_from' => 'string', 'sms_media_urls' => 'string[]', 'filters' => '\onesignal\client\model\FilterExpression[]', @@ -185,7 +186,8 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ 'send_after' => 'int', 'completed_at' => 'int', 'platform_delivery_stats' => '\onesignal\client\model\PlatformDeliveryData', - 'canceled' => 'bool' + 'canceled' => 'bool', + 'bcc_sent' => 'int' ]; /** @@ -301,6 +303,7 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ 'email_preheader' => null, 'disable_email_click_tracking' => null, 'include_unsubscribed' => null, + 'email_bcc' => null, 'sms_from' => null, 'sms_media_urls' => null, 'filters' => null, @@ -321,7 +324,8 @@ class NotificationWithMeta implements ModelInterface, ArrayAccess, \JsonSerializ 'send_after' => 'int64', 'completed_at' => 'int64', 'platform_delivery_stats' => null, - 'canceled' => null + 'canceled' => null, + 'bcc_sent' => null ]; /** @@ -456,6 +460,7 @@ public static function openAPIFormats() 'email_preheader' => 'email_preheader', 'disable_email_click_tracking' => 'disable_email_click_tracking', 'include_unsubscribed' => 'include_unsubscribed', + 'email_bcc' => 'email_bcc', 'sms_from' => 'sms_from', 'sms_media_urls' => 'sms_media_urls', 'filters' => 'filters', @@ -476,7 +481,8 @@ public static function openAPIFormats() 'send_after' => 'send_after', 'completed_at' => 'completed_at', 'platform_delivery_stats' => 'platform_delivery_stats', - 'canceled' => 'canceled' + 'canceled' => 'canceled', + 'bcc_sent' => 'bcc_sent' ]; /** @@ -590,6 +596,7 @@ public static function openAPIFormats() 'email_preheader' => 'setEmailPreheader', 'disable_email_click_tracking' => 'setDisableEmailClickTracking', 'include_unsubscribed' => 'setIncludeUnsubscribed', + 'email_bcc' => 'setEmailBcc', 'sms_from' => 'setSmsFrom', 'sms_media_urls' => 'setSmsMediaUrls', 'filters' => 'setFilters', @@ -610,7 +617,8 @@ public static function openAPIFormats() 'send_after' => 'setSendAfter', 'completed_at' => 'setCompletedAt', 'platform_delivery_stats' => 'setPlatformDeliveryStats', - 'canceled' => 'setCanceled' + 'canceled' => 'setCanceled', + 'bcc_sent' => 'setBccSent' ]; /** @@ -724,6 +732,7 @@ public static function openAPIFormats() 'email_preheader' => 'getEmailPreheader', 'disable_email_click_tracking' => 'getDisableEmailClickTracking', 'include_unsubscribed' => 'getIncludeUnsubscribed', + 'email_bcc' => 'getEmailBcc', 'sms_from' => 'getSmsFrom', 'sms_media_urls' => 'getSmsMediaUrls', 'filters' => 'getFilters', @@ -744,7 +753,8 @@ public static function openAPIFormats() 'send_after' => 'getSendAfter', 'completed_at' => 'getCompletedAt', 'platform_delivery_stats' => 'getPlatformDeliveryStats', - 'canceled' => 'getCanceled' + 'canceled' => 'getCanceled', + 'bcc_sent' => 'getBccSent' ]; /** @@ -976,6 +986,7 @@ public function __construct(?array $data = 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; + $this->container['email_bcc'] = $data['email_bcc'] ?? null; $this->container['sms_from'] = $data['sms_from'] ?? null; $this->container['sms_media_urls'] = $data['sms_media_urls'] ?? null; $this->container['filters'] = $data['filters'] ?? null; @@ -997,6 +1008,7 @@ public function __construct(?array $data = null) $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['platform_delivery_stats'] = $data['platform_delivery_stats'] ?? null; $this->container['canceled'] = $data['canceled'] ?? null; + $this->container['bcc_sent'] = $data['bcc_sent'] ?? null; } /** @@ -3595,6 +3607,30 @@ public function setIncludeUnsubscribed($include_unsubscribed) return $this; } + /** + * Gets email_bcc + * + * @return string[]|null + */ + public function getEmailBcc() + { + return $this->container['email_bcc']; + } + + /** + * Sets email_bcc + * + * @param string[]|null $email_bcc BCC recipients that were set on this email notification. + * + * @return self + */ + public function setEmailBcc($email_bcc) + { + $this->container['email_bcc'] = $email_bcc; + + return $this; + } + /** * Gets sms_from * @@ -4108,6 +4144,30 @@ public function setCanceled($canceled) return $this; } + + /** + * Gets bcc_sent + * + * @return int|null + */ + public function getBccSent() + { + return $this->container['bcc_sent']; + } + + /** + * Sets bcc_sent + * + * @param int|null $bcc_sent Number of BCC copies successfully sent for this notification. + * + * @return self + */ + public function setBccSent($bcc_sent) + { + $this->container['bcc_sent'] = $bcc_sent; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/model/NotificationWithMetaAllOf.php b/lib/model/NotificationWithMetaAllOf.php index 829579b..d857835 100644 --- a/lib/model/NotificationWithMetaAllOf.php +++ b/lib/model/NotificationWithMetaAllOf.php @@ -71,7 +71,9 @@ class NotificationWithMetaAllOf implements ModelInterface, ArrayAccess, \JsonSer 'platform_delivery_stats' => '\onesignal\client\model\PlatformDeliveryData', 'received' => 'int', 'throttle_rate_per_minute' => 'int', - 'canceled' => 'bool' + 'canceled' => 'bool', + 'email_bcc' => 'string[]', + 'bcc_sent' => 'int' ]; /** @@ -93,7 +95,9 @@ class NotificationWithMetaAllOf implements ModelInterface, ArrayAccess, \JsonSer 'platform_delivery_stats' => null, 'received' => null, 'throttle_rate_per_minute' => null, - 'canceled' => null + 'canceled' => null, + 'email_bcc' => null, + 'bcc_sent' => null ]; /** @@ -134,7 +138,9 @@ public static function openAPIFormats() 'platform_delivery_stats' => 'platform_delivery_stats', 'received' => 'received', 'throttle_rate_per_minute' => 'throttle_rate_per_minute', - 'canceled' => 'canceled' + 'canceled' => 'canceled', + 'email_bcc' => 'email_bcc', + 'bcc_sent' => 'bcc_sent' ]; /** @@ -154,7 +160,9 @@ public static function openAPIFormats() 'platform_delivery_stats' => 'setPlatformDeliveryStats', 'received' => 'setReceived', 'throttle_rate_per_minute' => 'setThrottleRatePerMinute', - 'canceled' => 'setCanceled' + 'canceled' => 'setCanceled', + 'email_bcc' => 'setEmailBcc', + 'bcc_sent' => 'setBccSent' ]; /** @@ -174,7 +182,9 @@ public static function openAPIFormats() 'platform_delivery_stats' => 'getPlatformDeliveryStats', 'received' => 'getReceived', 'throttle_rate_per_minute' => 'getThrottleRatePerMinute', - 'canceled' => 'getCanceled' + 'canceled' => 'getCanceled', + 'email_bcc' => 'getEmailBcc', + 'bcc_sent' => 'getBccSent' ]; /** @@ -246,6 +256,8 @@ public function __construct(?array $data = null) $this->container['received'] = $data['received'] ?? null; $this->container['throttle_rate_per_minute'] = $data['throttle_rate_per_minute'] ?? null; $this->container['canceled'] = $data['canceled'] ?? null; + $this->container['email_bcc'] = $data['email_bcc'] ?? null; + $this->container['bcc_sent'] = $data['bcc_sent'] ?? null; } /** @@ -559,6 +571,54 @@ public function setCanceled($canceled) return $this; } + + /** + * Gets email_bcc + * + * @return string[]|null + */ + public function getEmailBcc() + { + return $this->container['email_bcc']; + } + + /** + * Sets email_bcc + * + * @param string[]|null $email_bcc BCC recipients that were set on this email notification. + * + * @return self + */ + public function setEmailBcc($email_bcc) + { + $this->container['email_bcc'] = $email_bcc; + + return $this; + } + + /** + * Gets bcc_sent + * + * @return int|null + */ + public function getBccSent() + { + return $this->container['bcc_sent']; + } + + /** + * Sets bcc_sent + * + * @param int|null $bcc_sent Number of BCC copies successfully sent for this notification. + * + * @return self + */ + public function setBccSent($bcc_sent) + { + $this->container['bcc_sent'] = $bcc_sent; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/model/UpdateTemplateRequest.php b/lib/model/UpdateTemplateRequest.php index 946d956..fd3fe19 100644 --- a/lib/model/UpdateTemplateRequest.php +++ b/lib/model/UpdateTemplateRequest.php @@ -67,6 +67,7 @@ class UpdateTemplateRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'is_email' => 'bool', 'email_subject' => 'string', 'email_body' => 'string', + 'email_bcc' => 'string[]', 'is_sms' => 'bool', 'dynamic_content' => 'string' ]; @@ -86,6 +87,7 @@ class UpdateTemplateRequest implements ModelInterface, ArrayAccess, \JsonSeriali 'is_email' => null, 'email_subject' => null, 'email_body' => null, + 'email_bcc' => null, 'is_sms' => null, 'dynamic_content' => null ]; @@ -124,6 +126,7 @@ public static function openAPIFormats() 'is_email' => 'isEmail', 'email_subject' => 'email_subject', 'email_body' => 'email_body', + 'email_bcc' => 'email_bcc', 'is_sms' => 'isSMS', 'dynamic_content' => 'dynamic_content' ]; @@ -141,6 +144,7 @@ public static function openAPIFormats() 'is_email' => 'setIsEmail', 'email_subject' => 'setEmailSubject', 'email_body' => 'setEmailBody', + 'email_bcc' => 'setEmailBcc', 'is_sms' => 'setIsSms', 'dynamic_content' => 'setDynamicContent' ]; @@ -158,6 +162,7 @@ public static function openAPIFormats() 'is_email' => 'getIsEmail', 'email_subject' => 'getEmailSubject', 'email_body' => 'getEmailBody', + 'email_bcc' => 'getEmailBcc', 'is_sms' => 'getIsSms', 'dynamic_content' => 'getDynamicContent' ]; @@ -226,6 +231,7 @@ public function __construct(?array $data = null) $this->container['is_email'] = $data['is_email'] ?? null; $this->container['email_subject'] = $data['email_subject'] ?? null; $this->container['email_body'] = $data['email_body'] ?? null; + $this->container['email_bcc'] = $data['email_bcc'] ?? null; $this->container['is_sms'] = $data['is_sms'] ?? null; $this->container['dynamic_content'] = $data['dynamic_content'] ?? null; } @@ -239,6 +245,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['email_bcc']) && (count($this->container['email_bcc']) > 5)) { + $invalidProperties[] = "invalid value for 'email_bcc', number of items must be less than or equal to 5."; + } + return $invalidProperties; } @@ -422,6 +432,34 @@ public function setEmailBody($email_body) return $this; } + /** + * Gets email_bcc + * + * @return string[]|null + */ + public function getEmailBcc() + { + return $this->container['email_bcc']; + } + + /** + * Sets email_bcc + * + * @param string[]|null $email_bcc BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * + * @return self + */ + public function setEmailBcc($email_bcc) + { + + if (!is_null($email_bcc) && (count($email_bcc) > 5)) { + throw new \InvalidArgumentException('invalid value for $email_bcc when calling UpdateTemplateRequest., number of items must be less than or equal to 5.'); + } + $this->container['email_bcc'] = $email_bcc; + + return $this; + } + /** * Gets is_sms *