From 7809f69f89c96928ffd6f27e578faa85d853f403 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 16 Apr 2026 23:40:48 +0000 Subject: [PATCH] feat: add v5.3.0 package updates --- docs/CreateTemplateRequest.md | 4 ++++ docs/UpdateTemplateRequest.md | 4 ++++ lib/onesignal/configuration.rb | 7 +++---- lib/onesignal/models/basic_notification.rb | 2 ++ .../models/basic_notification_all_of.rb | 2 ++ .../models/create_template_request.rb | 20 ++++++++++++++++++- lib/onesignal/models/notification.rb | 2 ++ .../models/notification_with_meta.rb | 2 ++ .../models/update_template_request.rb | 20 ++++++++++++++++++- spec/models/create_template_request_spec.rb | 12 +++++++++++ spec/models/update_template_request_spec.rb | 12 +++++++++++ 11 files changed, 81 insertions(+), 6 deletions(-) diff --git a/docs/CreateTemplateRequest.md b/docs/CreateTemplateRequest.md index b7f3cf6..0edef68 100644 --- a/docs/CreateTemplateRequest.md +++ b/docs/CreateTemplateRequest.md @@ -7,6 +7,8 @@ | **app_id** | **String** | Your OneSignal App ID in UUID v4 format. | | | **name** | **String** | Name of the template. | | | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | | +| **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | +| **subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | | **is_email** | **Boolean** | Set true for an Email template. | [optional] | | **email_subject** | **String** | Subject of the email. | [optional] | | **email_body** | **String** | Body of the email (HTML supported). | [optional] | @@ -22,6 +24,8 @@ instance = OneSignal::CreateTemplateRequest.new( app_id: null, name: null, contents: null, + headings: null, + subtitle: null, is_email: null, email_subject: null, email_body: null, diff --git a/docs/UpdateTemplateRequest.md b/docs/UpdateTemplateRequest.md index ba3331f..5baedc5 100644 --- a/docs/UpdateTemplateRequest.md +++ b/docs/UpdateTemplateRequest.md @@ -6,6 +6,8 @@ | ---- | ---- | ----------- | ----- | | **name** | **String** | Updated name of the template. | [optional] | | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | +| **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | +| **subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | | **is_email** | **Boolean** | Set true for an Email template. | [optional] | | **email_subject** | **String** | Subject of the email. | [optional] | | **email_body** | **String** | Body of the email (HTML supported). | [optional] | @@ -20,6 +22,8 @@ require 'onesignal' instance = OneSignal::UpdateTemplateRequest.new( name: null, contents: null, + headings: null, + subtitle: null, is_email: null, email_subject: null, email_body: null, diff --git a/lib/onesignal/configuration.rb b/lib/onesignal/configuration.rb index 1ffb201..05b4f81 100644 --- a/lib/onesignal/configuration.rb +++ b/lib/onesignal/configuration.rb @@ -33,11 +33,10 @@ class Configuration # Default server operation variables attr_accessor :server_operation_variables - # OneSignal API token for App Authentication - attr_accessor :app_key + attr_accessor :organization_api_key + + attr_accessor :rest_api_key - # OneSignal API token for User Authentication - attr_accessor :user_key # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). diff --git a/lib/onesignal/models/basic_notification.rb b/lib/onesignal/models/basic_notification.rb index ce23dcd..48c1617 100644 --- a/lib/onesignal/models/basic_notification.rb +++ b/lib/onesignal/models/basic_notification.rb @@ -653,7 +653,9 @@ def self.openapi_nullable :'buttons', :'web_buttons', :'ios_category', + :'android_channel_id', :'huawei_channel_id', + :'existing_android_channel_id', :'huawei_existing_channel_id', :'small_icon', :'huawei_small_icon', diff --git a/lib/onesignal/models/basic_notification_all_of.rb b/lib/onesignal/models/basic_notification_all_of.rb index d1c952f..eb46fa7 100644 --- a/lib/onesignal/models/basic_notification_all_of.rb +++ b/lib/onesignal/models/basic_notification_all_of.rb @@ -587,7 +587,9 @@ def self.openapi_nullable :'buttons', :'web_buttons', :'ios_category', + :'android_channel_id', :'huawei_channel_id', + :'existing_android_channel_id', :'huawei_existing_channel_id', :'small_icon', :'huawei_small_icon', diff --git a/lib/onesignal/models/create_template_request.rb b/lib/onesignal/models/create_template_request.rb index e6d41aa..27fe84f 100644 --- a/lib/onesignal/models/create_template_request.rb +++ b/lib/onesignal/models/create_template_request.rb @@ -23,6 +23,10 @@ class CreateTemplateRequest attr_accessor :contents + attr_accessor :headings + + attr_accessor :subtitle + # Set true for an Email template. attr_accessor :is_email @@ -44,6 +48,8 @@ def self.attribute_map :'app_id' => :'app_id', :'name' => :'name', :'contents' => :'contents', + :'headings' => :'headings', + :'subtitle' => :'subtitle', :'is_email' => :'isEmail', :'email_subject' => :'email_subject', :'email_body' => :'email_body', @@ -63,6 +69,8 @@ def self.openapi_types :'app_id' => :'String', :'name' => :'String', :'contents' => :'LanguageStringMap', + :'headings' => :'LanguageStringMap', + :'subtitle' => :'LanguageStringMap', :'is_email' => :'Boolean', :'email_subject' => :'String', :'email_body' => :'String', @@ -107,6 +115,14 @@ def initialize(attributes = {}) self.contents = attributes[:'contents'] end + if attributes.key?(:'headings') + self.headings = attributes[:'headings'] + end + + if attributes.key?(:'subtitle') + self.subtitle = attributes[:'subtitle'] + end + if attributes.key?(:'is_email') self.is_email = attributes[:'is_email'] end @@ -164,6 +180,8 @@ def ==(o) app_id == o.app_id && name == o.name && contents == o.contents && + headings == o.headings && + subtitle == o.subtitle && is_email == o.is_email && email_subject == o.email_subject && email_body == o.email_body && @@ -180,7 +198,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [app_id, name, contents, is_email, email_subject, email_body, is_sms, dynamic_content].hash + [app_id, name, contents, headings, subtitle, is_email, email_subject, email_body, is_sms, dynamic_content].hash end # Builds the object from hash diff --git a/lib/onesignal/models/notification.rb b/lib/onesignal/models/notification.rb index 4982cb5..4e4e437 100644 --- a/lib/onesignal/models/notification.rb +++ b/lib/onesignal/models/notification.rb @@ -658,7 +658,9 @@ def self.openapi_nullable :'buttons', :'web_buttons', :'ios_category', + :'android_channel_id', :'huawei_channel_id', + :'existing_android_channel_id', :'huawei_existing_channel_id', :'small_icon', :'huawei_small_icon', diff --git a/lib/onesignal/models/notification_with_meta.rb b/lib/onesignal/models/notification_with_meta.rb index f83d490..2841afd 100644 --- a/lib/onesignal/models/notification_with_meta.rb +++ b/lib/onesignal/models/notification_with_meta.rb @@ -711,7 +711,9 @@ def self.openapi_nullable :'buttons', :'web_buttons', :'ios_category', + :'android_channel_id', :'huawei_channel_id', + :'existing_android_channel_id', :'huawei_existing_channel_id', :'small_icon', :'huawei_small_icon', diff --git a/lib/onesignal/models/update_template_request.rb b/lib/onesignal/models/update_template_request.rb index 9301d43..10aa01c 100644 --- a/lib/onesignal/models/update_template_request.rb +++ b/lib/onesignal/models/update_template_request.rb @@ -20,6 +20,10 @@ class UpdateTemplateRequest attr_accessor :contents + attr_accessor :headings + + attr_accessor :subtitle + # Set true for an Email template. attr_accessor :is_email @@ -40,6 +44,8 @@ def self.attribute_map { :'name' => :'name', :'contents' => :'contents', + :'headings' => :'headings', + :'subtitle' => :'subtitle', :'is_email' => :'isEmail', :'email_subject' => :'email_subject', :'email_body' => :'email_body', @@ -58,6 +64,8 @@ def self.openapi_types { :'name' => :'String', :'contents' => :'LanguageStringMap', + :'headings' => :'LanguageStringMap', + :'subtitle' => :'LanguageStringMap', :'is_email' => :'Boolean', :'email_subject' => :'String', :'email_body' => :'String', @@ -98,6 +106,14 @@ def initialize(attributes = {}) self.contents = attributes[:'contents'] end + if attributes.key?(:'headings') + self.headings = attributes[:'headings'] + end + + if attributes.key?(:'subtitle') + self.subtitle = attributes[:'subtitle'] + end + if attributes.key?(:'is_email') self.is_email = attributes[:'is_email'] end @@ -139,6 +155,8 @@ def ==(o) self.class == o.class && name == o.name && contents == o.contents && + headings == o.headings && + subtitle == o.subtitle && is_email == o.is_email && email_subject == o.email_subject && email_body == o.email_body && @@ -155,7 +173,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, contents, is_email, email_subject, email_body, is_sms, dynamic_content].hash + [name, contents, headings, subtitle, is_email, email_subject, email_body, is_sms, dynamic_content].hash end # Builds the object from hash diff --git a/spec/models/create_template_request_spec.rb b/spec/models/create_template_request_spec.rb index 1a1b192..1665193 100644 --- a/spec/models/create_template_request_spec.rb +++ b/spec/models/create_template_request_spec.rb @@ -43,6 +43,18 @@ end end + describe 'test attribute "headings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "subtitle"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "is_email"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/update_template_request_spec.rb b/spec/models/update_template_request_spec.rb index a86ed5f..eb5ea33 100644 --- a/spec/models/update_template_request_spec.rb +++ b/spec/models/update_template_request_spec.rb @@ -37,6 +37,18 @@ end end + describe 'test attribute "headings"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "subtitle"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "is_email"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers