onesignal 5.14.0 → 5.16.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 +14 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/docs/BasicNotification.md +1 -1
- data/docs/DefaultApi.md +154 -0
- data/docs/EmailReputationResponse.md +22 -0
- data/docs/EmailReputationWindow.md +20 -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 +131 -0
- data/lib/onesignal/api_client.rb +1 -1
- data/lib/onesignal/models/basic_notification.rb +1 -1
- data/lib/onesignal/models/email_reputation_response.rb +237 -0
- data/lib/onesignal/models/email_reputation_window.rb +230 -0
- 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 +5 -0
- data/spec/api/default_api_spec.rb +24 -0
- data/spec/models/email_reputation_response_spec.rb +45 -0
- data/spec/models/email_reputation_window_spec.rb +39 -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
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- metadata +109 -89
|
@@ -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
|
@@ -42,9 +42,14 @@ require 'onesignal/models/create_user_conflict_response_errors_items_meta'
|
|
|
42
42
|
require 'onesignal/models/custom_event'
|
|
43
43
|
require 'onesignal/models/custom_events_request'
|
|
44
44
|
require 'onesignal/models/delivery_data'
|
|
45
|
+
require 'onesignal/models/email_reputation_response'
|
|
46
|
+
require 'onesignal/models/email_reputation_window'
|
|
45
47
|
require 'onesignal/models/email_warm_up'
|
|
46
48
|
require 'onesignal/models/email_warm_up_request'
|
|
47
49
|
require 'onesignal/models/email_warm_up_stage'
|
|
50
|
+
require 'onesignal/models/estimate_notification_recipients_request'
|
|
51
|
+
require 'onesignal/models/estimate_notification_recipients_request_all_of'
|
|
52
|
+
require 'onesignal/models/estimate_notification_recipients_success_response'
|
|
48
53
|
require 'onesignal/models/export_events_success_response'
|
|
49
54
|
require 'onesignal/models/export_subscriptions_request_body'
|
|
50
55
|
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.
|
|
@@ -364,6 +376,18 @@ describe 'DefaultApi' do
|
|
|
364
376
|
end
|
|
365
377
|
end
|
|
366
378
|
|
|
379
|
+
# unit tests for get_email_reputation
|
|
380
|
+
# Get email reputation statistics
|
|
381
|
+
# The email bounce and spam complaint rates received for the app over the last 24 hours, 7 days, and 30 days. Rates are expressed as fractions of successfully delivered emails (for example, `0.02` means 2%). A window reports `0` for both rates when the app has not successfully delivered any email in that period.
|
|
382
|
+
# @param app_id Your OneSignal App ID in UUID v4 format.
|
|
383
|
+
# @param [Hash] opts the optional parameters
|
|
384
|
+
# @return [EmailReputationResponse]
|
|
385
|
+
describe 'get_email_reputation test' do
|
|
386
|
+
it 'should work' do
|
|
387
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
|
|
367
391
|
# unit tests for get_notification
|
|
368
392
|
# View notification
|
|
369
393
|
# View the details of a single notification and outcomes associated with it
|
|
@@ -0,0 +1,45 @@
|
|
|
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::EmailReputationResponse
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe OneSignal::EmailReputationResponse do
|
|
20
|
+
let(:instance) { OneSignal::EmailReputationResponse.new }
|
|
21
|
+
|
|
22
|
+
describe 'test an instance of EmailReputationResponse' do
|
|
23
|
+
it 'should create an instance of EmailReputationResponse' do
|
|
24
|
+
expect(instance).to be_instance_of(OneSignal::EmailReputationResponse)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
describe 'test attribute "last_24_hours"' 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 "last_7_days"' 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 "last_30_days"' 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
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
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::EmailReputationWindow
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe OneSignal::EmailReputationWindow do
|
|
20
|
+
let(:instance) { OneSignal::EmailReputationWindow.new }
|
|
21
|
+
|
|
22
|
+
describe 'test an instance of EmailReputationWindow' do
|
|
23
|
+
it 'should create an instance of EmailReputationWindow' do
|
|
24
|
+
expect(instance).to be_instance_of(OneSignal::EmailReputationWindow)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
describe 'test attribute "bounce_rate"' 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 "complaint_rate"' 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
|
+
end
|
|
@@ -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
|
|
@@ -3,10 +3,10 @@ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendo
|
|
|
3
3
|
creating Makefile
|
|
4
4
|
|
|
5
5
|
current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
6
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
6
|
+
make DESTDIR\= sitearchdir\=./.gem.20260909-2239-n2pyhl sitelibdir\=./.gem.20260909-2239-n2pyhl clean
|
|
7
7
|
|
|
8
8
|
current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
9
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
9
|
+
make DESTDIR\= sitearchdir\=./.gem.20260909-2239-n2pyhl sitelibdir\=./.gem.20260909-2239-n2pyhl
|
|
10
10
|
compiling breakpoint.c
|
|
11
11
|
compiling byebug.c
|
|
12
12
|
byebug.c: In function ‘check_started’:
|
|
@@ -35,8 +35,8 @@ compiling threads.c
|
|
|
35
35
|
linking shared-object byebug/byebug.so
|
|
36
36
|
|
|
37
37
|
current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
38
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
39
|
-
/usr/bin/install -c -m 0755 byebug.so ./.gem.
|
|
38
|
+
make DESTDIR\= sitearchdir\=./.gem.20260909-2239-n2pyhl sitelibdir\=./.gem.20260909-2239-n2pyhl install
|
|
39
|
+
/usr/bin/install -c -m 0755 byebug.so ./.gem.20260909-2239-n2pyhl/byebug
|
|
40
40
|
|
|
41
41
|
current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
42
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
42
|
+
make DESTDIR\= sitearchdir\=./.gem.20260909-2239-n2pyhl sitelibdir\=./.gem.20260909-2239-n2pyhl clean
|