onesignal 5.2.1.pre.beta1 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +33 -5
  4. data/docs/ApiKeyToken.md +28 -0
  5. data/docs/ApiKeyTokensListResponse.md +18 -0
  6. data/docs/BasicNotification.md +13 -1
  7. data/docs/BasicNotificationAllOf.md +13 -1
  8. data/docs/CopyTemplateRequest.md +18 -0
  9. data/docs/CreateApiKeyRequest.md +22 -0
  10. data/docs/CreateApiKeyResponse.md +20 -0
  11. data/docs/CreateTemplateRequest.md +32 -0
  12. data/docs/CustomEvent.md +26 -0
  13. data/docs/CustomEventsRequest.md +18 -0
  14. data/docs/DefaultApi.md +1132 -110
  15. data/docs/Notification.md +12 -0
  16. data/docs/NotificationWithMeta.md +12 -0
  17. data/docs/StartLiveActivityRequest.md +48 -0
  18. data/docs/StartLiveActivitySuccessResponse.md +18 -0
  19. data/docs/TemplateResource.md +28 -0
  20. data/docs/TemplatesListResponse.md +18 -0
  21. data/docs/UpdateApiKeyRequest.md +22 -0
  22. data/docs/UpdateTemplateRequest.md +30 -0
  23. data/lib/onesignal/api/default_api.rb +1043 -1
  24. data/lib/onesignal/api_client.rb +2 -2
  25. data/lib/onesignal/api_error.rb +1 -1
  26. data/lib/onesignal/configuration.rb +1 -1
  27. data/lib/onesignal/models/api_key_token.rb +300 -0
  28. data/lib/onesignal/models/api_key_tokens_list_response.rb +221 -0
  29. data/lib/onesignal/models/app.rb +1 -1
  30. data/lib/onesignal/models/basic_notification.rb +84 -6
  31. data/lib/onesignal/models/basic_notification_all_of.rb +84 -6
  32. data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
  33. data/lib/onesignal/models/button.rb +1 -1
  34. data/lib/onesignal/models/copy_template_request.rb +225 -0
  35. data/lib/onesignal/models/create_api_key_request.rb +273 -0
  36. data/lib/onesignal/models/create_api_key_response.rb +228 -0
  37. data/lib/onesignal/models/create_notification_success_response.rb +1 -1
  38. data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
  39. data/lib/onesignal/models/create_segment_success_response.rb +1 -1
  40. data/lib/onesignal/models/create_template_request.rb +307 -0
  41. data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
  42. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
  43. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
  44. data/lib/onesignal/models/custom_event.rb +269 -0
  45. data/lib/onesignal/models/custom_events_request.rb +226 -0
  46. data/lib/onesignal/models/delivery_data.rb +1 -1
  47. data/lib/onesignal/models/export_events_success_response.rb +1 -1
  48. data/lib/onesignal/models/export_subscriptions_request_body.rb +1 -1
  49. data/lib/onesignal/models/export_subscriptions_success_response.rb +1 -1
  50. data/lib/onesignal/models/filter.rb +1 -1
  51. data/lib/onesignal/models/filter_expression.rb +1 -1
  52. data/lib/onesignal/models/generic_error.rb +1 -1
  53. data/lib/onesignal/models/generic_success_bool_response.rb +1 -1
  54. data/lib/onesignal/models/get_notification_history_request_body.rb +1 -1
  55. data/lib/onesignal/models/get_segments_success_response.rb +1 -1
  56. data/lib/onesignal/models/language_string_map.rb +1 -1
  57. data/lib/onesignal/models/notification.rb +80 -2
  58. data/lib/onesignal/models/notification_all_of.rb +1 -1
  59. data/lib/onesignal/models/notification_history_success_response.rb +1 -1
  60. data/lib/onesignal/models/notification_slice.rb +1 -1
  61. data/lib/onesignal/models/notification_target.rb +1 -1
  62. data/lib/onesignal/models/notification_with_meta.rb +80 -2
  63. data/lib/onesignal/models/notification_with_meta_all_of.rb +1 -1
  64. data/lib/onesignal/models/operator.rb +1 -1
  65. data/lib/onesignal/models/outcome_data.rb +1 -1
  66. data/lib/onesignal/models/outcomes_data.rb +1 -1
  67. data/lib/onesignal/models/platform_delivery_data.rb +1 -1
  68. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
  69. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
  70. data/lib/onesignal/models/properties_body.rb +1 -1
  71. data/lib/onesignal/models/properties_deltas.rb +1 -1
  72. data/lib/onesignal/models/properties_object.rb +1 -1
  73. data/lib/onesignal/models/purchase.rb +1 -1
  74. data/lib/onesignal/models/rate_limit_error.rb +1 -1
  75. data/lib/onesignal/models/segment.rb +1 -1
  76. data/lib/onesignal/models/segment_data.rb +1 -1
  77. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  78. data/lib/onesignal/models/start_live_activity_request.rb +454 -0
  79. data/lib/onesignal/models/start_live_activity_success_response.rb +219 -0
  80. data/lib/onesignal/models/subscription.rb +1 -1
  81. data/lib/onesignal/models/subscription_body.rb +1 -1
  82. data/lib/onesignal/models/subscription_notification_target.rb +1 -1
  83. data/lib/onesignal/models/template_resource.rb +302 -0
  84. data/lib/onesignal/models/templates_list_response.rb +221 -0
  85. data/lib/onesignal/models/transfer_subscription_request_body.rb +1 -1
  86. data/lib/onesignal/models/update_api_key_request.rb +273 -0
  87. data/lib/onesignal/models/update_live_activity_request.rb +1 -1
  88. data/lib/onesignal/models/update_live_activity_success_response.rb +1 -1
  89. data/lib/onesignal/models/update_template_request.rb +282 -0
  90. data/lib/onesignal/models/update_user_request.rb +1 -1
  91. data/lib/onesignal/models/user.rb +1 -1
  92. data/lib/onesignal/models/user_identity_body.rb +1 -1
  93. data/lib/onesignal/models/web_button.rb +1 -1
  94. data/lib/onesignal/version.rb +2 -2
  95. data/lib/onesignal.rb +15 -1
  96. data/onesignal.gemspec +1 -1
  97. data/spec/api/default_api_spec.rb +189 -1
  98. data/spec/api_client_spec.rb +1 -1
  99. data/spec/configuration_spec.rb +1 -1
  100. data/spec/models/api_key_token_spec.rb +68 -0
  101. data/spec/models/api_key_tokens_list_response_spec.rb +34 -0
  102. data/spec/models/app_spec.rb +1 -1
  103. data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
  104. data/spec/models/basic_notification_all_of_spec.rb +41 -1
  105. data/spec/models/basic_notification_spec.rb +41 -1
  106. data/spec/models/button_spec.rb +1 -1
  107. data/spec/models/copy_template_request_spec.rb +34 -0
  108. data/spec/models/create_api_key_request_spec.rb +50 -0
  109. data/spec/models/create_api_key_response_spec.rb +40 -0
  110. data/spec/models/create_notification_success_response_spec.rb +1 -1
  111. data/spec/models/create_segment_conflict_response_spec.rb +1 -1
  112. data/spec/models/create_segment_success_response_spec.rb +1 -1
  113. data/spec/models/create_template_request_spec.rb +76 -0
  114. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
  115. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
  116. data/spec/models/create_user_conflict_response_spec.rb +1 -1
  117. data/spec/models/custom_event_spec.rb +58 -0
  118. data/spec/models/custom_events_request_spec.rb +34 -0
  119. data/spec/models/delivery_data_spec.rb +1 -1
  120. data/spec/models/export_events_success_response_spec.rb +1 -1
  121. data/spec/models/export_subscriptions_request_body_spec.rb +1 -1
  122. data/spec/models/export_subscriptions_success_response_spec.rb +1 -1
  123. data/spec/models/filter_expression_spec.rb +1 -1
  124. data/spec/models/filter_spec.rb +1 -1
  125. data/spec/models/generic_error_spec.rb +1 -1
  126. data/spec/models/generic_success_bool_response_spec.rb +1 -1
  127. data/spec/models/get_notification_history_request_body_spec.rb +1 -1
  128. data/spec/models/get_segments_success_response_spec.rb +1 -1
  129. data/spec/models/language_string_map_spec.rb +1 -1
  130. data/spec/models/notification_all_of_spec.rb +1 -1
  131. data/spec/models/notification_history_success_response_spec.rb +1 -1
  132. data/spec/models/notification_slice_spec.rb +1 -1
  133. data/spec/models/notification_spec.rb +41 -1
  134. data/spec/models/notification_target_spec.rb +1 -1
  135. data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
  136. data/spec/models/notification_with_meta_spec.rb +41 -1
  137. data/spec/models/operator_spec.rb +1 -1
  138. data/spec/models/outcome_data_spec.rb +1 -1
  139. data/spec/models/outcomes_data_spec.rb +1 -1
  140. data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
  141. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
  142. data/spec/models/platform_delivery_data_spec.rb +1 -1
  143. data/spec/models/properties_body_spec.rb +1 -1
  144. data/spec/models/properties_deltas_spec.rb +1 -1
  145. data/spec/models/properties_object_spec.rb +1 -1
  146. data/spec/models/purchase_spec.rb +1 -1
  147. data/spec/models/rate_limit_error_spec.rb +1 -1
  148. data/spec/models/segment_data_spec.rb +1 -1
  149. data/spec/models/segment_notification_target_spec.rb +1 -1
  150. data/spec/models/segment_spec.rb +1 -1
  151. data/spec/models/start_live_activity_request_spec.rb +128 -0
  152. data/spec/models/start_live_activity_success_response_spec.rb +34 -0
  153. data/spec/models/subscription_body_spec.rb +1 -1
  154. data/spec/models/subscription_notification_target_spec.rb +1 -1
  155. data/spec/models/subscription_spec.rb +1 -1
  156. data/spec/models/template_resource_spec.rb +68 -0
  157. data/spec/models/templates_list_response_spec.rb +34 -0
  158. data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
  159. data/spec/models/update_api_key_request_spec.rb +50 -0
  160. data/spec/models/update_live_activity_request_spec.rb +1 -1
  161. data/spec/models/update_live_activity_success_response_spec.rb +1 -1
  162. data/spec/models/update_template_request_spec.rb +70 -0
  163. data/spec/models/update_user_request_spec.rb +1 -1
  164. data/spec/models/user_identity_body_spec.rb +1 -1
  165. data/spec/models/user_spec.rb +1 -1
  166. data/spec/models/web_button_spec.rb +1 -1
  167. data/spec/spec_helper.rb +1 -1
  168. metadata +58 -2
@@ -0,0 +1,226 @@
1
+ =begin
2
+ #OneSignal
3
+
4
+ #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
+
6
+ The version of the OpenAPI document: 5.3.0
7
+ Contact: devrel@onesignal.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OneSignal
17
+ class CustomEventsRequest
18
+ attr_accessor :events
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'events' => :'events'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'events' => :'Array<CustomEvent>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::CustomEventsRequest` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::CustomEventsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'events')
61
+ if (value = attributes[:'events']).is_a?(Array)
62
+ self.events = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @events.nil?
72
+ invalid_properties.push('invalid value for "events", events cannot be nil.')
73
+ end
74
+
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ return false if @events.nil?
82
+ true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ events == o.events
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Integer] Hash code
101
+ def hash
102
+ [events].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def self.build_from_hash(attributes)
109
+ new.build_from_hash(attributes)
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def build_from_hash(attributes)
116
+ return nil unless attributes.is_a?(Hash)
117
+ attributes = attributes.transform_keys(&:to_sym)
118
+ self.class.openapi_types.each_pair do |key, type|
119
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
120
+ self.send("#{key}=", nil)
121
+ elsif type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ end
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :Time
142
+ Time.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value.to_s
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :Boolean
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ # models (e.g. Pet) or oneOf
173
+ klass = OneSignal.const_get(type)
174
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ # Outputs non-array value in the form of hash
207
+ # For object, use to_hash. Otherwise, just return the value
208
+ # @param [Object] value Any valid value
209
+ # @return [Hash] Returns the value in the form of hash
210
+ def _to_hash(value)
211
+ if value.is_a?(Array)
212
+ value.compact.map { |v| _to_hash(v) }
213
+ elsif value.is_a?(Hash)
214
+ {}.tap do |hash|
215
+ value.each { |k, v| hash[k] = _to_hash(v) }
216
+ end
217
+ elsif value.respond_to? :to_hash
218
+ value.to_hash
219
+ else
220
+ value
221
+ end
222
+ end
223
+
224
+ end
225
+
226
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -310,6 +310,9 @@ module OneSignal
310
310
  # Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings.
311
311
  attr_accessor :email_from_address
312
312
 
313
+ # Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address.
314
+ attr_accessor :email_reply_to_address
315
+
313
316
  # 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.
314
317
  attr_accessor :email_preheader
315
318
 
@@ -330,6 +333,21 @@ module OneSignal
330
333
  # Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25}
331
334
  attr_accessor :custom_data
332
335
 
336
+ # Channel: Push Notifications Platform: Huawei Full path of the app entry activity class
337
+ attr_accessor :huawei_badge_class
338
+
339
+ # Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99
340
+ attr_accessor :huawei_badge_add_num
341
+
342
+ # Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99
343
+ attr_accessor :huawei_badge_set_num
344
+
345
+ # Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.
346
+ attr_accessor :huawei_category
347
+
348
+ # Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.
349
+ attr_accessor :huawei_bi_tag
350
+
333
351
  # Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter.
334
352
  attr_accessor :send_after
335
353
 
@@ -459,6 +477,7 @@ module OneSignal
459
477
  :'email_body' => :'email_body',
460
478
  :'email_from_name' => :'email_from_name',
461
479
  :'email_from_address' => :'email_from_address',
480
+ :'email_reply_to_address' => :'email_reply_to_address',
462
481
  :'email_preheader' => :'email_preheader',
463
482
  :'disable_email_click_tracking' => :'disable_email_click_tracking',
