From 0e35eeb8cd8f5d5f580d4ed63062b924c74bdff0 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 7 May 2026 22:33:22 +0000 Subject: [PATCH] feat: add v5.4.0 package updates --- .github/workflows/project.yml | 2 +- api/openapi.yaml | 47 ++++++++++++ docs/BasicNotification.md | 1 + docs/BasicNotificationAllOf.md | 1 + docs/CreateTemplateRequest.md | 1 + docs/Notification.md | 1 + docs/NotificationWithMeta.md | 2 + docs/NotificationWithMetaAllOf.md | 2 + docs/UpdateTemplateRequest.md | 1 + .../client/model/BasicNotification.java | 40 +++++++++- .../client/model/BasicNotificationAllOf.java | 40 +++++++++- .../client/model/CreateTemplateRequest.java | 42 ++++++++++- .../onesignal/client/model/Notification.java | 40 +++++++++- .../client/model/NotificationWithMeta.java | 72 +++++++++++++++++- .../model/NotificationWithMetaAllOf.java | 74 ++++++++++++++++++- .../client/model/UpdateTemplateRequest.java | 42 ++++++++++- 16 files changed, 398 insertions(+), 10 deletions(-) diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 69960fed..e6d46031 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/api/openapi.yaml b/api/openapi.yaml index 85c6d9d0..c3d3cd39 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -3992,6 +3992,12 @@ components: tr: tr name: name isEmail: true + email_bcc: + - email_bcc + - email_bcc + - email_bcc + - email_bcc + - email_bcc headings: de: de hi: hi @@ -4063,6 +4069,14 @@ components: description: Body of the email (HTML supported). nullable: true type: string + email_bcc: + description: BCC recipients for the email template. Maximum 5 addresses. + Only supported when the email service provider is OneSignal Email. + items: + type: string + maxItems: 5 + nullable: true + type: array isSMS: description: Set true for an SMS template. type: boolean @@ -4169,6 +4183,12 @@ components: tr: tr name: name isEmail: true + email_bcc: + - email_bcc + - email_bcc + - email_bcc + - email_bcc + - email_bcc headings: de: de hi: hi @@ -4236,6 +4256,14 @@ components: description: Body of the email (HTML supported). nullable: true type: string + email_bcc: + description: BCC recipients for the email template. Maximum 5 addresses. + Only supported when the email service provider is OneSignal Email. + items: + type: string + maxItems: 5 + nullable: true + type: array isSMS: description: Set true for an SMS template. type: boolean @@ -5368,6 +5396,15 @@ components: \ of unsubscribed emails to be cleared." type: boolean writeOnly: true + email_bcc: + description: "Channel: Email\nBCC recipients for the email. Maximum 5 addresses.\ + \ Only supported when the email service provider is OneSignal Email.\n" + items: + type: string + maxItems: 5 + nullable: true + type: array + writeOnly: true sms_from: description: "Channel: SMS\nPhone Number used to send SMS. Should be a registered\ \ Twilio phone number in E.164 format.\n" @@ -5511,6 +5548,16 @@ components: description: Indicates whether the notification was canceled before it could be sent. type: boolean + email_bcc: + description: BCC recipients that were set on this email notification. + items: + type: string + nullable: true + type: array + bcc_sent: + description: Number of BCC copies successfully sent for this notification. + nullable: true + type: integer type: object PlatformDeliveryData_sms_allOf: properties: diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 9b431ff9..76777bd0 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -112,6 +112,7 @@ |**emailPreheader** | **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] | |**disableEmailClickTracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | |**includeUnsubscribed** | **Boolean** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] | +|**emailBcc** | **List<String>** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] | |**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | |**smsMediaUrls** | **List<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** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] | diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 712406a9..560f138e 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -99,6 +99,7 @@ |**emailPreheader** | **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] | |**disableEmailClickTracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | |**includeUnsubscribed** | **Boolean** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] | +|**emailBcc** | **List<String>** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] | |**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | |**smsMediaUrls** | **List<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** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] | diff --git a/docs/CreateTemplateRequest.md b/docs/CreateTemplateRequest.md index 6bb321a9..7ef38cf0 100644 --- a/docs/CreateTemplateRequest.md +++ b/docs/CreateTemplateRequest.md @@ -15,6 +15,7 @@ |**isEmail** | **Boolean** | Set true for an Email template. | [optional] | |**emailSubject** | **String** | Subject of the email. | [optional] | |**emailBody** | **String** | Body of the email (HTML supported). | [optional] | +|**emailBcc** | **List<String>** | BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] | |**isSMS** | **Boolean** | Set true for an SMS template. | [optional] | |**dynamicContent** | **String** | JSON string for dynamic content personalization. | [optional] | diff --git a/docs/Notification.md b/docs/Notification.md index 695ce0aa..fe9fcd00 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -112,6 +112,7 @@ |**emailPreheader** | **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] | |**disableEmailClickTracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | |**includeUnsubscribed** | **Boolean** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] | +|**emailBcc** | **List<String>** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] | |**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | |**smsMediaUrls** | **List<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** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] | diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 9cf4bd76..bb008dbd 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -112,6 +112,7 @@ |**emailPreheader** | **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] | |**disableEmailClickTracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] | |**includeUnsubscribed** | **Boolean** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] | +|**emailBcc** | **List<String>** | BCC recipients that were set on this email notification. | [optional] | |**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | |**smsMediaUrls** | **List<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** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] | @@ -133,6 +134,7 @@ |**completedAt** | **Long** | Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after. | [optional] | |**platformDeliveryStats** | [**PlatformDeliveryData**](PlatformDeliveryData.md) | | [optional] | |**canceled** | **Boolean** | Indicates whether the notification was canceled before it could be sent. | [optional] | +|**bccSent** | **Integer** | Number of BCC copies successfully sent for this notification. | [optional] | diff --git a/docs/NotificationWithMetaAllOf.md b/docs/NotificationWithMetaAllOf.md index ada71cf2..6cccb610 100644 --- a/docs/NotificationWithMetaAllOf.md +++ b/docs/NotificationWithMetaAllOf.md @@ -19,6 +19,8 @@ |**received** | **Integer** | Confirmed Deliveries number of devices that received the push notification. Paid Feature Only. Free accounts will see 0. | [optional] | |**throttleRatePerMinute** | **Integer** | 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** | **Boolean** | Indicates whether the notification was canceled before it could be sent. | [optional] | +|**emailBcc** | **List<String>** | BCC recipients that were set on this email notification. | [optional] | +|**bccSent** | **Integer** | Number of BCC copies successfully sent for this notification. | [optional] | diff --git a/docs/UpdateTemplateRequest.md b/docs/UpdateTemplateRequest.md index f3e54237..9c775717 100644 --- a/docs/UpdateTemplateRequest.md +++ b/docs/UpdateTemplateRequest.md @@ -14,6 +14,7 @@ |**isEmail** | **Boolean** | Set true for an Email template. | [optional] | |**emailSubject** | **String** | Subject of the email. | [optional] | |**emailBody** | **String** | Body of the email (HTML supported). | [optional] | +|**emailBcc** | **List<String>** | BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] | |**isSMS** | **Boolean** | Set true for an SMS template. | [optional] | |**dynamicContent** | **String** | JSON string for dynamic content personalization. | [optional] | diff --git a/src/main/java/com/onesignal/client/model/BasicNotification.java b/src/main/java/com/onesignal/client/model/BasicNotification.java index fc8dc995..7cf7b47a 100644 --- a/src/main/java/com/onesignal/client/model/BasicNotification.java +++ b/src/main/java/com/onesignal/client/model/BasicNotification.java @@ -581,6 +581,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_INCLUDE_UNSUBSCRIBED) private Boolean includeUnsubscribed; + public static final String SERIALIZED_NAME_EMAIL_BCC = "email_bcc"; + @SerializedName(SERIALIZED_NAME_EMAIL_BCC) + private List emailBcc = null; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -3208,6 +3212,37 @@ public void setIncludeUnsubscribed(Boolean includeUnsubscribed) { } + public BasicNotification emailBcc(List emailBcc) { + + this.emailBcc = emailBcc; + return this; + } + + public BasicNotification addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList<>(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * @return emailBcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. ") + + public List getEmailBcc() { + return emailBcc; + } + + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + public BasicNotification smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3546,6 +3581,7 @@ public boolean equals(Object o) { Objects.equals(this.emailPreheader, basicNotification.emailPreheader) && Objects.equals(this.disableEmailClickTracking, basicNotification.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, basicNotification.includeUnsubscribed) && + Objects.equals(this.emailBcc, basicNotification.emailBcc) && Objects.equals(this.smsFrom, basicNotification.smsFrom) && Objects.equals(this.smsMediaUrls, basicNotification.smsMediaUrls) && Objects.equals(this.filters, basicNotification.filters) && @@ -3563,7 +3599,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel, id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag); + return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel, id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, emailBcc, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag); } private static int hashCodeNullable(JsonNullable a) { @@ -3682,6 +3718,7 @@ public String toString() { sb.append(" emailPreheader: ").append(toIndentedString(emailPreheader)).append("\n"); sb.append(" disableEmailClickTracking: ").append(toIndentedString(disableEmailClickTracking)).append("\n"); sb.append(" includeUnsubscribed: ").append(toIndentedString(includeUnsubscribed)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); sb.append(" smsFrom: ").append(toIndentedString(smsFrom)).append("\n"); sb.append(" smsMediaUrls: ").append(toIndentedString(smsMediaUrls)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); @@ -3818,6 +3855,7 @@ private String toIndentedString(Object o) { openapiFields.add("email_preheader"); openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); + openapiFields.add("email_bcc"); openapiFields.add("sms_from"); openapiFields.add("sms_media_urls"); openapiFields.add("filters"); diff --git a/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java b/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java index 5af02a53..c0f9ca69 100644 --- a/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java +++ b/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java @@ -476,6 +476,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_INCLUDE_UNSUBSCRIBED) private Boolean includeUnsubscribed; + public static final String SERIALIZED_NAME_EMAIL_BCC = "email_bcc"; + @SerializedName(SERIALIZED_NAME_EMAIL_BCC) + private List emailBcc = null; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -2708,6 +2712,37 @@ public void setIncludeUnsubscribed(Boolean includeUnsubscribed) { } + public BasicNotificationAllOf emailBcc(List emailBcc) { + + this.emailBcc = emailBcc; + return this; + } + + public BasicNotificationAllOf addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList<>(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * @return emailBcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. ") + + public List getEmailBcc() { + return emailBcc; + } + + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + public BasicNotificationAllOf smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3033,6 +3068,7 @@ public boolean equals(Object o) { Objects.equals(this.emailPreheader, basicNotificationAllOf.emailPreheader) && Objects.equals(this.disableEmailClickTracking, basicNotificationAllOf.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, basicNotificationAllOf.includeUnsubscribed) && + Objects.equals(this.emailBcc, basicNotificationAllOf.emailBcc) && Objects.equals(this.smsFrom, basicNotificationAllOf.smsFrom) && Objects.equals(this.smsMediaUrls, basicNotificationAllOf.smsMediaUrls) && Objects.equals(this.filters, basicNotificationAllOf.filters) && @@ -3050,7 +3086,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag); + return Objects.hash(id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, emailBcc, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag); } private static int hashCodeNullable(JsonNullable a) { @@ -3156,6 +3192,7 @@ public String toString() { sb.append(" emailPreheader: ").append(toIndentedString(emailPreheader)).append("\n"); sb.append(" disableEmailClickTracking: ").append(toIndentedString(disableEmailClickTracking)).append("\n"); sb.append(" includeUnsubscribed: ").append(toIndentedString(includeUnsubscribed)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); sb.append(" smsFrom: ").append(toIndentedString(smsFrom)).append("\n"); sb.append(" smsMediaUrls: ").append(toIndentedString(smsMediaUrls)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); @@ -3279,6 +3316,7 @@ private String toIndentedString(Object o) { openapiFields.add("email_preheader"); openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); + openapiFields.add("email_bcc"); openapiFields.add("sms_from"); openapiFields.add("sms_media_urls"); openapiFields.add("filters"); diff --git a/src/main/java/com/onesignal/client/model/CreateTemplateRequest.java b/src/main/java/com/onesignal/client/model/CreateTemplateRequest.java index 2a5672f6..6e526a37 100644 --- a/src/main/java/com/onesignal/client/model/CreateTemplateRequest.java +++ b/src/main/java/com/onesignal/client/model/CreateTemplateRequest.java @@ -24,6 +24,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import java.io.Serializable; @@ -86,6 +88,10 @@ public class CreateTemplateRequest { @SerializedName(SERIALIZED_NAME_EMAIL_BODY) private String emailBody; + public static final String SERIALIZED_NAME_EMAIL_BCC = "email_bcc"; + @SerializedName(SERIALIZED_NAME_EMAIL_BCC) + private List emailBcc = null; + public static final String SERIALIZED_NAME_IS_S_M_S = "isSMS"; @SerializedName(SERIALIZED_NAME_IS_S_M_S) private Boolean isSMS; @@ -281,6 +287,37 @@ public void setEmailBody(String emailBody) { } + public CreateTemplateRequest emailBcc(List emailBcc) { + + this.emailBcc = emailBcc; + return this; + } + + public CreateTemplateRequest addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList<>(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * @return emailBcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email.") + + public List getEmailBcc() { + return emailBcc; + } + + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + public CreateTemplateRequest isSMS(Boolean isSMS) { this.isSMS = isSMS; @@ -345,6 +382,7 @@ public boolean equals(Object o) { Objects.equals(this.isEmail, createTemplateRequest.isEmail) && Objects.equals(this.emailSubject, createTemplateRequest.emailSubject) && Objects.equals(this.emailBody, createTemplateRequest.emailBody) && + Objects.equals(this.emailBcc, createTemplateRequest.emailBcc) && Objects.equals(this.isSMS, createTemplateRequest.isSMS) && Objects.equals(this.dynamicContent, createTemplateRequest.dynamicContent); } @@ -355,7 +393,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(appId, name, contents, headings, subtitle, isEmail, emailSubject, emailBody, isSMS, dynamicContent); + return Objects.hash(appId, name, contents, headings, subtitle, isEmail, emailSubject, emailBody, emailBcc, isSMS, dynamicContent); } private static int hashCodeNullable(JsonNullable a) { @@ -377,6 +415,7 @@ public String toString() { sb.append(" isEmail: ").append(toIndentedString(isEmail)).append("\n"); sb.append(" emailSubject: ").append(toIndentedString(emailSubject)).append("\n"); sb.append(" emailBody: ").append(toIndentedString(emailBody)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); sb.append(" isSMS: ").append(toIndentedString(isSMS)).append("\n"); sb.append(" dynamicContent: ").append(toIndentedString(dynamicContent)).append("\n"); sb.append("}"); @@ -409,6 +448,7 @@ private String toIndentedString(Object o) { openapiFields.add("isEmail"); openapiFields.add("email_subject"); openapiFields.add("email_body"); + openapiFields.add("email_bcc"); openapiFields.add("isSMS"); openapiFields.add("dynamic_content"); diff --git a/src/main/java/com/onesignal/client/model/Notification.java b/src/main/java/com/onesignal/client/model/Notification.java index a026b7de..9d80ecb0 100644 --- a/src/main/java/com/onesignal/client/model/Notification.java +++ b/src/main/java/com/onesignal/client/model/Notification.java @@ -582,6 +582,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_INCLUDE_UNSUBSCRIBED) private Boolean includeUnsubscribed; + public static final String SERIALIZED_NAME_EMAIL_BCC = "email_bcc"; + @SerializedName(SERIALIZED_NAME_EMAIL_BCC) + private List emailBcc = null; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -3213,6 +3217,37 @@ public void setIncludeUnsubscribed(Boolean includeUnsubscribed) { } + public Notification emailBcc(List emailBcc) { + + this.emailBcc = emailBcc; + return this; + } + + public Notification addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList<>(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * @return emailBcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. ") + + public List getEmailBcc() { + return emailBcc; + } + + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + public Notification smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3574,6 +3609,7 @@ public boolean equals(Object o) { Objects.equals(this.emailPreheader, notification.emailPreheader) && Objects.equals(this.disableEmailClickTracking, notification.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, notification.includeUnsubscribed) && + Objects.equals(this.emailBcc, notification.emailBcc) && Objects.equals(this.smsFrom, notification.smsFrom) && Objects.equals(this.smsMediaUrls, notification.smsMediaUrls) && Objects.equals(this.filters, notification.filters) && @@ -3592,7 +3628,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel, id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag, sendAfter); + return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel, id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, emailBcc, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag, sendAfter); } private static int hashCodeNullable(JsonNullable a) { @@ -3711,6 +3747,7 @@ public String toString() { sb.append(" emailPreheader: ").append(toIndentedString(emailPreheader)).append("\n"); sb.append(" disableEmailClickTracking: ").append(toIndentedString(disableEmailClickTracking)).append("\n"); sb.append(" includeUnsubscribed: ").append(toIndentedString(includeUnsubscribed)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); sb.append(" smsFrom: ").append(toIndentedString(smsFrom)).append("\n"); sb.append(" smsMediaUrls: ").append(toIndentedString(smsMediaUrls)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); @@ -3848,6 +3885,7 @@ private String toIndentedString(Object o) { openapiFields.add("email_preheader"); openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); + openapiFields.add("email_bcc"); openapiFields.add("sms_from"); openapiFields.add("sms_media_urls"); openapiFields.add("filters"); diff --git a/src/main/java/com/onesignal/client/model/NotificationWithMeta.java b/src/main/java/com/onesignal/client/model/NotificationWithMeta.java index 1e9a5029..4cabfc18 100644 --- a/src/main/java/com/onesignal/client/model/NotificationWithMeta.java +++ b/src/main/java/com/onesignal/client/model/NotificationWithMeta.java @@ -585,6 +585,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_INCLUDE_UNSUBSCRIBED) private Boolean includeUnsubscribed; + public static final String SERIALIZED_NAME_EMAIL_BCC = "email_bcc"; + @SerializedName(SERIALIZED_NAME_EMAIL_BCC) + private List emailBcc = null; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -736,6 +740,10 @@ public HuaweiCategoryEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_CANCELED) private Boolean canceled; + public static final String SERIALIZED_NAME_BCC_SENT = "bcc_sent"; + @SerializedName(SERIALIZED_NAME_BCC_SENT) + private Integer bccSent; + public NotificationWithMeta() { } @@ -3260,6 +3268,37 @@ public void setIncludeUnsubscribed(Boolean includeUnsubscribed) { } + public NotificationWithMeta emailBcc(List emailBcc) { + + this.emailBcc = emailBcc; + return this; + } + + public NotificationWithMeta addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList<>(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * BCC recipients that were set on this email notification. + * @return emailBcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "BCC recipients that were set on this email notification.") + + public List getEmailBcc() { + return emailBcc; + } + + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + public NotificationWithMeta smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3767,6 +3806,29 @@ public void setCanceled(Boolean canceled) { } + public NotificationWithMeta bccSent(Integer bccSent) { + + this.bccSent = bccSent; + return this; + } + + /** + * Number of BCC copies successfully sent for this notification. + * @return bccSent + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Number of BCC copies successfully sent for this notification.") + + public Integer getBccSent() { + return bccSent; + } + + + public void setBccSent(Integer bccSent) { + this.bccSent = bccSent; + } + + @Override public boolean equals(Object o) { @@ -3882,6 +3944,7 @@ public boolean equals(Object o) { Objects.equals(this.emailPreheader, notificationWithMeta.emailPreheader) && Objects.equals(this.disableEmailClickTracking, notificationWithMeta.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, notificationWithMeta.includeUnsubscribed) && + Objects.equals(this.emailBcc, notificationWithMeta.emailBcc) && Objects.equals(this.smsFrom, notificationWithMeta.smsFrom) && Objects.equals(this.smsMediaUrls, notificationWithMeta.smsMediaUrls) && Objects.equals(this.filters, notificationWithMeta.filters) && @@ -3902,7 +3965,8 @@ public boolean equals(Object o) { Objects.equals(this.sendAfter, notificationWithMeta.sendAfter) && Objects.equals(this.completedAt, notificationWithMeta.completedAt) && Objects.equals(this.platformDeliveryStats, notificationWithMeta.platformDeliveryStats) && - Objects.equals(this.canceled, notificationWithMeta.canceled); + Objects.equals(this.canceled, notificationWithMeta.canceled) && + Objects.equals(this.bccSent, notificationWithMeta.bccSent); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -3911,7 +3975,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel, id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag, successful, failed, errored, converted, received, outcomes, remaining, queuedAt, sendAfter, completedAt, platformDeliveryStats, canceled); + return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel, id, value, name, aggregation, isIos, isAndroid, isHuawei, isAnyWeb, isChromeWeb, isFirefox, isSafari, isWPWNS, isAdm, isChrome, appId, externalId, idempotencyKey, contents, headings, subtitle, data, huaweiMsgType, url, webUrl, appUrl, iosAttachments, templateId, contentAvailable, mutableContent, targetContentIdentifier, bigPicture, huaweiBigPicture, admBigPicture, chromeBigPicture, chromeWebImage, buttons, webButtons, iosCategory, androidChannelId, huaweiChannelId, existingAndroidChannelId, huaweiExistingChannelId, androidBackgroundLayout, smallIcon, huaweiSmallIcon, largeIcon, huaweiLargeIcon, admSmallIcon, admLargeIcon, chromeWebIcon, chromeWebBadge, firefoxIcon, chromeIcon, iosSound, androidSound, huaweiSound, admSound, wpWnsSound, androidLedColor, huaweiLedColor, androidAccentColor, huaweiAccentColor, androidVisibility, huaweiVisibility, iosBadgeType, iosBadgeCount, collapseId, webPushTopic, apnsAlert, delayedOption, deliveryTimeOfDay, ttl, priority, apnsPushTypeOverride, throttleRatePerMinute, androidGroup, androidGroupMessage, admGroup, admGroupMessage, threadId, summaryArg, summaryArgCount, iosRelevanceScore, iosInterruptionLevel, emailSubject, emailBody, emailFromName, emailFromAddress, emailReplyToAddress, emailPreheader, disableEmailClickTracking, includeUnsubscribed, emailBcc, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag, successful, failed, errored, converted, received, outcomes, remaining, queuedAt, sendAfter, completedAt, platformDeliveryStats, canceled, bccSent); } private static int hashCodeNullable(JsonNullable a) { @@ -4030,6 +4094,7 @@ public String toString() { sb.append(" emailPreheader: ").append(toIndentedString(emailPreheader)).append("\n"); sb.append(" disableEmailClickTracking: ").append(toIndentedString(disableEmailClickTracking)).append("\n"); sb.append(" includeUnsubscribed: ").append(toIndentedString(includeUnsubscribed)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); sb.append(" smsFrom: ").append(toIndentedString(smsFrom)).append("\n"); sb.append(" smsMediaUrls: ").append(toIndentedString(smsMediaUrls)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); @@ -4051,6 +4116,7 @@ public String toString() { sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); sb.append(" platformDeliveryStats: ").append(toIndentedString(platformDeliveryStats)).append("\n"); sb.append(" canceled: ").append(toIndentedString(canceled)).append("\n"); + sb.append(" bccSent: ").append(toIndentedString(bccSent)).append("\n"); sb.append("}"); return sb.toString(); } @@ -4178,6 +4244,7 @@ private String toIndentedString(Object o) { openapiFields.add("email_preheader"); openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); + openapiFields.add("email_bcc"); openapiFields.add("sms_from"); openapiFields.add("sms_media_urls"); openapiFields.add("filters"); @@ -4199,6 +4266,7 @@ private String toIndentedString(Object o) { openapiFields.add("completed_at"); openapiFields.add("platform_delivery_stats"); openapiFields.add("canceled"); + openapiFields.add("bcc_sent"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/com/onesignal/client/model/NotificationWithMetaAllOf.java b/src/main/java/com/onesignal/client/model/NotificationWithMetaAllOf.java index 26db1f1f..10473a16 100644 --- a/src/main/java/com/onesignal/client/model/NotificationWithMetaAllOf.java +++ b/src/main/java/com/onesignal/client/model/NotificationWithMetaAllOf.java @@ -24,6 +24,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import java.io.Serializable; @@ -102,6 +104,14 @@ public class NotificationWithMetaAllOf { @SerializedName(SERIALIZED_NAME_CANCELED) private Boolean canceled; + public static final String SERIALIZED_NAME_EMAIL_BCC = "email_bcc"; + @SerializedName(SERIALIZED_NAME_EMAIL_BCC) + private List emailBcc = null; + + public static final String SERIALIZED_NAME_BCC_SENT = "bcc_sent"; + @SerializedName(SERIALIZED_NAME_BCC_SENT) + private Integer bccSent; + public NotificationWithMetaAllOf() { } @@ -381,6 +391,60 @@ public void setCanceled(Boolean canceled) { } + public NotificationWithMetaAllOf emailBcc(List emailBcc) { + + this.emailBcc = emailBcc; + return this; + } + + public NotificationWithMetaAllOf addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList<>(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * BCC recipients that were set on this email notification. + * @return emailBcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "BCC recipients that were set on this email notification.") + + public List getEmailBcc() { + return emailBcc; + } + + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + + public NotificationWithMetaAllOf bccSent(Integer bccSent) { + + this.bccSent = bccSent; + return this; + } + + /** + * Number of BCC copies successfully sent for this notification. + * @return bccSent + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Number of BCC copies successfully sent for this notification.") + + public Integer getBccSent() { + return bccSent; + } + + + public void setBccSent(Integer bccSent) { + this.bccSent = bccSent; + } + + @Override public boolean equals(Object o) { @@ -402,7 +466,9 @@ public boolean equals(Object o) { Objects.equals(this.platformDeliveryStats, notificationWithMetaAllOf.platformDeliveryStats) && Objects.equals(this.received, notificationWithMetaAllOf.received) && Objects.equals(this.throttleRatePerMinute, notificationWithMetaAllOf.throttleRatePerMinute) && - Objects.equals(this.canceled, notificationWithMetaAllOf.canceled); + Objects.equals(this.canceled, notificationWithMetaAllOf.canceled) && + Objects.equals(this.emailBcc, notificationWithMetaAllOf.emailBcc) && + Objects.equals(this.bccSent, notificationWithMetaAllOf.bccSent); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -411,7 +477,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(remaining, successful, failed, errored, converted, queuedAt, sendAfter, completedAt, platformDeliveryStats, received, throttleRatePerMinute, canceled); + return Objects.hash(remaining, successful, failed, errored, converted, queuedAt, sendAfter, completedAt, platformDeliveryStats, received, throttleRatePerMinute, canceled, emailBcc, bccSent); } private static int hashCodeNullable(JsonNullable a) { @@ -437,6 +503,8 @@ public String toString() { sb.append(" received: ").append(toIndentedString(received)).append("\n"); sb.append(" throttleRatePerMinute: ").append(toIndentedString(throttleRatePerMinute)).append("\n"); sb.append(" canceled: ").append(toIndentedString(canceled)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); + sb.append(" bccSent: ").append(toIndentedString(bccSent)).append("\n"); sb.append("}"); return sb.toString(); } @@ -471,6 +539,8 @@ private String toIndentedString(Object o) { openapiFields.add("received"); openapiFields.add("throttle_rate_per_minute"); openapiFields.add("canceled"); + openapiFields.add("email_bcc"); + openapiFields.add("bcc_sent"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/com/onesignal/client/model/UpdateTemplateRequest.java b/src/main/java/com/onesignal/client/model/UpdateTemplateRequest.java index 1f199f3a..10f13cef 100644 --- a/src/main/java/com/onesignal/client/model/UpdateTemplateRequest.java +++ b/src/main/java/com/onesignal/client/model/UpdateTemplateRequest.java @@ -24,6 +24,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import java.io.Serializable; @@ -82,6 +84,10 @@ public class UpdateTemplateRequest { @SerializedName(SERIALIZED_NAME_EMAIL_BODY) private String emailBody; + public static final String SERIALIZED_NAME_EMAIL_BCC = "email_bcc"; + @SerializedName(SERIALIZED_NAME_EMAIL_BCC) + private List emailBcc = null; + public static final String SERIALIZED_NAME_IS_S_M_S = "isSMS"; @SerializedName(SERIALIZED_NAME_IS_S_M_S) private Boolean isSMS; @@ -254,6 +260,37 @@ public void setEmailBody(String emailBody) { } + public UpdateTemplateRequest emailBcc(List emailBcc) { + + this.emailBcc = emailBcc; + return this; + } + + public UpdateTemplateRequest addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList<>(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. + * @return emailBcc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email.") + + public List getEmailBcc() { + return emailBcc; + } + + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + public UpdateTemplateRequest isSMS(Boolean isSMS) { this.isSMS = isSMS; @@ -317,6 +354,7 @@ public boolean equals(Object o) { Objects.equals(this.isEmail, updateTemplateRequest.isEmail) && Objects.equals(this.emailSubject, updateTemplateRequest.emailSubject) && Objects.equals(this.emailBody, updateTemplateRequest.emailBody) && + Objects.equals(this.emailBcc, updateTemplateRequest.emailBcc) && Objects.equals(this.isSMS, updateTemplateRequest.isSMS) && Objects.equals(this.dynamicContent, updateTemplateRequest.dynamicContent); } @@ -327,7 +365,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, contents, headings, subtitle, isEmail, emailSubject, emailBody, isSMS, dynamicContent); + return Objects.hash(name, contents, headings, subtitle, isEmail, emailSubject, emailBody, emailBcc, isSMS, dynamicContent); } private static int hashCodeNullable(JsonNullable a) { @@ -348,6 +386,7 @@ public String toString() { sb.append(" isEmail: ").append(toIndentedString(isEmail)).append("\n"); sb.append(" emailSubject: ").append(toIndentedString(emailSubject)).append("\n"); sb.append(" emailBody: ").append(toIndentedString(emailBody)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); sb.append(" isSMS: ").append(toIndentedString(isSMS)).append("\n"); sb.append(" dynamicContent: ").append(toIndentedString(dynamicContent)).append("\n"); sb.append("}"); @@ -379,6 +418,7 @@ private String toIndentedString(Object o) { openapiFields.add("isEmail"); openapiFields.add("email_subject"); openapiFields.add("email_body"); + openapiFields.add("email_bcc"); openapiFields.add("isSMS"); openapiFields.add("dynamic_content");