pingram 1.0.31 → 1.0.32
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/Gemfile.lock +2 -2
- data/lib/pingram/api/broadcasts_api.rb +912 -0
- data/lib/pingram/api/library_api.rb +161 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +20 -0
- data/lib/pingram/models/broadcast_metrics_response.rb +480 -0
- data/lib/pingram/models/broadcast_response.rb +525 -0
- data/lib/pingram/models/broadcast_response_audience.rb +161 -0
- data/lib/pingram/models/create_broadcast_request.rb +366 -0
- data/lib/pingram/models/create_library_request.rb +192 -0
- data/lib/pingram/models/create_library_response.rb +346 -0
- data/lib/pingram/models/get_users_response_users_inner.rb +13 -1
- data/lib/pingram/models/get_users_response_users_inner_properties_value.rb +104 -0
- data/lib/pingram/models/list_broadcast_recipients_response.rb +175 -0
- data/lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb +324 -0
- data/lib/pingram/models/list_broadcasts_response.rb +175 -0
- data/lib/pingram/models/list_broadcasts_response_broadcasts_inner.rb +487 -0
- data/lib/pingram/models/list_library_response.rb +175 -0
- data/lib/pingram/models/list_library_response_items_inner.rb +344 -0
- data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
- data/lib/pingram/models/mfa_status_response.rb +1 -1
- data/lib/pingram/models/post_user_request.rb +16 -4
- data/lib/pingram/models/schedule_broadcast_request.rb +165 -0
- data/lib/pingram/models/sender_post_body_to.rb +13 -1
- data/lib/pingram/models/sender_post_body_user.rb +13 -1
- data/lib/pingram/models/update_broadcast_request.rb +264 -0
- data/lib/pingram/models/user.rb +13 -1
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.3.gem +0 -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 → io-console-0.9.3}/gem_make.out +11 -10
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.3/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.3}/mkmf.log +10 -6
- 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
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/Makefile +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/console.c +98 -13
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/extconf.rb +15 -1
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/lib/io/console/size.rb +4 -2
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.3/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.9.2.gemspec → io-console-0.9.3.gemspec} +3 -3
- metadata +35 -18
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/lib/io/console.so +0 -0
- /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.3}/gem.build_complete +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/.document +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/BSDL +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/COPYING +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/README.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/win32_vk.inc +0 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class ListLibraryResponseItemsInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :use_case
|
|
21
|
+
|
|
22
|
+
attr_accessor :filename
|
|
23
|
+
|
|
24
|
+
attr_accessor :key
|
|
25
|
+
|
|
26
|
+
attr_accessor :url
|
|
27
|
+
|
|
28
|
+
attr_accessor :size
|
|
29
|
+
|
|
30
|
+
attr_accessor :last_modified
|
|
31
|
+
|
|
32
|
+
class EnumAttributeValidator
|
|
33
|
+
attr_reader :datatype
|
|
34
|
+
attr_reader :allowable_values
|
|
35
|
+
|
|
36
|
+
def initialize(datatype, allowable_values)
|
|
37
|
+
@allowable_values = allowable_values.map do |value|
|
|
38
|
+
case datatype.to_s
|
|
39
|
+
when /Integer/i
|
|
40
|
+
value.to_i
|
|
41
|
+
when /Float/i
|
|
42
|
+
value.to_f
|
|
43
|
+
else
|
|
44
|
+
value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def valid?(value)
|
|
50
|
+
!value || allowable_values.include?(value)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'id' => :'id',
|
|
58
|
+
:'use_case' => :'useCase',
|
|
59
|
+
:'filename' => :'filename',
|
|
60
|
+
:'key' => :'key',
|
|
61
|
+
:'url' => :'url',
|
|
62
|
+
:'size' => :'size',
|
|
63
|
+
:'last_modified' => :'lastModified'
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns attribute mapping this model knows about
|
|
68
|
+
def self.acceptable_attribute_map
|
|
69
|
+
attribute_map
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
acceptable_attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'id' => :'String',
|
|
81
|
+
:'use_case' => :'String',
|
|
82
|
+
:'filename' => :'String',
|
|
83
|
+
:'key' => :'String',
|
|
84
|
+
:'url' => :'String',
|
|
85
|
+
:'size' => :'Float',
|
|
86
|
+
:'last_modified' => :'String'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# List of attributes with nullable: true
|
|
91
|
+
def self.openapi_nullable
|
|
92
|
+
Set.new([
|
|
93
|
+
])
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Initializes the object
|
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
98
|
+
def initialize(attributes = {})
|
|
99
|
+
if (!attributes.is_a?(Hash))
|
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ListLibraryResponseItemsInner` initialize method"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
104
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
106
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ListLibraryResponseItemsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
108
|
+
end
|
|
109
|
+
h[k.to_sym] = v
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'id')
|
|
113
|
+
self.id = attributes[:'id']
|
|
114
|
+
else
|
|
115
|
+
self.id = nil
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'use_case')
|
|
119
|
+
self.use_case = attributes[:'use_case']
|
|
120
|
+
else
|
|
121
|
+
self.use_case = nil
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'filename')
|
|
125
|
+
self.filename = attributes[:'filename']
|
|
126
|
+
else
|
|
127
|
+
self.filename = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'key')
|
|
131
|
+
self.key = attributes[:'key']
|
|
132
|
+
else
|
|
133
|
+
self.key = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'url')
|
|
137
|
+
self.url = attributes[:'url']
|
|
138
|
+
else
|
|
139
|
+
self.url = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'size')
|
|
143
|
+
self.size = attributes[:'size']
|
|
144
|
+
else
|
|
145
|
+
self.size = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'last_modified')
|
|
149
|
+
self.last_modified = attributes[:'last_modified']
|
|
150
|
+
else
|
|
151
|
+
self.last_modified = nil
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
156
|
+
# @return Array for valid properties with the reasons
|
|
157
|
+
def list_invalid_properties
|
|
158
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
159
|
+
invalid_properties = Array.new
|
|
160
|
+
if @id.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @use_case.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "use_case", use_case cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @filename.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "filename", filename cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @key.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @url.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if @size.nil?
|
|
181
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if @last_modified.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "last_modified", last_modified cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
invalid_properties
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Check to see if the all the properties in the model are valid
|
|
192
|
+
# @return true if the model is valid
|
|
193
|
+
def valid?
|
|
194
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
195
|
+
return false if @id.nil?
|
|
196
|
+
return false if @use_case.nil?
|
|
197
|
+
use_case_validator = EnumAttributeValidator.new('String', ["media", "logos"])
|
|
198
|
+
return false unless use_case_validator.valid?(@use_case)
|
|
199
|
+
return false if @filename.nil?
|
|
200
|
+
return false if @key.nil?
|
|
201
|
+
return false if @url.nil?
|
|
202
|
+
return false if @size.nil?
|
|
203
|
+
return false if @last_modified.nil?
|
|
204
|
+
true
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Custom attribute writer method with validation
|
|
208
|
+
# @param [Object] id Value to be assigned
|
|
209
|
+
def id=(id)
|
|
210
|
+
if id.nil?
|
|
211
|
+
fail ArgumentError, 'id cannot be nil'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@id = id
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
218
|
+
# @param [Object] use_case Object to be assigned
|
|
219
|
+
def use_case=(use_case)
|
|
220
|
+
validator = EnumAttributeValidator.new('String', ["media", "logos"])
|
|
221
|
+
unless validator.valid?(use_case)
|
|
222
|
+
fail ArgumentError, "invalid value for \"use_case\", must be one of #{validator.allowable_values}."
|
|
223
|
+
end
|
|
224
|
+
@use_case = use_case
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Custom attribute writer method with validation
|
|
228
|
+
# @param [Object] filename Value to be assigned
|
|
229
|
+
def filename=(filename)
|
|
230
|
+
if filename.nil?
|
|
231
|
+
fail ArgumentError, 'filename cannot be nil'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@filename = filename
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] key Value to be assigned
|
|
239
|
+
def key=(key)
|
|
240
|
+
if key.nil?
|
|
241
|
+
fail ArgumentError, 'key cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
@key = key
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Custom attribute writer method with validation
|
|
248
|
+
# @param [Object] url Value to be assigned
|
|
249
|
+
def url=(url)
|
|
250
|
+
if url.nil?
|
|
251
|
+
fail ArgumentError, 'url cannot be nil'
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
@url = url
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Custom attribute writer method with validation
|
|
258
|
+
# @param [Object] size Value to be assigned
|
|
259
|
+
def size=(size)
|
|
260
|
+
if size.nil?
|
|
261
|
+
fail ArgumentError, 'size cannot be nil'
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
@size = size
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Custom attribute writer method with validation
|
|
268
|
+
# @param [Object] last_modified Value to be assigned
|
|
269
|
+
def last_modified=(last_modified)
|
|
270
|
+
if last_modified.nil?
|
|
271
|
+
fail ArgumentError, 'last_modified cannot be nil'
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
@last_modified = last_modified
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Checks equality by comparing each attribute.
|
|
278
|
+
# @param [Object] Object to be compared
|
|
279
|
+
def ==(o)
|
|
280
|
+
return true if self.equal?(o)
|
|
281
|
+
self.class == o.class &&
|
|
282
|
+
id == o.id &&
|
|
283
|
+
use_case == o.use_case &&
|
|
284
|
+
filename == o.filename &&
|
|
285
|
+
key == o.key &&
|
|
286
|
+
url == o.url &&
|
|
287
|
+
size == o.size &&
|
|
288
|
+
last_modified == o.last_modified
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# @see the `==` method
|
|
292
|
+
# @param [Object] Object to be compared
|
|
293
|
+
def eql?(o)
|
|
294
|
+
self == o
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Calculates hash code according to all attributes.
|
|
298
|
+
# @return [Integer] Hash code
|
|
299
|
+
def hash
|
|
300
|
+
[id, use_case, filename, key, url, size, last_modified].hash
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Builds the object from hash
|
|
304
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
305
|
+
# @return [Object] Returns the model itself
|
|
306
|
+
def self.build_from_hash(attributes)
|
|
307
|
+
return nil unless attributes.is_a?(Hash)
|
|
308
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
309
|
+
transformed_hash = {}
|
|
310
|
+
openapi_types.each_pair do |key, type|
|
|
311
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
312
|
+
transformed_hash["#{key}"] = nil
|
|
313
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
314
|
+
# check to ensure the input is an array given that the attribute
|
|
315
|
+
# is documented as an array but the input is not
|
|
316
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
317
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
318
|
+
end
|
|
319
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
320
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
new(transformed_hash)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Returns the object in the form of hash
|
|
327
|
+
# @return [Hash] Returns the object in the form of hash
|
|
328
|
+
def to_hash
|
|
329
|
+
hash = {}
|
|
330
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
331
|
+
value = self.send(attr)
|
|
332
|
+
if value.nil?
|
|
333
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
334
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
hash[param] = _to_hash(value)
|
|
338
|
+
end
|
|
339
|
+
hash
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
end
|
|
@@ -1554,9 +1554,9 @@ module Pingram
|
|
|
1554
1554
|
return false unless slack_failed_code_validator.valid?(@slack_failed_code)
|
|
1555
1555
|
call_delivered_code_validator = EnumAttributeValidator.new('String', ["COMPLETED", "BUSY", "NO_ANSWER", "UNKNOWN"])
|
|
1556
1556
|
return false unless call_delivered_code_validator.valid?(@call_delivered_code)
|
|
1557
|
-
call_failed_code_validator = EnumAttributeValidator.new('String', ["13224", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1557
|
+
call_failed_code_validator = EnumAttributeValidator.new('String', ["13224", "10002", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1558
1558
|
return false unless call_failed_code_validator.valid?(@call_failed_code)
|
|
1559
|
-
sms_failed_code_validator = EnumAttributeValidator.new('String', ["13224", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1559
|
+
sms_failed_code_validator = EnumAttributeValidator.new('String', ["13224", "10002", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1560
1560
|
return false unless sms_failed_code_validator.valid?(@sms_failed_code)
|
|
1561
1561
|
true
|
|
1562
1562
|
end
|
|
@@ -1814,7 +1814,7 @@ module Pingram
|
|
|
1814
1814
|
# Custom attribute writer method checking allowed values (enum).
|
|
1815
1815
|
# @param [Object] call_failed_code Object to be assigned
|
|
1816
1816
|
def call_failed_code=(call_failed_code)
|
|
1817
|
-
validator = EnumAttributeValidator.new('String', ["13224", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1817
|
+
validator = EnumAttributeValidator.new('String', ["13224", "10002", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1818
1818
|
unless validator.valid?(call_failed_code)
|
|
1819
1819
|
fail ArgumentError, "invalid value for \"call_failed_code\", must be one of #{validator.allowable_values}."
|
|
1820
1820
|
end
|
|
@@ -1824,7 +1824,7 @@ module Pingram
|
|
|
1824
1824
|
# Custom attribute writer method checking allowed values (enum).
|
|
1825
1825
|
# @param [Object] sms_failed_code Object to be assigned
|
|
1826
1826
|
def sms_failed_code=(sms_failed_code)
|
|
1827
|
-
validator = EnumAttributeValidator.new('String', ["13224", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1827
|
+
validator = EnumAttributeValidator.new('String', ["13224", "10002", "21211", "21215", "21265", "21610", "21614", "21612", "30005", "30006", "30007", "30008", "30453", "40001", "40002", "40010", "40300", "Unknown", "MISSING_SMS_RECIPIENT", "MISSING_SMS_MESSAGE", "INVALID_PHONE_NUMBER", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
|
|
1828
1828
|
unless validator.valid?(sms_failed_code)
|
|
1829
1829
|
fail ArgumentError, "invalid value for \"sms_failed_code\", must be one of #{validator.allowable_values}."
|
|
1830
1830
|
end
|
|
@@ -20,7 +20,7 @@ module Pingram
|
|
|
20
20
|
# MFA methods supported by the profile MFA API.
|
|
21
21
|
attr_accessor :preferred_mfa
|
|
22
22
|
|
|
23
|
-
# Whether the
|
|
23
|
+
# Whether the account is on a paid plan required to enable MFA.
|
|
24
24
|
attr_accessor :available
|
|
25
25
|
|
|
26
26
|
class EnumAttributeValidator
|
|
@@ -38,6 +38,9 @@ module Pingram
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :slack_token
|
|
40
40
|
|
|
41
|
+
# Custom key-value properties synced by the developer, used for audience segmentation (e.g. broadcast filters on user.properties.plan). Incremental identify calls shallow-merge keys (unset keys are preserved). Limits: max 25 keys, key length <= 64, string values <= 256 chars, serialized size <= 1KB.
|
|
42
|
+
attr_accessor :properties
|
|
43
|
+
|
|
41
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
45
|
def self.attribute_map
|
|
43
46
|
{
|
|
@@ -48,7 +51,8 @@ module Pingram
|
|
|
48
51
|
:'web_push_tokens' => :'webPushTokens',
|
|
49
52
|
:'timezone' => :'timezone',
|
|
50
53
|
:'slack_channel' => :'slackChannel',
|
|
51
|
-
:'slack_token' => :'slackToken'
|
|
54
|
+
:'slack_token' => :'slackToken',
|
|
55
|
+
:'properties' => :'properties'
|
|
52
56
|
}
|
|
53
57
|
end
|
|
54
58
|
|
|
@@ -72,7 +76,8 @@ module Pingram
|
|
|
72
76
|
:'web_push_tokens' => :'Array<GetUsersResponseUsersInnerWebPushTokensInner>',
|
|
73
77
|
:'timezone' => :'String',
|
|
74
78
|
:'slack_channel' => :'String',
|
|
75
|
-
:'slack_token' => :'GetUsersResponseUsersInnerSlackToken'
|
|
79
|
+
:'slack_token' => :'GetUsersResponseUsersInnerSlackToken',
|
|
80
|
+
:'properties' => :'Hash<String, GetUsersResponseUsersInnerPropertiesValue>'
|
|
76
81
|
}
|
|
77
82
|
end
|
|
78
83
|
|
|
@@ -133,6 +138,12 @@ module Pingram
|
|
|
133
138
|
if attributes.key?(:'slack_token')
|
|
134
139
|
self.slack_token = attributes[:'slack_token']
|
|
135
140
|
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'properties')
|
|
143
|
+
if (value = attributes[:'properties']).is_a?(Hash)
|
|
144
|
+
self.properties = value
|
|
145
|
+
end
|
|
146
|
+
end
|
|
136
147
|
end
|
|
137
148
|
|
|
138
149
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -162,7 +173,8 @@ module Pingram
|
|
|
162
173
|
web_push_tokens == o.web_push_tokens &&
|
|
163
174
|
timezone == o.timezone &&
|
|
164
175
|
slack_channel == o.slack_channel &&
|
|
165
|
-
slack_token == o.slack_token
|
|
176
|
+
slack_token == o.slack_token &&
|
|
177
|
+
properties == o.properties
|
|
166
178
|
end
|
|
167
179
|
|
|
168
180
|
# @see the `==` method
|
|
@@ -174,7 +186,7 @@ module Pingram
|
|
|
174
186
|
# Calculates hash code according to all attributes.
|
|
175
187
|
# @return [Integer] Hash code
|
|
176
188
|
def hash
|
|
177
|
-
[id, email, number, push_tokens, web_push_tokens, timezone, slack_channel, slack_token].hash
|
|
189
|
+
[id, email, number, push_tokens, web_push_tokens, timezone, slack_channel, slack_token, properties].hash
|
|
178
190
|
end
|
|
179
191
|
|
|
180
192
|
# Builds the object from hash
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class ScheduleBroadcastRequest < ApiModelBase
|
|
18
|
+
# ISO datetime in the future.
|
|
19
|
+
attr_accessor :send_at
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'send_at' => :'sendAt'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'send_at' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ScheduleBroadcastRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ScheduleBroadcastRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'send_at')
|
|
68
|
+
self.send_at = attributes[:'send_at']
|
|
69
|
+
else
|
|
70
|
+
self.send_at = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @send_at.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "send_at", send_at cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @send_at.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] send_at Value to be assigned
|
|
96
|
+
def send_at=(send_at)
|
|
97
|
+
if send_at.nil?
|
|
98
|
+
fail ArgumentError, 'send_at cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@send_at = send_at
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
send_at == o.send_at
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[send_at].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -39,6 +39,9 @@ module Pingram
|
|
|
39
39
|
|
|
40
40
|
attr_accessor :slack_token
|
|
41
41
|
|
|
42
|
+
# Custom key-value properties synced by the developer, used for audience segmentation (e.g. broadcast filters on user.properties.plan). Incremental identify calls shallow-merge keys (unset keys are preserved). Limits: max 25 keys, key length <= 64, string values <= 256 chars, serialized size <= 1KB.
|
|
43
|
+
attr_accessor :properties
|
|
44
|
+
|
|
42
45
|
# Last activity timestamp. Updated automatically. Read-only.
|
|
43
46
|
attr_accessor :last_seen_time
|
|
44
47
|
|
|
@@ -61,6 +64,7 @@ module Pingram
|
|
|
61
64
|
:'timezone' => :'timezone',
|
|
62
65
|
:'slack_channel' => :'slackChannel',
|
|
63
66
|
:'slack_token' => :'slackToken',
|
|
67
|
+
:'properties' => :'properties',
|
|
64
68
|
:'last_seen_time' => :'lastSeenTime',
|
|
65
69
|
:'updated_at' => :'updatedAt',
|
|
66
70
|
:'created_at' => :'createdAt',
|
|
@@ -89,6 +93,7 @@ module Pingram
|
|
|
89
93
|
:'timezone' => :'String',
|
|
90
94
|
:'slack_channel' => :'String',
|
|
91
95
|
:'slack_token' => :'GetUsersResponseUsersInnerSlackToken',
|
|
96
|
+
:'properties' => :'Hash<String, GetUsersResponseUsersInnerPropertiesValue>',
|
|
92
97
|
:'last_seen_time' => :'String',
|
|
93
98
|
:'updated_at' => :'String',
|
|
94
99
|
:'created_at' => :'String',
|
|
@@ -154,6 +159,12 @@ module Pingram
|
|
|
154
159
|
self.slack_token = attributes[:'slack_token']
|
|
155
160
|
end
|
|
156
161
|
|
|
162
|
+
if attributes.key?(:'properties')
|
|
163
|
+
if (value = attributes[:'properties']).is_a?(Hash)
|
|
164
|
+
self.properties = value
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
157
168
|
if attributes.key?(:'last_seen_time')
|
|
158
169
|
self.last_seen_time = attributes[:'last_seen_time']
|
|
159
170
|
end
|
|
@@ -199,6 +210,7 @@ module Pingram
|
|
|
199
210
|
timezone == o.timezone &&
|
|
200
211
|
slack_channel == o.slack_channel &&
|
|
201
212
|
slack_token == o.slack_token &&
|
|
213
|
+
properties == o.properties &&
|
|
202
214
|
last_seen_time == o.last_seen_time &&
|
|
203
215
|
updated_at == o.updated_at &&
|
|
204
216
|
created_at == o.created_at &&
|
|
@@ -214,7 +226,7 @@ module Pingram
|
|
|
214
226
|
# Calculates hash code according to all attributes.
|
|
215
227
|
# @return [Integer] Hash code
|
|
216
228
|
def hash
|
|
217
|
-
[id, email, number, push_tokens, web_push_tokens, timezone, slack_channel, slack_token, last_seen_time, updated_at, created_at, email_suppression_status].hash
|
|
229
|
+
[id, email, number, push_tokens, web_push_tokens, timezone, slack_channel, slack_token, properties, last_seen_time, updated_at, created_at, email_suppression_status].hash
|
|
218
230
|
end
|
|
219
231
|
|
|
220
232
|
# Builds the object from hash
|