Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/CreateTemplateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] |
Expand All @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions docs/UpdateTemplateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] |
Expand All @@ -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,
Expand Down
7 changes: 3 additions & 4 deletions lib/onesignal/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 2 additions & 0 deletions lib/onesignal/models/basic_notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions lib/onesignal/models/basic_notification_all_of.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
20 changes: 19 additions & 1 deletion lib/onesignal/models/create_template_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 &&
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/onesignal/models/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions lib/onesignal/models/notification_with_meta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
20 changes: 19 additions & 1 deletion lib/onesignal/models/update_template_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 &&
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions spec/models/create_template_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions spec/models/update_template_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading