diff --git a/api/openapi.yaml b/api/openapi.yaml index d52a307..43cb5a6 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2580,10 +2580,19 @@ components: nullable: true type: array include_email_tokens: - description: "Recommended for Sending Emails - Target specific email addresses.\n\ - If an email does not correspond to an existing user, a new user will be\ - \ created.\nExample: nick@catfac.ts\nLimit of 2,000 entries per REST API\ - \ call\n" + deprecated: true + description: "Deprecated alias for `email_to`. Target specific email addresses.\ + \ If an email does not correspond to an existing user, a new user will\ + \ be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST\ + \ API call. Prefer `email_to` in new integrations.\n" + items: + type: string + type: array + email_to: + description: "Recommended for Sending Emails - Target specific email addresses.\ + \ If an email does not correspond to an existing user, a new user will\ + \ be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST\ + \ API call. Supersedes the deprecated `include_email_tokens` field.\n" items: type: string type: array @@ -5405,6 +5414,13 @@ components: nullable: true type: array writeOnly: true + email_sender_domain: + description: "Channel: Email\nSender domain to use for the email message.\ + \ Overrides the default sender domain configured for the app. Only supported\ + \ when the email service provider is OneSignal Email.\n" + nullable: true + type: string + 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" diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 76777bd..7bc341e 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -10,7 +10,8 @@ |**includedSegments** | **List<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**excludedSegments** | **List<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**includeSubscriptionIds** | **List<String>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] | -|**includeEmailTokens** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] | +|**includeEmailTokens** | **List<String>** | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] | +|**emailTo** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] | |**includePhoneNumbers** | **List<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] | |**includeIosTokens** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] | |**includeWpWnsUris** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] | @@ -113,6 +114,7 @@ |**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] | +|**emailSenderDomain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] | |**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 560f138..4c3454b 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -100,6 +100,7 @@ |**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] | +|**emailSenderDomain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] | |**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/Notification.md b/docs/Notification.md index fe9fcd0..5e59357 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -10,7 +10,8 @@ |**includedSegments** | **List<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**excludedSegments** | **List<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**includeSubscriptionIds** | **List<String>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] | -|**includeEmailTokens** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] | +|**includeEmailTokens** | **List<String>** | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] | +|**emailTo** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] | |**includePhoneNumbers** | **List<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] | |**includeIosTokens** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] | |**includeWpWnsUris** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] | @@ -113,6 +114,7 @@ |**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] | +|**emailSenderDomain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] | |**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/NotificationTarget.md b/docs/NotificationTarget.md index 87eb7a6..db4e8cd 100644 --- a/docs/NotificationTarget.md +++ b/docs/NotificationTarget.md @@ -10,7 +10,8 @@ |**includedSegments** | **List<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**excludedSegments** | **List<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**includeSubscriptionIds** | **List<String>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] | -|**includeEmailTokens** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] | +|**includeEmailTokens** | **List<String>** | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] | +|**emailTo** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] | |**includePhoneNumbers** | **List<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] | |**includeIosTokens** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] | |**includeWpWnsUris** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] | diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index bb008db..c410f93 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -10,7 +10,8 @@ |**includedSegments** | **List<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**excludedSegments** | **List<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | |**includeSubscriptionIds** | **List<String>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] | -|**includeEmailTokens** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] | +|**includeEmailTokens** | **List<String>** | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] | +|**emailTo** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] | |**includePhoneNumbers** | **List<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] | |**includeIosTokens** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] | |**includeWpWnsUris** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] | @@ -113,6 +114,7 @@ |**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] | +|**emailSenderDomain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] | |**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/SubscriptionNotificationTarget.md b/docs/SubscriptionNotificationTarget.md index f114963..e81e5ef 100644 --- a/docs/SubscriptionNotificationTarget.md +++ b/docs/SubscriptionNotificationTarget.md @@ -8,7 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**includeSubscriptionIds** | **List<String>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] | -|**includeEmailTokens** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] | +|**includeEmailTokens** | **List<String>** | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] | +|**emailTo** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] | |**includePhoneNumbers** | **List<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] | |**includeIosTokens** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] | |**includeWpWnsUris** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] | diff --git a/src/main/java/com/onesignal/client/model/BasicNotification.java b/src/main/java/com/onesignal/client/model/BasicNotification.java index c7ed3de..bdf6673 100644 --- a/src/main/java/com/onesignal/client/model/BasicNotification.java +++ b/src/main/java/com/onesignal/client/model/BasicNotification.java @@ -81,6 +81,10 @@ public class BasicNotification { @SerializedName(SERIALIZED_NAME_INCLUDE_EMAIL_TOKENS) private List includeEmailTokens = null; + public static final String SERIALIZED_NAME_EMAIL_TO = "email_to"; + @SerializedName(SERIALIZED_NAME_EMAIL_TO) + private List emailTo = null; + public static final String SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS = "include_phone_numbers"; @SerializedName(SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS) private List includePhoneNumbers = null; @@ -585,6 +589,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_EMAIL_BCC) private List emailBcc = null; + public static final String SERIALIZED_NAME_EMAIL_SENDER_DOMAIN = "email_sender_domain"; + @SerializedName(SERIALIZED_NAME_EMAIL_SENDER_DOMAIN) + private String emailSenderDomain; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -809,11 +817,13 @@ public BasicNotification addIncludeEmailTokensItem(String includeEmailTokensItem } /** - * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + * Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. * @return includeEmailTokens + * @deprecated **/ + @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call ") + @ApiModelProperty(value = "Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. ") public List getIncludeEmailTokens() { return includeEmailTokens; @@ -825,6 +835,37 @@ public void setIncludeEmailTokens(List includeEmailTokens) { } + public BasicNotification emailTo(List emailTo) { + + this.emailTo = emailTo; + return this; + } + + public BasicNotification addEmailToItem(String emailToItem) { + if (this.emailTo == null) { + this.emailTo = new ArrayList<>(); + } + this.emailTo.add(emailToItem); + return this; + } + + /** + * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + * @return emailTo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. ") + + public List getEmailTo() { + return emailTo; + } + + + public void setEmailTo(List emailTo) { + this.emailTo = emailTo; + } + + public BasicNotification includePhoneNumbers(List includePhoneNumbers) { this.includePhoneNumbers = includePhoneNumbers; @@ -3243,6 +3284,29 @@ public void setEmailBcc(List emailBcc) { } + public BasicNotification emailSenderDomain(String emailSenderDomain) { + + this.emailSenderDomain = emailSenderDomain; + return this; + } + + /** + * Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + * @return emailSenderDomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. ") + + public String getEmailSenderDomain() { + return emailSenderDomain; + } + + + public void setEmailSenderDomain(String emailSenderDomain) { + this.emailSenderDomain = emailSenderDomain; + } + + public BasicNotification smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3480,6 +3544,7 @@ public boolean equals(Object o) { Objects.equals(this.excludedSegments, basicNotification.excludedSegments) && Objects.equals(this.includeSubscriptionIds, basicNotification.includeSubscriptionIds) && Objects.equals(this.includeEmailTokens, basicNotification.includeEmailTokens) && + Objects.equals(this.emailTo, basicNotification.emailTo) && Objects.equals(this.includePhoneNumbers, basicNotification.includePhoneNumbers) && Objects.equals(this.includeIosTokens, basicNotification.includeIosTokens) && Objects.equals(this.includeWpWnsUris, basicNotification.includeWpWnsUris) && @@ -3582,6 +3647,7 @@ public boolean equals(Object o) { Objects.equals(this.disableEmailClickTracking, basicNotification.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, basicNotification.includeUnsubscribed) && Objects.equals(this.emailBcc, basicNotification.emailBcc) && + Objects.equals(this.emailSenderDomain, basicNotification.emailSenderDomain) && Objects.equals(this.smsFrom, basicNotification.smsFrom) && Objects.equals(this.smsMediaUrls, basicNotification.smsMediaUrls) && Objects.equals(this.filters, basicNotification.filters) && @@ -3599,7 +3665,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, emailBcc, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag); + return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, emailTo, 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, emailSenderDomain, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag); } private static int hashCodeNullable(JsonNullable a) { @@ -3617,6 +3683,7 @@ public String toString() { sb.append(" excludedSegments: ").append(toIndentedString(excludedSegments)).append("\n"); sb.append(" includeSubscriptionIds: ").append(toIndentedString(includeSubscriptionIds)).append("\n"); sb.append(" includeEmailTokens: ").append(toIndentedString(includeEmailTokens)).append("\n"); + sb.append(" emailTo: ").append(toIndentedString(emailTo)).append("\n"); sb.append(" includePhoneNumbers: ").append(toIndentedString(includePhoneNumbers)).append("\n"); sb.append(" includeIosTokens: ").append(toIndentedString(includeIosTokens)).append("\n"); sb.append(" includeWpWnsUris: ").append(toIndentedString(includeWpWnsUris)).append("\n"); @@ -3719,6 +3786,7 @@ public String toString() { 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(" emailSenderDomain: ").append(toIndentedString(emailSenderDomain)).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"); @@ -3754,6 +3822,7 @@ private String toIndentedString(Object o) { openapiFields.add("excluded_segments"); openapiFields.add("include_subscription_ids"); openapiFields.add("include_email_tokens"); + openapiFields.add("email_to"); openapiFields.add("include_phone_numbers"); openapiFields.add("include_ios_tokens"); openapiFields.add("include_wp_wns_uris"); @@ -3856,6 +3925,7 @@ private String toIndentedString(Object o) { openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); openapiFields.add("email_bcc"); + openapiFields.add("email_sender_domain"); 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 99ea10f..ad0bcfa 100644 --- a/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java +++ b/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java @@ -480,6 +480,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_EMAIL_BCC) private List emailBcc = null; + public static final String SERIALIZED_NAME_EMAIL_SENDER_DOMAIN = "email_sender_domain"; + @SerializedName(SERIALIZED_NAME_EMAIL_SENDER_DOMAIN) + private String emailSenderDomain; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -2743,6 +2747,29 @@ public void setEmailBcc(List emailBcc) { } + public BasicNotificationAllOf emailSenderDomain(String emailSenderDomain) { + + this.emailSenderDomain = emailSenderDomain; + return this; + } + + /** + * Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + * @return emailSenderDomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. ") + + public String getEmailSenderDomain() { + return emailSenderDomain; + } + + + public void setEmailSenderDomain(String emailSenderDomain) { + this.emailSenderDomain = emailSenderDomain; + } + + public BasicNotificationAllOf smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3069,6 +3096,7 @@ public boolean equals(Object o) { Objects.equals(this.disableEmailClickTracking, basicNotificationAllOf.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, basicNotificationAllOf.includeUnsubscribed) && Objects.equals(this.emailBcc, basicNotificationAllOf.emailBcc) && + Objects.equals(this.emailSenderDomain, basicNotificationAllOf.emailSenderDomain) && Objects.equals(this.smsFrom, basicNotificationAllOf.smsFrom) && Objects.equals(this.smsMediaUrls, basicNotificationAllOf.smsMediaUrls) && Objects.equals(this.filters, basicNotificationAllOf.filters) && @@ -3086,7 +3114,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, emailBcc, 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, emailSenderDomain, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag); } private static int hashCodeNullable(JsonNullable a) { @@ -3193,6 +3221,7 @@ public String toString() { 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(" emailSenderDomain: ").append(toIndentedString(emailSenderDomain)).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"); @@ -3317,6 +3346,7 @@ private String toIndentedString(Object o) { openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); openapiFields.add("email_bcc"); + openapiFields.add("email_sender_domain"); openapiFields.add("sms_from"); openapiFields.add("sms_media_urls"); openapiFields.add("filters"); diff --git a/src/main/java/com/onesignal/client/model/Notification.java b/src/main/java/com/onesignal/client/model/Notification.java index 39ace2a..6e569f2 100644 --- a/src/main/java/com/onesignal/client/model/Notification.java +++ b/src/main/java/com/onesignal/client/model/Notification.java @@ -82,6 +82,10 @@ public class Notification { @SerializedName(SERIALIZED_NAME_INCLUDE_EMAIL_TOKENS) private List includeEmailTokens = null; + public static final String SERIALIZED_NAME_EMAIL_TO = "email_to"; + @SerializedName(SERIALIZED_NAME_EMAIL_TO) + private List emailTo = null; + public static final String SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS = "include_phone_numbers"; @SerializedName(SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS) private List includePhoneNumbers = null; @@ -586,6 +590,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_EMAIL_BCC) private List emailBcc = null; + public static final String SERIALIZED_NAME_EMAIL_SENDER_DOMAIN = "email_sender_domain"; + @SerializedName(SERIALIZED_NAME_EMAIL_SENDER_DOMAIN) + private String emailSenderDomain; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -814,11 +822,13 @@ public Notification addIncludeEmailTokensItem(String includeEmailTokensItem) { } /** - * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + * Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. * @return includeEmailTokens + * @deprecated **/ + @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call ") + @ApiModelProperty(value = "Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. ") public List getIncludeEmailTokens() { return includeEmailTokens; @@ -830,6 +840,37 @@ public void setIncludeEmailTokens(List includeEmailTokens) { } + public Notification emailTo(List emailTo) { + + this.emailTo = emailTo; + return this; + } + + public Notification addEmailToItem(String emailToItem) { + if (this.emailTo == null) { + this.emailTo = new ArrayList<>(); + } + this.emailTo.add(emailToItem); + return this; + } + + /** + * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + * @return emailTo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. ") + + public List getEmailTo() { + return emailTo; + } + + + public void setEmailTo(List emailTo) { + this.emailTo = emailTo; + } + + public Notification includePhoneNumbers(List includePhoneNumbers) { this.includePhoneNumbers = includePhoneNumbers; @@ -3248,6 +3289,29 @@ public void setEmailBcc(List emailBcc) { } + public Notification emailSenderDomain(String emailSenderDomain) { + + this.emailSenderDomain = emailSenderDomain; + return this; + } + + /** + * Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + * @return emailSenderDomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. ") + + public String getEmailSenderDomain() { + return emailSenderDomain; + } + + + public void setEmailSenderDomain(String emailSenderDomain) { + this.emailSenderDomain = emailSenderDomain; + } + + public Notification smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3508,6 +3572,7 @@ public boolean equals(Object o) { Objects.equals(this.excludedSegments, notification.excludedSegments) && Objects.equals(this.includeSubscriptionIds, notification.includeSubscriptionIds) && Objects.equals(this.includeEmailTokens, notification.includeEmailTokens) && + Objects.equals(this.emailTo, notification.emailTo) && Objects.equals(this.includePhoneNumbers, notification.includePhoneNumbers) && Objects.equals(this.includeIosTokens, notification.includeIosTokens) && Objects.equals(this.includeWpWnsUris, notification.includeWpWnsUris) && @@ -3610,6 +3675,7 @@ public boolean equals(Object o) { Objects.equals(this.disableEmailClickTracking, notification.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, notification.includeUnsubscribed) && Objects.equals(this.emailBcc, notification.emailBcc) && + Objects.equals(this.emailSenderDomain, notification.emailSenderDomain) && Objects.equals(this.smsFrom, notification.smsFrom) && Objects.equals(this.smsMediaUrls, notification.smsMediaUrls) && Objects.equals(this.filters, notification.filters) && @@ -3628,7 +3694,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, emailBcc, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag, sendAfter); + return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, emailTo, 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, emailSenderDomain, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag, sendAfter); } private static int hashCodeNullable(JsonNullable a) { @@ -3646,6 +3712,7 @@ public String toString() { sb.append(" excludedSegments: ").append(toIndentedString(excludedSegments)).append("\n"); sb.append(" includeSubscriptionIds: ").append(toIndentedString(includeSubscriptionIds)).append("\n"); sb.append(" includeEmailTokens: ").append(toIndentedString(includeEmailTokens)).append("\n"); + sb.append(" emailTo: ").append(toIndentedString(emailTo)).append("\n"); sb.append(" includePhoneNumbers: ").append(toIndentedString(includePhoneNumbers)).append("\n"); sb.append(" includeIosTokens: ").append(toIndentedString(includeIosTokens)).append("\n"); sb.append(" includeWpWnsUris: ").append(toIndentedString(includeWpWnsUris)).append("\n"); @@ -3748,6 +3815,7 @@ public String toString() { 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(" emailSenderDomain: ").append(toIndentedString(emailSenderDomain)).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"); @@ -3784,6 +3852,7 @@ private String toIndentedString(Object o) { openapiFields.add("excluded_segments"); openapiFields.add("include_subscription_ids"); openapiFields.add("include_email_tokens"); + openapiFields.add("email_to"); openapiFields.add("include_phone_numbers"); openapiFields.add("include_ios_tokens"); openapiFields.add("include_wp_wns_uris"); @@ -3886,6 +3955,7 @@ private String toIndentedString(Object o) { openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); openapiFields.add("email_bcc"); + openapiFields.add("email_sender_domain"); 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 cf81154..63fa512 100644 --- a/src/main/java/com/onesignal/client/model/NotificationWithMeta.java +++ b/src/main/java/com/onesignal/client/model/NotificationWithMeta.java @@ -85,6 +85,10 @@ public class NotificationWithMeta { @SerializedName(SERIALIZED_NAME_INCLUDE_EMAIL_TOKENS) private List includeEmailTokens = null; + public static final String SERIALIZED_NAME_EMAIL_TO = "email_to"; + @SerializedName(SERIALIZED_NAME_EMAIL_TO) + private List emailTo = null; + public static final String SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS = "include_phone_numbers"; @SerializedName(SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS) private List includePhoneNumbers = null; @@ -589,6 +593,10 @@ public AggregationEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_EMAIL_BCC) private List emailBcc = null; + public static final String SERIALIZED_NAME_EMAIL_SENDER_DOMAIN = "email_sender_domain"; + @SerializedName(SERIALIZED_NAME_EMAIL_SENDER_DOMAIN) + private String emailSenderDomain; + public static final String SERIALIZED_NAME_SMS_FROM = "sms_from"; @SerializedName(SERIALIZED_NAME_SMS_FROM) private String smsFrom; @@ -865,11 +873,13 @@ public NotificationWithMeta addIncludeEmailTokensItem(String includeEmailTokensI } /** - * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + * Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. * @return includeEmailTokens + * @deprecated **/ + @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call ") + @ApiModelProperty(value = "Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. ") public List getIncludeEmailTokens() { return includeEmailTokens; @@ -881,6 +891,37 @@ public void setIncludeEmailTokens(List includeEmailTokens) { } + public NotificationWithMeta emailTo(List emailTo) { + + this.emailTo = emailTo; + return this; + } + + public NotificationWithMeta addEmailToItem(String emailToItem) { + if (this.emailTo == null) { + this.emailTo = new ArrayList<>(); + } + this.emailTo.add(emailToItem); + return this; + } + + /** + * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + * @return emailTo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. ") + + public List getEmailTo() { + return emailTo; + } + + + public void setEmailTo(List emailTo) { + this.emailTo = emailTo; + } + + public NotificationWithMeta includePhoneNumbers(List includePhoneNumbers) { this.includePhoneNumbers = includePhoneNumbers; @@ -3299,6 +3340,29 @@ public void setEmailBcc(List emailBcc) { } + public NotificationWithMeta emailSenderDomain(String emailSenderDomain) { + + this.emailSenderDomain = emailSenderDomain; + return this; + } + + /** + * Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + * @return emailSenderDomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. ") + + public String getEmailSenderDomain() { + return emailSenderDomain; + } + + + public void setEmailSenderDomain(String emailSenderDomain) { + this.emailSenderDomain = emailSenderDomain; + } + + public NotificationWithMeta smsFrom(String smsFrom) { this.smsFrom = smsFrom; @@ -3843,6 +3907,7 @@ public boolean equals(Object o) { Objects.equals(this.excludedSegments, notificationWithMeta.excludedSegments) && Objects.equals(this.includeSubscriptionIds, notificationWithMeta.includeSubscriptionIds) && Objects.equals(this.includeEmailTokens, notificationWithMeta.includeEmailTokens) && + Objects.equals(this.emailTo, notificationWithMeta.emailTo) && Objects.equals(this.includePhoneNumbers, notificationWithMeta.includePhoneNumbers) && Objects.equals(this.includeIosTokens, notificationWithMeta.includeIosTokens) && Objects.equals(this.includeWpWnsUris, notificationWithMeta.includeWpWnsUris) && @@ -3945,6 +4010,7 @@ public boolean equals(Object o) { Objects.equals(this.disableEmailClickTracking, notificationWithMeta.disableEmailClickTracking) && Objects.equals(this.includeUnsubscribed, notificationWithMeta.includeUnsubscribed) && Objects.equals(this.emailBcc, notificationWithMeta.emailBcc) && + Objects.equals(this.emailSenderDomain, notificationWithMeta.emailSenderDomain) && Objects.equals(this.smsFrom, notificationWithMeta.smsFrom) && Objects.equals(this.smsMediaUrls, notificationWithMeta.smsMediaUrls) && Objects.equals(this.filters, notificationWithMeta.filters) && @@ -3975,7 +4041,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, emailBcc, smsFrom, smsMediaUrls, filters, customData, huaweiBadgeClass, huaweiBadgeAddNum, huaweiBadgeSetNum, huaweiCategory, huaweiBiTag, successful, failed, errored, converted, received, outcomes, remaining, queuedAt, sendAfter, completedAt, platformDeliveryStats, canceled, bccSent); + return Objects.hash(includedSegments, excludedSegments, includeSubscriptionIds, includeEmailTokens, emailTo, 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, emailSenderDomain, 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) { @@ -3993,6 +4059,7 @@ public String toString() { sb.append(" excludedSegments: ").append(toIndentedString(excludedSegments)).append("\n"); sb.append(" includeSubscriptionIds: ").append(toIndentedString(includeSubscriptionIds)).append("\n"); sb.append(" includeEmailTokens: ").append(toIndentedString(includeEmailTokens)).append("\n"); + sb.append(" emailTo: ").append(toIndentedString(emailTo)).append("\n"); sb.append(" includePhoneNumbers: ").append(toIndentedString(includePhoneNumbers)).append("\n"); sb.append(" includeIosTokens: ").append(toIndentedString(includeIosTokens)).append("\n"); sb.append(" includeWpWnsUris: ").append(toIndentedString(includeWpWnsUris)).append("\n"); @@ -4095,6 +4162,7 @@ public String toString() { 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(" emailSenderDomain: ").append(toIndentedString(emailSenderDomain)).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"); @@ -4143,6 +4211,7 @@ private String toIndentedString(Object o) { openapiFields.add("excluded_segments"); openapiFields.add("include_subscription_ids"); openapiFields.add("include_email_tokens"); + openapiFields.add("email_to"); openapiFields.add("include_phone_numbers"); openapiFields.add("include_ios_tokens"); openapiFields.add("include_wp_wns_uris"); @@ -4245,6 +4314,7 @@ private String toIndentedString(Object o) { openapiFields.add("disable_email_click_tracking"); openapiFields.add("include_unsubscribed"); openapiFields.add("email_bcc"); + openapiFields.add("email_sender_domain"); openapiFields.add("sms_from"); openapiFields.add("sms_media_urls"); openapiFields.add("filters"); diff --git a/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java b/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java index 7f06b86..895d231 100644 --- a/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java +++ b/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java @@ -65,6 +65,10 @@ public class SubscriptionNotificationTarget { @SerializedName(SERIALIZED_NAME_INCLUDE_EMAIL_TOKENS) private List includeEmailTokens = null; + public static final String SERIALIZED_NAME_EMAIL_TO = "email_to"; + @SerializedName(SERIALIZED_NAME_EMAIL_TO) + private List emailTo = null; + public static final String SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS = "include_phone_numbers"; @SerializedName(SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS) private List includePhoneNumbers = null; @@ -199,11 +203,13 @@ public SubscriptionNotificationTarget addIncludeEmailTokensItem(String includeEm } /** - * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + * Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. * @return includeEmailTokens + * @deprecated **/ + @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call ") + @ApiModelProperty(value = "Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. ") public List getIncludeEmailTokens() { return includeEmailTokens; @@ -215,6 +221,37 @@ public void setIncludeEmailTokens(List includeEmailTokens) { } + public SubscriptionNotificationTarget emailTo(List emailTo) { + + this.emailTo = emailTo; + return this; + } + + public SubscriptionNotificationTarget addEmailToItem(String emailToItem) { + if (this.emailTo == null) { + this.emailTo = new ArrayList<>(); + } + this.emailTo.add(emailToItem); + return this; + } + + /** + * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + * @return emailTo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. ") + + public List getEmailTo() { + return emailTo; + } + + + public void setEmailTo(List emailTo) { + this.emailTo = emailTo; + } + + public SubscriptionNotificationTarget includePhoneNumbers(List includePhoneNumbers) { this.includePhoneNumbers = includePhoneNumbers; @@ -498,6 +535,7 @@ public boolean equals(Object o) { SubscriptionNotificationTarget subscriptionNotificationTarget = (SubscriptionNotificationTarget) o; return Objects.equals(this.includeSubscriptionIds, subscriptionNotificationTarget.includeSubscriptionIds) && Objects.equals(this.includeEmailTokens, subscriptionNotificationTarget.includeEmailTokens) && + Objects.equals(this.emailTo, subscriptionNotificationTarget.emailTo) && Objects.equals(this.includePhoneNumbers, subscriptionNotificationTarget.includePhoneNumbers) && Objects.equals(this.includeIosTokens, subscriptionNotificationTarget.includeIosTokens) && Objects.equals(this.includeWpWnsUris, subscriptionNotificationTarget.includeWpWnsUris) && @@ -515,7 +553,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(includeSubscriptionIds, includeEmailTokens, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel); + return Objects.hash(includeSubscriptionIds, includeEmailTokens, emailTo, includePhoneNumbers, includeIosTokens, includeWpWnsUris, includeAmazonRegIds, includeChromeRegIds, includeChromeWebRegIds, includeAndroidRegIds, includeAliases, targetChannel); } private static int hashCodeNullable(JsonNullable a) { @@ -531,6 +569,7 @@ public String toString() { sb.append("class SubscriptionNotificationTarget {\n"); sb.append(" includeSubscriptionIds: ").append(toIndentedString(includeSubscriptionIds)).append("\n"); sb.append(" includeEmailTokens: ").append(toIndentedString(includeEmailTokens)).append("\n"); + sb.append(" emailTo: ").append(toIndentedString(emailTo)).append("\n"); sb.append(" includePhoneNumbers: ").append(toIndentedString(includePhoneNumbers)).append("\n"); sb.append(" includeIosTokens: ").append(toIndentedString(includeIosTokens)).append("\n"); sb.append(" includeWpWnsUris: ").append(toIndentedString(includeWpWnsUris)).append("\n"); @@ -564,6 +603,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("include_subscription_ids"); openapiFields.add("include_email_tokens"); + openapiFields.add("email_to"); openapiFields.add("include_phone_numbers"); openapiFields.add("include_ios_tokens"); openapiFields.add("include_wp_wns_uris");