464
483
  :'include_unsubscribed' => :'include_unsubscribed',
@@ -466,6 +485,11 @@ module OneSignal
466
485
  :'sms_media_urls' => :'sms_media_urls',
467
486
  :'filters' => :'filters',
468
487
  :'custom_data' => :'custom_data',
488
+ :'huawei_badge_class' => :'huawei_badge_class',
489
+ :'huawei_badge_add_num' => :'huawei_badge_add_num',
490
+ :'huawei_badge_set_num' => :'huawei_badge_set_num',
491
+ :'huawei_category' => :'huawei_category',
492
+ :'huawei_bi_tag' => :'huawei_bi_tag',
469
493
  :'send_after' => :'send_after'
470
494
  }
471
495
  end
@@ -579,6 +603,7 @@ module OneSignal
579
603
  :'email_body' => :'String',
580
604
  :'email_from_name' => :'String',
581
605
  :'email_from_address' => :'String',
606
+ :'email_reply_to_address' => :'String',
582
607
  :'email_preheader' => :'String',
583
608
  :'disable_email_click_tracking' => :'Boolean',
584
609
  :'include_unsubscribed' => :'Boolean',
@@ -586,6 +611,11 @@ module OneSignal
586
611
  :'sms_media_urls' => :'Array<String>',
587
612
  :'filters' => :'Array<FilterExpression>',
588
613
  :'custom_data' => :'Object',
614
+ :'huawei_badge_class' => :'String',
615
+ :'huawei_badge_add_num' => :'Integer',
616
+ :'huawei_badge_set_num' => :'Integer',
617
+ :'huawei_category' => :'String',
618
+ :'huawei_bi_tag' => :'String',
589
619
  :'send_after' => :'Time'
590
620
  }
591
621
  end
@@ -670,12 +700,18 @@ module OneSignal
670
700
  :'email_subject',
671
701
  :'email_from_name',
672
702
  :'email_from_address',
703
+ :'email_reply_to_address',
673
704
  :'email_preheader',
674
705
  :'disable_email_click_tracking',
675
706
  :'sms_from',
676
707
  :'sms_media_urls',
677
708
  :'filters',
678
709
  :'custom_data',
710
+ :'huawei_badge_class',
711
+ :'huawei_badge_add_num',
712
+ :'huawei_badge_set_num',
713
+ :'huawei_category',
714
+ :'huawei_bi_tag',
679
715
  :'send_after'
680
716
  ])
681
717
  end
@@ -1135,6 +1171,10 @@ module OneSignal
1135
1171
  self.email_from_address = attributes[:'email_from_address']
1136
1172
  end
1137
1173
 
1174
+ if attributes.key?(:'email_reply_to_address')
1175
+ self.email_reply_to_address = attributes[:'email_reply_to_address']
1176
+ end
1177
+
1138
1178
  if attributes.key?(:'email_preheader')
