onesignal 5.2.1.pre.beta1 → 5.3.0.pre.beta1

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 (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -5
  3. data/docs/ApiKeyToken.md +28 -0
  4. data/docs/ApiKeyTokensListResponse.md +18 -0
  5. data/docs/CopyTemplateRequest.md +18 -0
  6. data/docs/CreateApiKeyRequest.md +22 -0
  7. data/docs/CreateApiKeyResponse.md +20 -0
  8. data/docs/CreateTemplateRequest.md +32 -0
  9. data/docs/CustomEvent.md +26 -0
  10. data/docs/CustomEventsRequest.md +18 -0
  11. data/docs/DefaultApi.md +1132 -110
  12. data/docs/StartLiveActivityRequest.md +48 -0
  13. data/docs/StartLiveActivitySuccessResponse.md +18 -0
  14. data/docs/TemplateResource.md +28 -0
  15. data/docs/TemplatesListResponse.md +18 -0
  16. data/docs/UpdateApiKeyRequest.md +22 -0
  17. data/docs/UpdateTemplateRequest.md +30 -0
  18. data/lib/onesignal/api/default_api.rb +1043 -1
  19. data/lib/onesignal/api_client.rb +2 -2
  20. data/lib/onesignal/api_error.rb +1 -1
  21. data/lib/onesignal/configuration.rb +1 -1
  22. data/lib/onesignal/models/api_key_token.rb +300 -0
  23. data/lib/onesignal/models/api_key_tokens_list_response.rb +221 -0
  24. data/lib/onesignal/models/app.rb +1 -1
  25. data/lib/onesignal/models/basic_notification.rb +1 -1
  26. data/lib/onesignal/models/basic_notification_all_of.rb +1 -1
  27. data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
  28. data/lib/onesignal/models/button.rb +1 -1
  29. data/lib/onesignal/models/copy_template_request.rb +225 -0
  30. data/lib/onesignal/models/create_api_key_request.rb +273 -0
  31. data/lib/onesignal/models/create_api_key_response.rb +228 -0
  32. data/lib/onesignal/models/create_notification_success_response.rb +1 -1
  33. data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
  34. data/lib/onesignal/models/create_segment_success_response.rb +1 -1
  35. data/lib/onesignal/models/create_template_request.rb +307 -0
  36. data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
  37. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
  38. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
  39. data/lib/onesignal/models/custom_event.rb +269 -0
  40. data/lib/onesignal/models/custom_events_request.rb +226 -0
  41. data/lib/onesignal/models/delivery_data.rb +1 -1
  42. data/lib/onesignal/models/export_events_success_response.rb +1 -1
  43. data/lib/onesignal/models/export_subscriptions_request_body.rb +1 -1
  44. data/lib/onesignal/models/export_subscriptions_success_response.rb +1 -1
  45. data/lib/onesignal/models/filter.rb +1 -1
  46. data/lib/onesignal/models/filter_expression.rb +1 -1
  47. data/lib/onesignal/models/generic_error.rb +1 -1
  48. data/lib/onesignal/models/generic_success_bool_response.rb +1 -1
  49. data/lib/onesignal/models/get_notification_history_request_body.rb +1 -1
  50. data/lib/onesignal/models/get_segments_success_response.rb +1 -1
  51. data/lib/onesignal/models/language_string_map.rb +1 -1
  52. data/lib/onesignal/models/notification.rb +1 -1
  53. data/lib/onesignal/models/notification_all_of.rb +1 -1
  54. data/lib/onesignal/models/notification_history_success_response.rb +1 -1
  55. data/lib/onesignal/models/notification_slice.rb +1 -1
  56. data/lib/onesignal/models/notification_target.rb +1 -1
  57. data/lib/onesignal/models/notification_with_meta.rb +1 -1
  58. data/lib/onesignal/models/notification_with_meta_all_of.rb +1 -1
  59. data/lib/onesignal/models/operator.rb +1 -1
  60. data/lib/onesignal/models/outcome_data.rb +1 -1
  61. data/lib/onesignal/models/outcomes_data.rb +1 -1
  62. data/lib/onesignal/models/platform_delivery_data.rb +1 -1
  63. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
  64. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
  65. data/lib/onesignal/models/properties_body.rb +1 -1
  66. data/lib/onesignal/models/properties_deltas.rb +1 -1
  67. data/lib/onesignal/models/properties_object.rb +1 -1
  68. data/lib/onesignal/models/purchase.rb +1 -1
  69. data/lib/onesignal/models/rate_limit_error.rb +1 -1
  70. data/lib/onesignal/models/segment.rb +1 -1
  71. data/lib/onesignal/models/segment_data.rb +1 -1
  72. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  73. data/lib/onesignal/models/start_live_activity_request.rb +454 -0
  74. data/lib/onesignal/models/start_live_activity_success_response.rb +219 -0
  75. data/lib/onesignal/models/subscription.rb +1 -1
  76. data/lib/onesignal/models/subscription_body.rb +1 -1
  77. data/lib/onesignal/models/subscription_notification_target.rb +1 -1
  78. data/lib/onesignal/models/template_resource.rb +302 -0
  79. data/lib/onesignal/models/templates_list_response.rb +221 -0
  80. data/lib/onesignal/models/transfer_subscription_request_body.rb +1 -1
  81. data/lib/onesignal/models/update_api_key_request.rb +273 -0
  82. data/lib/onesignal/models/update_live_activity_request.rb +1 -1
  83. data/lib/onesignal/models/update_live_activity_success_response.rb +1 -1
  84. data/lib/onesignal/models/update_template_request.rb +282 -0
  85. data/lib/onesignal/models/update_user_request.rb +1 -1
  86. data/lib/onesignal/models/user.rb +1 -1
  87. data/lib/onesignal/models/user_identity_body.rb +1 -1
  88. data/lib/onesignal/models/web_button.rb +1 -1
  89. data/lib/onesignal/version.rb +2 -2
  90. data/lib/onesignal.rb +15 -1
  91. data/onesignal.gemspec +1 -1
  92. data/spec/api/default_api_spec.rb +189 -1
  93. data/spec/api_client_spec.rb +1 -1
  94. data/spec/configuration_spec.rb +1 -1
  95. data/spec/models/api_key_token_spec.rb +68 -0
  96. data/spec/models/api_key_tokens_list_response_spec.rb +34 -0
  97. data/spec/models/app_spec.rb +1 -1
  98. data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
  99. data/spec/models/basic_notification_all_of_spec.rb +1 -1
  100. data/spec/models/basic_notification_spec.rb +1 -1
  101. data/spec/models/button_spec.rb +1 -1
  102. data/spec/models/copy_template_request_spec.rb +34 -0
  103. data/spec/models/create_api_key_request_spec.rb +50 -0
  104. data/spec/models/create_api_key_response_spec.rb +40 -0
  105. data/spec/models/create_notification_success_response_spec.rb +1 -1
  106. data/spec/models/create_segment_conflict_response_spec.rb +1 -1
  107. data/spec/models/create_segment_success_response_spec.rb +1 -1
  108. data/spec/models/create_template_request_spec.rb +76 -0
  109. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
  110. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
  111. data/spec/models/create_user_conflict_response_spec.rb +1 -1
  112. data/spec/models/custom_event_spec.rb +58 -0
  113. data/spec/models/custom_events_request_spec.rb +34 -0
  114. data/spec/models/delivery_data_spec.rb +1 -1
  115. data/spec/models/export_events_success_response_spec.rb +1 -1
  116. data/spec/models/export_subscriptions_request_body_spec.rb +1 -1
  117. data/spec/models/export_subscriptions_success_response_spec.rb +1 -1
  118. data/spec/models/filter_expression_spec.rb +1 -1
  119. data/spec/models/filter_spec.rb +1 -1
  120. data/spec/models/generic_error_spec.rb +1 -1
  121. data/spec/models/generic_success_bool_response_spec.rb +1 -1
  122. data/spec/models/get_notification_history_request_body_spec.rb +1 -1
  123. data/spec/models/get_segments_success_response_spec.rb +1 -1
  124. data/spec/models/language_string_map_spec.rb +1 -1
  125. data/spec/models/notification_all_of_spec.rb +1 -1
  126. data/spec/models/notification_history_success_response_spec.rb +1 -1
  127. data/spec/models/notification_slice_spec.rb +1 -1
  128. data/spec/models/notification_spec.rb +1 -1
  129. data/spec/models/notification_target_spec.rb +1 -1
  130. data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
  131. data/spec/models/notification_with_meta_spec.rb +1 -1
  132. data/spec/models/operator_spec.rb +1 -1
  133. data/spec/models/outcome_data_spec.rb +1 -1
  134. data/spec/models/outcomes_data_spec.rb +1 -1
  135. data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
  136. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
  137. data/spec/models/platform_delivery_data_spec.rb +1 -1
  138. data/spec/models/properties_body_spec.rb +1 -1
  139. data/spec/models/properties_deltas_spec.rb +1 -1
  140. data/spec/models/properties_object_spec.rb +1 -1
  141. data/spec/models/purchase_spec.rb +1 -1
  142. data/spec/models/rate_limit_error_spec.rb +1 -1
  143. data/spec/models/segment_data_spec.rb +1 -1
  144. data/spec/models/segment_notification_target_spec.rb +1 -1
  145. data/spec/models/segment_spec.rb +1 -1
  146. data/spec/models/start_live_activity_request_spec.rb +128 -0
  147. data/spec/models/start_live_activity_success_response_spec.rb +34 -0
  148. data/spec/models/subscription_body_spec.rb +1 -1
  149. data/spec/models/subscription_notification_target_spec.rb +1 -1
  150. data/spec/models/subscription_spec.rb +1 -1
  151. data/spec/models/template_resource_spec.rb +68 -0
  152. data/spec/models/templates_list_response_spec.rb +34 -0
  153. data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
  154. data/spec/models/update_api_key_request_spec.rb +50 -0
  155. data/spec/models/update_live_activity_request_spec.rb +1 -1
  156. data/spec/models/update_live_activity_success_response_spec.rb +1 -1
  157. data/spec/models/update_template_request_spec.rb +70 -0
  158. data/spec/models/update_user_request_spec.rb +1 -1
  159. data/spec/models/user_identity_body_spec.rb +1 -1
  160. data/spec/models/user_spec.rb +1 -1
  161. data/spec/models/web_button_spec.rb +1 -1
  162. data/spec/spec_helper.rb +1 -1
  163. metadata +57 -1
@@ -0,0 +1,282 @@
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 UpdateTemplateRequest
18
+ # Updated name of the template.
19
+ attr_accessor :name
20
+
21
+ attr_accessor :contents
22
+
23
+ # Set true for an Email template.
24
+ attr_accessor :is_email
25
+
26
+ # Subject of the email.
27
+ attr_accessor :email_subject
28
+
29
+ # Body of the email (HTML supported).
30
+ attr_accessor :email_body
31
+
32
+ # Set true for an SMS template.
33
+ attr_accessor :is_sms
34
+
35
+ # JSON string for dynamic content personalization.
36
+ attr_accessor :dynamic_content
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'name' => :'name',
42
+ :'contents' => :'contents',
43
+ :'is_email' => :'isEmail',
44
+ :'email_subject' => :'email_subject',
45
+ :'email_body' => :'email_body',
46
+ :'is_sms' => :'isSMS',
47
+ :'dynamic_content' => :'dynamic_content'
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'name' => :'String',
60
+ :'contents' => :'LanguageStringMap',
61
+ :'is_email' => :'Boolean',
62
+ :'email_subject' => :'String',
63
+ :'email_body' => :'String',
64
+ :'is_sms' => :'Boolean',
65
+ :'dynamic_content' => :'String'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ :'email_subject',
73
+ :'email_body',
74
+ :'dynamic_content'
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::UpdateTemplateRequest` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!self.class.attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::UpdateTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'name')
94
+ self.name = attributes[:'name']
95
+ end
96
+
97
+ if attributes.key?(:'contents')
98
+ self.contents = attributes[:'contents']
99
+ end
100
+
101
+ if attributes.key?(:'is_email')
102
+ self.is_email = attributes[:'is_email']
103
+ end
104
+
105
+ if attributes.key?(:'email_subject')
106
+ self.email_subject = attributes[:'email_subject']
107
+ end
108
+
109
+ if attributes.key?(:'email_body')
110
+ self.email_body = attributes[:'email_body']
111
+ end
112
+
113
+ if attributes.key?(:'is_sms')
114
+ self.is_sms = attributes[:'is_sms']
115
+ end
116
+
117
+ if attributes.key?(:'dynamic_content')
118
+ self.dynamic_content = attributes[:'dynamic_content']
119
+ end
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properties with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = Array.new
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ true
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param [Object] Object to be compared
137
+ def ==(o)
138
+ return true if self.equal?(o)
139
+ self.class == o.class &&
140
+ name == o.name &&
141
+ contents == o.contents &&
142
+ is_email == o.is_email &&
143
+ email_subject == o.email_subject &&
144
+ email_body == o.email_body &&
145
+ is_sms == o.is_sms &&
146
+ dynamic_content == o.dynamic_content
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [name, contents, is_email, email_subject, email_body, is_sms, dynamic_content].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ new.build_from_hash(attributes)
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ attributes = attributes.transform_keys(&:to_sym)
174
+ self.class.openapi_types.each_pair do |key, type|
175
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
176
+ self.send("#{key}=", nil)
177
+ elsif type =~ /\AArray<(.*)>/i
178
+ # check to ensure the input is an array given that the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
181
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
182
+ end
183
+ elsif !attributes[self.class.attribute_map[key]].nil?
184
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
185
+ end
186
+ end
187
+
188
+ self
189
+ end
190
+
191
+ # Deserializes the data based on type
192
+ # @param string type Data type
193
+ # @param string value Value to be deserialized
194
+ # @return [Object] Deserialized data
195
+ def _deserialize(type, value)
196
+ case type.to_sym
197
+ when :Time
198
+ Time.parse(value)
199
+ when :Date
200
+ Date.parse(value)
201
+ when :String
202
+ value.to_s
203
+ when :Integer
204
+ value.to_i
205
+ when :Float
206
+ value.to_f
207
+ when :Boolean
208
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
+ true
210
+ else
211
+ false
212
+ end
213
+ when :Object
214
+ # generic object (usually a Hash), return directly
215
+ value
216
+ when /\AArray<(?<inner_type>.+)>\z/
217
+ inner_type = Regexp.last_match[:inner_type]
218
+ value.map { |v| _deserialize(inner_type, v) }
219
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
+ k_type = Regexp.last_match[:k_type]
221
+ v_type = Regexp.last_match[:v_type]
222
+ {}.tap do |hash|
223
+ value.each do |k, v|
224
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
+ end
226
+ end
227
+ else # model
228
+ # models (e.g. Pet) or oneOf
229
+ klass = OneSignal.const_get(type)
230
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
231
+ end
232
+ end
233
+
234
+ # Returns the string representation of the object
235
+ # @return [String] String presentation of the object
236
+ def to_s
237
+ to_hash.to_s
238
+ end
239
+
240
+ # to_body is an alias to to_hash (backward compatibility)
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_body
243
+ to_hash
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ if value.nil?
253
+ is_nullable = self.class.openapi_nullable.include?(attr)
254
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
+ end
256
+
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map { |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+
282
+ 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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module OneSignal
14
- VERSION = '5.2.1-beta1'
14
+ VERSION = '5.3.0-beta1'
15
15
  end
data/lib/onesignal.rb CHANGED
@@ -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
@@ -17,17 +17,25 @@ require 'onesignal/version'
17
17
  require 'onesignal/configuration'
18
18
 
19
19
  # Models
20
+ require 'onesignal/models/api_key_token'
21
+ require 'onesignal/models/api_key_tokens_list_response'
20
22
  require 'onesignal/models/app'
21
23
  require 'onesignal/models/basic_notification'
22
24
  require 'onesignal/models/basic_notification_all_of'
23
25
  require 'onesignal/models/basic_notification_all_of_android_background_layout'
24
26
  require 'onesignal/models/button'
27
+ require 'onesignal/models/copy_template_request'
28
+ require 'onesignal/models/create_api_key_request'
29
+ require 'onesignal/models/create_api_key_response'
25
30
  require 'onesignal/models/create_notification_success_response'
26
31
  require 'onesignal/models/create_segment_conflict_response'
27
32
  require 'onesignal/models/create_segment_success_response'
33
+ require 'onesignal/models/create_template_request'
28
34
  require 'onesignal/models/create_user_conflict_response'
29
35
  require 'onesignal/models/create_user_conflict_response_errors_inner'
30
36
  require 'onesignal/models/create_user_conflict_response_errors_items_meta'
37
+ require 'onesignal/models/custom_event'
38
+ require 'onesignal/models/custom_events_request'
31
39
  require 'onesignal/models/delivery_data'
32
40
  require 'onesignal/models/export_events_success_response'
33
41
  require 'onesignal/models/export_subscriptions_request_body'
@@ -60,12 +68,18 @@ require 'onesignal/models/rate_limit_error'
60
68
  require 'onesignal/models/segment'
61
69
  require 'onesignal/models/segment_data'
62
70
  require 'onesignal/models/segment_notification_target'
71
+ require 'onesignal/models/start_live_activity_request'
72
+ require 'onesignal/models/start_live_activity_success_response'
63
73
  require 'onesignal/models/subscription'
64
74
  require 'onesignal/models/subscription_body'
65
75
  require 'onesignal/models/subscription_notification_target'
76
+ require 'onesignal/models/template_resource'
77
+ require 'onesignal/models/templates_list_response'
66
78
  require 'onesignal/models/transfer_subscription_request_body'
79
+ require 'onesignal/models/update_api_key_request'
67
80
  require 'onesignal/models/update_live_activity_request'
68
81
  require 'onesignal/models/update_live_activity_success_response'
82
+ require 'onesignal/models/update_template_request'
69
83
  require 'onesignal/models/update_user_request'
70
84
  require 'onesignal/models/user'
71
85
  require 'onesignal/models/user_identity_body'
data/onesignal.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
7
7
 
8
- The version of the OpenAPI document: 5.2.1
8
+ The version of the OpenAPI document: 5.3.0
9
9
  Contact: devrel@onesignal.com
10
10
  Generated by: https://openapi-generator.tech
11
11
  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
@@ -45,6 +45,20 @@ describe 'DefaultApi' do
45
45
  end
46
46
  end
47
47
 
48
+ # unit tests for copy_template_to_app
49
+ # Copy template to another app
50
+ # Copy a template to a destination app.
51
+ # @param template_id
52
+ # @param app_id
53
+ # @param copy_template_request
54
+ # @param [Hash] opts the optional parameters
55
+ # @return [TemplateResource]
56
+ describe 'copy_template_to_app test' do
57
+ it 'should work' do
58
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
59
+ end
60
+ end
61
+
48
62
  # unit tests for create_alias
49
63
  # Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
50
64
  # @param app_id
@@ -72,6 +86,19 @@ describe 'DefaultApi' do
72
86
  end
73
87
  end
74
88
 
89
+ # unit tests for create_api_key
90
+ # Create API key
91
+ # Use this API to create a new App API Key (also called a Rich Authentication Token) for a specific OneSignal app. These keys are used to authenticate API requests at the app level and offer enhanced security features, including optional IP allowlisting.
92
+ # @param app_id
93
+ # @param create_api_key_request
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [CreateApiKeyResponse]
96
+ describe 'create_api_key test' do
97
+ it 'should work' do
98
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
99
+ end
100
+ end
101
+
75
102
  # unit tests for create_app
76
103
  # Create an app
77
104
  # Creates a new OneSignal app
@@ -84,6 +111,19 @@ describe 'DefaultApi' do
84
111
  end
85
112
  end
86
113
 
114
+ # unit tests for create_custom_events
115
+ # Create custom events
116
+ # The Custom Events API allows you to record user events. Custom events can represent any action users take in your application, such as completing a purchase, viewing content, or achieving milestones.
117
+ # @param app_id Your OneSignal App ID in UUID v4 format.
118
+ # @param custom_events_request
119
+ # @param [Hash] opts the optional parameters
120
+ # @return [Object]
121
+ describe 'create_custom_events test' do
122
+ it 'should work' do
123
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
124
+ end
125
+ end
126
+
87
127
  # unit tests for create_notification
88
128
  # Create notification
89
129
  # Sends notifications to your users
@@ -123,6 +163,18 @@ describe 'DefaultApi' do
123
163
  end
124
164
  end
125
165
 
166
+ # unit tests for create_template
167
+ # Create template
168
+ # Create reusable message templates for push, email, and SMS channels.
169
+ # @param create_template_request
170
+ # @param [Hash] opts the optional parameters
171
+ # @return [TemplateResource]
172
+ describe 'create_template test' do
173
+ it 'should work' do
174
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
175
+ end
176
+ end
177
+
126
178
  # unit tests for create_user
127
179
  # Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
128
180
  # @param app_id
@@ -149,6 +201,19 @@ describe 'DefaultApi' do
149
201
  end
150
202
  end
151
203
 
204
+ # unit tests for delete_api_key
205
+ # Delete API key
206
+ # Delete a specific Rich Authentication Token (App API Key) for a OneSignal app. Requires your Organization API Key and the token’s unique ID, not the token value itself.
207
+ # @param app_id
208
+ # @param token_id
209
+ # @param [Hash] opts the optional parameters
210
+ # @return [Object]
211
+ describe 'delete_api_key test' do
212
+ it 'should work' do
213
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
214
+ end
215
+ end
216
+
152
217
  # unit tests for delete_segment
153
218
  # Delete Segment
154
219
  # Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
@@ -174,6 +239,19 @@ describe 'DefaultApi' do
174
239
  end
175
240
  end
176
241
 
242
+ # unit tests for delete_template
243
+ # Delete template
244
+ # Delete a template by id.
245
+ # @param template_id
246
+ # @param app_id
247
+ # @param [Hash] opts the optional parameters
248
+ # @return [GenericSuccessBoolResponse]
249
+ describe 'delete_template test' do
250
+ it 'should work' do
251
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
252
+ end
253
+ end
254
+
177
255
  # unit tests for delete_user
178
256
  # Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
179
257
  # @param app_id
@@ -346,6 +424,33 @@ describe 'DefaultApi' do
346
424
  end
347
425
  end
348
426
 
427
+ # unit tests for rotate_api_key
428
+ # Rotate API key
429
+ # Rotate a Rich Authentication Token (App API Key) for a OneSignal app. Rotating a key revokes the current token and generates a new one under the same configuration—ideal when a token is lost or compromised but you don’t want to recreate and reconfigure it from scratch.
430
+ # @param app_id
431
+ # @param token_id
432
+ # @param [Hash] opts the optional parameters
433
+ # @return [CreateApiKeyResponse]
434
+ describe 'rotate_api_key test' do
435
+ it 'should work' do
436
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
437
+ end
438
+ end
439
+
440
+ # unit tests for start_live_activity
441
+ # Start Live Activity
442
+ # Remotely start a Live Activity on iOS devices via OneSignal’s REST API.
443
+ # @param app_id Your OneSignal App ID in UUID v4 format.
444
+ # @param activity_type The name of the Live Activity defined in your app. This should match the attributes struct used in your app&#39;s Live Activity implementation.
445
+ # @param start_live_activity_request
446
+ # @param [Hash] opts the optional parameters
447
+ # @return [StartLiveActivitySuccessResponse]
448
+ describe 'start_live_activity test' do
449
+ it 'should work' do
450
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
451
+ end
452
+ end
453
+
349
454
  # unit tests for transfer_subscription
350
455
  # Transfers this Subscription to the User identified by the identity in the payload.
351
456
  # @param app_id
@@ -373,6 +478,20 @@ describe 'DefaultApi' do
373
478
  end
374
479
  end
375
480
 
481
+ # unit tests for update_api_key
482
+ # Update API key
483
+ # Update a Rich Authentication Token (App API Key) for a OneSignal app.
484
+ # @param app_id
485
+ # @param token_id
486
+ # @param update_api_key_request
487
+ # @param [Hash] opts the optional parameters
488
+ # @return [Object]
489
+ describe 'update_api_key test' do
490
+ it 'should work' do
491
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
492
+ end
493
+ end
494
+
376
495
  # unit tests for update_app
377
496
  # Update an app
378
497
  # Updates the name or configuration settings of an existing OneSignal app
@@ -413,6 +532,35 @@ describe 'DefaultApi' do
413
532
  end
414
533
  end
415
534
 
535
+ # unit tests for update_subscription_by_token
536
+ # Update subscription by token
537
+ # Update properties on an existing OneSignal subscription using its token.
538
+ # @param app_id Your OneSignal App ID in UUID v4 format.
539
+ # @param token_type The type of token to use when looking up the subscription. See Subscription Types.
540
+ # @param token The value of the token to lookup by (e.g., email address, phone number).
541
+ # @param subscription_body
542
+ # @param [Hash] opts the optional parameters
543
+ # @return [Object]
544
+ describe 'update_subscription_by_token test' do
545
+ it 'should work' do
546
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
547
+ end
548
+ end
549
+
550
+ # unit tests for update_template
551
+ # Update template
552
+ # Update an existing template.
553
+ # @param template_id
554
+ # @param app_id
555
+ # @param update_template_request
556
+ # @param [Hash] opts the optional parameters
557
+ # @return [TemplateResource]
558
+ describe 'update_template test' do
559
+ it 'should work' do
560
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
561
+ end
562
+ end
563
+
416
564
  # unit tests for update_user
417
565
  # Updates an existing User’s properties.
418
566
  # @param app_id
@@ -427,4 +575,44 @@ describe 'DefaultApi' do
427
575
  end
428
576
  end
429
577
 
578
+ # unit tests for view_api_keys
579
+ # View API keys
580
+ # View the details of all of your current app API keys (Rich Authentication Token) for a single OneSignal app.
581
+ # @param app_id
582
+ # @param [Hash] opts the optional parameters
583
+ # @return [ApiKeyTokensListResponse]
584
+ describe 'view_api_keys test' do
585
+ it 'should work' do
586
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
587
+ end
588
+ end
589
+
590
+ # unit tests for view_template
591
+ # View template
592
+ # Fetch a single template by id.
593
+ # @param template_id
594
+ # @param app_id
595
+ # @param [Hash] opts the optional parameters
596
+ # @return [TemplateResource]
597
+ describe 'view_template test' do
598
+ it 'should work' do
599
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
600
+ end
601
+ end
602
+
603
+ # unit tests for view_templates
604
+ # View templates
605
+ # List templates for an app.
606
+ # @param app_id Your OneSignal App ID in UUID v4 format.
607
+ # @param [Hash] opts the optional parameters
608
+ # @option opts [Integer] :limit Maximum number of templates. Default and max is 50.
609
+ # @option opts [Integer] :offset Pagination offset.
610
+ # @option opts [String] :channel Filter by delivery channel.
611
+ # @return [TemplatesListResponse]
612
+ describe 'view_templates test' do
613
+ it 'should work' do
614
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
615
+ end
616
+ end
617
+
430
618
  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