onesignal 5.14.0 → 5.15.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/docs/BasicNotification.md +1 -1
- data/docs/DefaultApi.md +77 -0
- data/docs/EstimateNotificationRecipientsRequest.md +28 -0
- data/docs/EstimateNotificationRecipientsRequestAllOf.md +24 -0
- data/docs/EstimateNotificationRecipientsSuccessResponse.md +26 -0
- data/docs/Notification.md +1 -1
- data/docs/NotificationTarget.md +1 -1
- data/docs/NotificationWithMeta.md +1 -1
- data/docs/SegmentNotificationTarget.md +1 -1
- data/lib/onesignal/api/default_api.rb +68 -0
- data/lib/onesignal/api_client.rb +1 -1
- data/lib/onesignal/models/basic_notification.rb +1 -1
- data/lib/onesignal/models/estimate_notification_recipients_request.rb +326 -0
- data/lib/onesignal/models/estimate_notification_recipients_request_all_of.rb +288 -0
- data/lib/onesignal/models/estimate_notification_recipients_success_response.rb +260 -0
- data/lib/onesignal/models/notification.rb +1 -1
- data/lib/onesignal/models/notification_target.rb +1 -1
- data/lib/onesignal/models/notification_with_meta.rb +1 -1
- data/lib/onesignal/models/segment_notification_target.rb +1 -1
- data/lib/onesignal/version.rb +1 -1
- data/lib/onesignal.rb +3 -0
- data/spec/api/default_api_spec.rb +12 -0
- data/spec/models/estimate_notification_recipients_request_all_of_spec.rb +55 -0
- data/spec/models/estimate_notification_recipients_request_spec.rb +67 -0
- data/spec/models/estimate_notification_recipients_success_response_spec.rb +57 -0
- metadata +14 -2
|
@@ -0,0 +1,260 @@
|
|
|
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
|
+
Contact: devrel@onesignal.com
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
require 'time'
|
|
14
|
+
|
|
15
|
+
module OneSignal
|
|
16
|
+
class EstimateNotificationRecipientsSuccessResponse
|
|
17
|
+
# The estimated audience size based on the user targeting method you've set on the message, and the specific platforms the message is targeted to send to.
|
|
18
|
+
attr_accessor :count
|
|
19
|
+
|
|
20
|
+
# The estimated audience size before the plan's web push subscriber cap is applied. Present only when `cap_applied` is `true`; `null` otherwise.
|
|
21
|
+
attr_accessor :uncapped_count
|
|
22
|
+
|
|
23
|
+
# Whether `count` was reduced because the app is on a plan that caps the number of web push subscribers it can send to.
|
|
24
|
+
attr_accessor :cap_applied
|
|
25
|
+
|
|
26
|
+
# The mobile equivalent of `cap_applied`. Whether mobile push deliveries will be dropped for this send because the org is over its plan's mobile push subscriber cap. `false` when the notification doesn't target any mobile push platforms.
|
|
27
|
+
attr_accessor :mobile_suppressed
|
|
28
|
+
|
|
29
|
+
# How many mobile push recipients the `count` excludes due to the plan's mobile push subscriber cap. `0` when `mobile_suppressed` is `false`.
|
|
30
|
+
attr_accessor :mobile_excluded_count
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'count' => :'count',
|
|
36
|
+
:'uncapped_count' => :'uncapped_count',
|
|
37
|
+
:'cap_applied' => :'cap_applied',
|
|
38
|
+
:'mobile_suppressed' => :'mobile_suppressed',
|
|
39
|
+
:'mobile_excluded_count' => :'mobile_excluded_count'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'count' => :'Integer',
|
|
52
|
+
:'uncapped_count' => :'Integer',
|
|
53
|
+
:'cap_applied' => :'Boolean',
|
|
54
|
+
:'mobile_suppressed' => :'Boolean',
|
|
55
|
+
:'mobile_excluded_count' => :'Integer'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
:'uncapped_count',
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::EstimateNotificationRecipientsSuccessResponse` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::EstimateNotificationRecipientsSuccessResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'count')
|
|
82
|
+
self.count = attributes[:'count']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'uncapped_count')
|
|
86
|
+
self.uncapped_count = attributes[:'uncapped_count']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'cap_applied')
|
|
90
|
+
self.cap_applied = attributes[:'cap_applied']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'mobile_suppressed')
|
|
94
|
+
self.mobile_suppressed = attributes[:'mobile_suppressed']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'mobile_excluded_count')
|
|
98
|
+
self.mobile_excluded_count = attributes[:'mobile_excluded_count']
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
103
|
+
# @return Array for valid properties with the reasons
|
|
104
|
+
def list_invalid_properties
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
true
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
count == o.count &&
|
|
121
|
+
uncapped_count == o.uncapped_count &&
|
|
122
|
+
cap_applied == o.cap_applied &&
|
|
123
|
+
mobile_suppressed == o.mobile_suppressed &&
|
|
124
|
+
mobile_excluded_count == o.mobile_excluded_count
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @see the `==` method
|
|
128
|
+
# @param [Object] Object to be compared
|
|
129
|
+
def eql?(o)
|
|
130
|
+
self == o
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Calculates hash code according to all attributes.
|
|
134
|
+
# @return [Integer] Hash code
|
|
135
|
+
def hash
|
|
136
|
+
[count, uncapped_count, cap_applied, mobile_suppressed, mobile_excluded_count].hash
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Builds the object from hash
|
|
140
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
141
|
+
# @return [Object] Returns the model itself
|
|
142
|
+
def self.build_from_hash(attributes)
|
|
143
|
+
new.build_from_hash(attributes)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def build_from_hash(attributes)
|
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
|
151
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
152
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
153
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
154
|
+
self.send("#{key}=", nil)
|
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
156
|
+
# check to ensure the input is an array given that the attribute
|
|
157
|
+
# is documented as an array but the input is not
|
|
158
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
159
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
160
|
+
end
|
|
161
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
162
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
self
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Deserializes the data based on type
|
|
170
|
+
# @param string type Data type
|
|
171
|
+
# @param string value Value to be deserialized
|
|
172
|
+
# @return [Object] Deserialized data
|
|
173
|
+
def _deserialize(type, value)
|
|
174
|
+
case type.to_sym
|
|
175
|
+
when :Time
|
|
176
|
+
Time.parse(value)
|
|
177
|
+
when :Date
|
|
178
|
+
Date.parse(value)
|
|
179
|
+
when :String
|
|
180
|
+
value.to_s
|
|
181
|
+
when :Integer
|
|
182
|
+
value.to_i
|
|
183
|
+
when :Float
|
|
184
|
+
value.to_f
|
|
185
|
+
when :Boolean
|
|
186
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
187
|
+
true
|
|
188
|
+
else
|
|
189
|
+
false
|
|
190
|
+
end
|
|
191
|
+
when :Object
|
|
192
|
+
# generic object (usually a Hash), return directly
|
|
193
|
+
value
|
|
194
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
195
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
196
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
197
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
198
|
+
k_type = Regexp.last_match[:k_type]
|
|
199
|
+
v_type = Regexp.last_match[:v_type]
|
|
200
|
+
{}.tap do |hash|
|
|
201
|
+
value.each do |k, v|
|
|
202
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
else # model
|
|
206
|
+
# models (e.g. Pet) or oneOf
|
|
207
|
+
klass = OneSignal.const_get(type)
|
|
208
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the string representation of the object
|
|
213
|
+
# @return [String] String presentation of the object
|
|
214
|
+
def to_s
|
|
215
|
+
to_hash.to_s
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
|
220
|
+
def to_body
|
|
221
|
+
to_hash
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Outputs non-array value in the form of hash
|
|
241
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
242
|
+
# @param [Object] value Any valid value
|
|
243
|
+
# @return [Hash] Returns the value in the form of hash
|
|
244
|
+
def _to_hash(value)
|
|
245
|
+
if value.is_a?(Array)
|
|
246
|
+
value.compact.map { |v| _to_hash(v) }
|
|
247
|
+
elsif value.is_a?(Hash)
|
|
248
|
+
{}.tap do |hash|
|
|
249
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
250
|
+
end
|
|
251
|
+
elsif value.respond_to? :to_hash
|
|
252
|
+
value.to_hash
|
|
253
|
+
else
|
|
254
|
+
value
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'time'
|
|
|
14
14
|
|
|
15
15
|
module OneSignal
|
|
16
16
|
class Notification
|
|
17
|
-
# 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\"]
|
|
17
|
+
# 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\"] `\"All\"` is a shorthand for every subscribed user: if the array includes the string `\"All\"` and the app has no segment actually named `All`, it targets all subscribers instead of a literal segment lookup.
|
|
18
18
|
attr_accessor :included_segments
|
|
19
19
|
|
|
20
20
|
# 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\"]
|
|
@@ -14,7 +14,7 @@ require 'time'
|
|
|
14
14
|
|
|
15
15
|
module OneSignal
|
|
16
16
|
class NotificationTarget
|
|
17
|
-
# 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\"]
|
|
17
|
+
# 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\"] `\"All\"` is a shorthand for every subscribed user: if the array includes the string `\"All\"` and the app has no segment actually named `All`, it targets all subscribers instead of a literal segment lookup.
|
|
18
18
|
attr_accessor :included_segments
|
|
19
19
|
|
|
20
20
|
# 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\"]
|
|
@@ -14,7 +14,7 @@ require 'time'
|
|
|
14
14
|
|
|
15
15
|
module OneSignal
|
|
16
16
|
class NotificationWithMeta
|
|
17
|
-
# 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\"]
|
|
17
|
+
# 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\"] `\"All\"` is a shorthand for every subscribed user: if the array includes the string `\"All\"` and the app has no segment actually named `All`, it targets all subscribers instead of a literal segment lookup.
|
|
18
18
|
attr_accessor :included_segments
|
|
19
19
|
|
|
20
20
|
# 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\"]
|
|
@@ -14,7 +14,7 @@ require 'time'
|
|
|
14
14
|
|
|
15
15
|
module OneSignal
|
|
16
16
|
class SegmentNotificationTarget
|
|
17
|
-
# 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\"]
|
|
17
|
+
# 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\"] `\"All\"` is a shorthand for every subscribed user: if the array includes the string `\"All\"` and the app has no segment actually named `All`, it targets all subscribers instead of a literal segment lookup.
|
|
18
18
|
attr_accessor :included_segments
|
|
19
19
|
|
|
20
20
|
# 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\"]
|
data/lib/onesignal/version.rb
CHANGED
data/lib/onesignal.rb
CHANGED
|
@@ -45,6 +45,9 @@ require 'onesignal/models/delivery_data'
|
|
|
45
45
|
require 'onesignal/models/email_warm_up'
|
|
46
46
|
require 'onesignal/models/email_warm_up_request'
|
|
47
47
|
require 'onesignal/models/email_warm_up_stage'
|
|
48
|
+
require 'onesignal/models/estimate_notification_recipients_request'
|
|
49
|
+
require 'onesignal/models/estimate_notification_recipients_request_all_of'
|
|
50
|
+
require 'onesignal/models/estimate_notification_recipients_success_response'
|
|
48
51
|
require 'onesignal/models/export_events_success_response'
|
|
49
52
|
require 'onesignal/models/export_subscriptions_request_body'
|
|
50
53
|
require 'onesignal/models/export_subscriptions_success_response'
|
|
@@ -290,6 +290,18 @@ describe 'DefaultApi' do
|
|
|
290
290
|
end
|
|
291
291
|
end
|
|
292
292
|
|
|
293
|
+
# unit tests for estimate_notification_recipients
|
|
294
|
+
# Estimate notification recipients
|
|
295
|
+
# Returns the estimated number of recipients for a notification's targeting, without creating or sending anything. The returned `count` reflects the same audience-size estimate you would see under \"Choose your target audience\" when composing a message. It is based on the user targeting method you've set and the specific platforms the message is targeted to send to. This endpoint only supports a subset of targeting parameters: `included_segments` is required (its `\"All\"` shorthand targets every subscriber), and `excluded_segments`, `filters`, `include_aliases`, and `target_channel` narrow that audience further. Use `target_channel` to select platforms. `include_subscription_ids` and the other raw subscription id/token fields, and the individual `isIos` / `isAndroid` / etc. platform flags, are not supported. All other notification fields (content, delivery options, and so on) are accepted, but ignored.
|
|
296
|
+
# @param estimate_notification_recipients_request
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @return [EstimateNotificationRecipientsSuccessResponse]
|
|
299
|
+
describe 'estimate_notification_recipients test' do
|
|
300
|
+
it 'should work' do
|
|
301
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
|
|
293
305
|
# unit tests for export_events
|
|
294
306
|
# Export CSV of Events
|
|
295
307
|
# Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
Contact: devrel@onesignal.com
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'spec_helper'
|
|
13
|
+
require 'json'
|
|
14
|
+
require 'date'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneSignal::EstimateNotificationRecipientsRequestAllOf
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe OneSignal::EstimateNotificationRecipientsRequestAllOf do
|
|
20
|
+
let(:instance) { OneSignal::EstimateNotificationRecipientsRequestAllOf.new }
|
|
21
|
+
|
|
22
|
+
describe 'test an instance of EstimateNotificationRecipientsRequestAllOf' do
|
|
23
|
+
it 'should create an instance of EstimateNotificationRecipientsRequestAllOf' do
|
|
24
|
+
expect(instance).to be_instance_of(OneSignal::EstimateNotificationRecipientsRequestAllOf)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
describe 'test attribute "app_id"' do
|
|
28
|
+
it 'should work' do
|
|
29
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe 'test attribute "filters"' do
|
|
34
|
+
it 'should work' do
|
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
describe 'test attribute "include_aliases"' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "target_channel"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
48
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["push", "email", "sms"])
|
|
49
|
+
# validator.allowable_values.each do |value|
|
|
50
|
+
# expect { instance.target_channel = value }.not_to raise_error
|
|
51
|
+
# end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
Contact: devrel@onesignal.com
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'spec_helper'
|
|
13
|
+
require 'json'
|
|
14
|
+
require 'date'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneSignal::EstimateNotificationRecipientsRequest
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe OneSignal::EstimateNotificationRecipientsRequest do
|
|
20
|
+
let(:instance) { OneSignal::EstimateNotificationRecipientsRequest.new }
|
|
21
|
+
|
|
22
|
+
describe 'test an instance of EstimateNotificationRecipientsRequest' do
|
|
23
|
+
it 'should create an instance of EstimateNotificationRecipientsRequest' do
|
|
24
|
+
expect(instance).to be_instance_of(OneSignal::EstimateNotificationRecipientsRequest)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
describe 'test attribute "included_segments"' do
|
|
28
|
+
it 'should work' do
|
|
29
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe 'test attribute "excluded_segments"' do
|
|
34
|
+
it 'should work' do
|
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
describe 'test attribute "app_id"' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "filters"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
describe 'test attribute "include_aliases"' do
|
|
52
|
+
it 'should work' do
|
|
53
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
describe 'test attribute "target_channel"' do
|
|
58
|
+
it 'should work' do
|
|
59
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
60
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["push", "email", "sms"])
|
|
61
|
+
# validator.allowable_values.each do |value|
|
|
62
|
+
# expect { instance.target_channel = value }.not_to raise_error
|
|
63
|
+
# end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
Contact: devrel@onesignal.com
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'spec_helper'
|
|
13
|
+
require 'json'
|
|
14
|
+
require 'date'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneSignal::EstimateNotificationRecipientsSuccessResponse
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe OneSignal::EstimateNotificationRecipientsSuccessResponse do
|
|
20
|
+
let(:instance) { OneSignal::EstimateNotificationRecipientsSuccessResponse.new }
|
|
21
|
+
|
|
22
|
+
describe 'test an instance of EstimateNotificationRecipientsSuccessResponse' do
|
|
23
|
+
it 'should create an instance of EstimateNotificationRecipientsSuccessResponse' do
|
|
24
|
+
expect(instance).to be_instance_of(OneSignal::EstimateNotificationRecipientsSuccessResponse)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
describe 'test attribute "count"' do
|
|
28
|
+
it 'should work' do
|
|
29
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe 'test attribute "uncapped_count"' do
|
|
34
|
+
it 'should work' do
|
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
describe 'test attribute "cap_applied"' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "mobile_suppressed"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
describe 'test attribute "mobile_excluded_count"' do
|
|
52
|
+
it 'should work' do
|
|
53
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onesignal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OneSignal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -95,6 +95,9 @@ files:
|
|
|
95
95
|
- docs/EmailWarmUp.md
|
|
96
96
|
- docs/EmailWarmUpRequest.md
|
|
97
97
|
- docs/EmailWarmUpStage.md
|
|
98
|
+
- docs/EstimateNotificationRecipientsRequest.md
|
|
99
|
+
- docs/EstimateNotificationRecipientsRequestAllOf.md
|
|
100
|
+
- docs/EstimateNotificationRecipientsSuccessResponse.md
|
|
98
101
|
- docs/ExportEventsSuccessResponse.md
|
|
99
102
|
- docs/ExportSubscriptionsRequestBody.md
|
|
100
103
|
- docs/ExportSubscriptionsSuccessResponse.md
|
|
@@ -206,6 +209,9 @@ files:
|
|
|
206
209
|
- lib/onesignal/models/email_warm_up.rb
|
|
207
210
|
- lib/onesignal/models/email_warm_up_request.rb
|
|
208
211
|
- lib/onesignal/models/email_warm_up_stage.rb
|
|
212
|
+
- lib/onesignal/models/estimate_notification_recipients_request.rb
|
|
213
|
+
- lib/onesignal/models/estimate_notification_recipients_request_all_of.rb
|
|
214
|
+
- lib/onesignal/models/estimate_notification_recipients_success_response.rb
|
|
209
215
|
- lib/onesignal/models/export_events_success_response.rb
|
|
210
216
|
- lib/onesignal/models/export_subscriptions_request_body.rb
|
|
211
217
|
- lib/onesignal/models/export_subscriptions_success_response.rb
|
|
@@ -315,6 +321,9 @@ files:
|
|
|
315
321
|
- spec/models/email_warm_up_request_spec.rb
|
|
316
322
|
- spec/models/email_warm_up_spec.rb
|
|
317
323
|
- spec/models/email_warm_up_stage_spec.rb
|
|
324
|
+
- spec/models/estimate_notification_recipients_request_all_of_spec.rb
|
|
325
|
+
- spec/models/estimate_notification_recipients_request_spec.rb
|
|
326
|
+
- spec/models/estimate_notification_recipients_success_response_spec.rb
|
|
318
327
|
- spec/models/export_events_success_response_spec.rb
|
|
319
328
|
- spec/models/export_subscriptions_request_body_spec.rb
|
|
320
329
|
- spec/models/export_subscriptions_success_response_spec.rb
|
|
@@ -2536,6 +2545,7 @@ test_files:
|
|
|
2536
2545
|
- spec/models/get_notification_history_request_body_spec.rb
|
|
2537
2546
|
- spec/models/update_user_request_spec.rb
|
|
2538
2547
|
- spec/models/properties_deltas_spec.rb
|
|
2548
|
+
- spec/models/estimate_notification_recipients_request_spec.rb
|
|
2539
2549
|
- spec/models/notification_history_success_response_spec.rb
|
|
2540
2550
|
- spec/models/notification_spec.rb
|
|
2541
2551
|
- spec/models/journey_node_spec.rb
|
|
@@ -2569,7 +2579,9 @@ test_files:
|
|
|
2569
2579
|
- spec/models/create_template_request_spec.rb
|
|
2570
2580
|
- spec/models/list_audit_logs_success_response_spec.rb
|
|
2571
2581
|
- spec/models/create_api_key_response_spec.rb
|
|
2582
|
+
- spec/models/estimate_notification_recipients_request_all_of_spec.rb
|
|
2572
2583
|
- spec/models/journey_message_stats_spec.rb
|
|
2584
|
+
- spec/models/estimate_notification_recipients_success_response_spec.rb
|
|
2573
2585
|
- spec/models/outcomes_data_spec.rb
|
|
2574
2586
|
- spec/models/subscription_body_spec.rb
|
|
2575
2587
|
- spec/models/create_user_conflict_response_errors_inner_spec.rb
|