1139
1179
  self.email_preheader = attributes[:'email_preheader']
1140
1180
  end
@@ -1167,6 +1207,26 @@ module OneSignal
1167
1207
  self.custom_data = attributes[:'custom_data']
1168
1208
  end
1169
1209
 
1210
+ if attributes.key?(:'huawei_badge_class')
1211
+ self.huawei_badge_class = attributes[:'huawei_badge_class']
1212
+ end
1213
+
1214
+ if attributes.key?(:'huawei_badge_add_num')
1215
+ self.huawei_badge_add_num = attributes[:'huawei_badge_add_num']
1216
+ end
1217
+
1218
+ if attributes.key?(:'huawei_badge_set_num')
1219
+ self.huawei_badge_set_num = attributes[:'huawei_badge_set_num']
1220
+ end
1221
+
1222
+ if attributes.key?(:'huawei_category')
1223
+ self.huawei_category = attributes[:'huawei_category']
1224
+ end
1225
+
1226
+ if attributes.key?(:'huawei_bi_tag')
1227
+ self.huawei_bi_tag = attributes[:'huawei_bi_tag']
1228
+ end
1229
+
1170
1230
  if attributes.key?(:'send_after')
1171
1231
  self.send_after = attributes[:'send_after']
1172
1232
  end
@@ -1191,6 +1251,8 @@ module OneSignal
1191
1251
  aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"])
1192
1252
  return false unless aggregation_validator.valid?(@aggregation)
1193
1253
  return false if @app_id.nil?
1254
+ huawei_category_validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"])
1255
+ return false unless huawei_category_validator.valid?(@huawei_category)
1194
1256
  true
1195
1257
  end
1196
1258
 
@@ -1214,6 +1276,16 @@ module OneSignal
1214
1276
  @aggregation = aggregation
1215
1277
  end
1216
1278
 
1279
+ # Custom attribute writer method checking allowed values (enum).
1280
+ # @param [Object] huawei_category Object to be assigned
1281
+ def huawei_category=(huawei_category)
1282
+ validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"])
1283
+ unless validator.valid?(huawei_category)
1284
+ fail ArgumentError, "invalid value for \"huawei_category\", must be one of #{validator.allowable_values}."
1285
+ end
1286
+ @huawei_category = huawei_category
1287
+ end
1288
+
1217
1289
  # Checks equality by comparing each attribute.
1218
1290
  # @param [Object] Object to be compared
1219
1291
  def ==(o)
@@ -1320,6 +1392,7 @@ module OneSignal
1320
1392
  email_body == o.email_body &&
1321
1393
  email_from_name == o.email_from_name &&
1322
1394
  email_from_address == o.email_from_address &&
1395
+ email_reply_to_address == o.email_reply_to_address &&
1323
1396
  email_preheader == o.email_preheader &&
1324
1397
  disable_email_click_tracking == o.disable_email_click_tracking &&
1325
1398
  include_unsubscribed == o.include_unsubscribed &&
@@ -1327,6 +1400,11 @@ module OneSignal
1327
1400
  sms_media_urls == o.sms_media_urls &&
1328
1401
  filters == o.filters &&
1329
1402
  custom_data == o.custom_data &&
1403
+ huawei_badge_class == o.huawei_badge_class &&
1404
+ huawei_badge_add_num == o.huawei_badge_add_num &&
1405
+ huawei_badge_set_num == o.huawei_badge_set_num &&
1406
+ huawei_category == o.huawei_category &&
1407
+ huawei_bi_tag == o.huawei_bi_tag &&
1330
1408
  send_after == o.send_after
1331
1409
  end
1332
1410
 
@@ -1339,7 +1417,7 @@ module OneSignal
1339
1417
  # Calculates hash code according to all attributes.
1340
1418
  # @return [Integer] Hash code
1341
1419
  def hash
1342
- [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, send_after].hash
1420
+ [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_reply_to_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, huawei_badge_class, huawei_badge_add_num, huawei_badge_set_num, huawei_category, huawei_bi_tag, send_after].hash
1343
1421
  end
1344
1422
 
1345
1423
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.2.1
6
+ The version of the OpenAPI document: 5.3.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT