pingram 1.0.5 → 1.0.6
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/members_api.rb +10 -10
- data/lib/pingram/api/numbers_api.rb +214 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +10 -0
- data/lib/pingram/models/account_get_response.rb +19 -53
- data/lib/pingram/models/auto_join_get_response.rb +16 -16
- data/lib/pingram/models/auto_join_post_response.rb +16 -16
- data/lib/pingram/models/billing_post_response_body.rb +1 -1
- data/lib/pingram/models/get_members_response_inner.rb +27 -1
- data/lib/pingram/models/list_phone_numbers_response.rb +167 -0
- data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +202 -0
- data/lib/pingram/models/order_phone_number_request.rb +166 -0
- data/lib/pingram/models/order_phone_number_response.rb +217 -0
- data/lib/pingram/models/organization.rb +74 -222
- data/lib/pingram/models/phone_verify_confirm_request.rb +190 -0
- data/lib/pingram/models/phone_verify_confirm_response.rb +164 -0
- data/lib/pingram/models/phone_verify_start_request.rb +190 -0
- data/lib/pingram/models/phone_verify_start_response.rb +164 -0
- data/lib/pingram/models/search_available_phone_numbers_response.rb +167 -0
- data/lib/pingram/models/search_available_phone_numbers_response_numbers_inner.rb +206 -0
- data/lib/pingram/models/sender_post_body.rb +2 -0
- data/lib/pingram/models/sender_post_body_sms.rb +15 -5
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/cache/parallel-1.28.0.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.8.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.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.3.1/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/parallel-1.28.0/lib/parallel/version.rb +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/lib/parallel.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/specifications/{parallel-1.27.0.gemspec → parallel-1.28.0.gemspec} +4 -4
- metadata +18 -7
- data/vendor/bundle/ruby/3.2.0/cache/parallel-1.27.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/parallel-1.27.0/lib/parallel/version.rb +0 -4
- /data/vendor/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/MIT-LICENSE.txt +0 -0
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
|
-
# Organization
|
|
17
|
+
# Organization details for the authenticated account: identifiers, billing-cycle dates, usage caps (messages, SMS, calls, cost), and timestamps. Returned by GET /account/organization.
|
|
18
18
|
class Organization < ApiModelBase
|
|
19
19
|
attr_accessor :organization_id
|
|
20
20
|
|
|
@@ -22,51 +22,24 @@ module Pingram
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :creator
|
|
24
24
|
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
25
27
|
attr_accessor :messages_cap
|
|
26
28
|
|
|
27
29
|
attr_accessor :cost_cap
|
|
28
30
|
|
|
29
|
-
attr_accessor :
|
|
31
|
+
attr_accessor :sms_cap
|
|
30
32
|
|
|
31
|
-
attr_accessor :
|
|
33
|
+
attr_accessor :call_cap
|
|
32
34
|
|
|
33
35
|
# ISO date (YYYY-MM-DD) when the billing cycle resets.
|
|
34
36
|
attr_accessor :anniversary_date
|
|
35
37
|
|
|
36
38
|
attr_accessor :allow_overage
|
|
37
39
|
|
|
38
|
-
attr_accessor :
|
|
39
|
-
|
|
40
|
-
attr_accessor :sms_cap
|
|
41
|
-
|
|
42
|
-
attr_accessor :call_cap
|
|
43
|
-
|
|
44
|
-
# Stripe subscription ID.
|
|
45
|
-
attr_accessor :stripe_customer_id
|
|
46
|
-
|
|
47
|
-
attr_accessor :stripe_subscription_id
|
|
48
|
-
|
|
49
|
-
attr_accessor :subscription_status
|
|
50
|
-
|
|
51
|
-
# Verification status; internalCap applies when not 'verified'.
|
|
52
|
-
attr_accessor :status
|
|
53
|
-
|
|
54
|
-
# Unverified account cap (per-channel message limit).
|
|
55
|
-
attr_accessor :internal_cap
|
|
56
|
-
|
|
57
|
-
attr_accessor :pending_downgrade_cost_cap
|
|
58
|
-
|
|
59
|
-
attr_accessor :pending_downgrade_messages_cap
|
|
60
|
-
|
|
61
|
-
attr_accessor :pending_downgrade_sms_cap
|
|
62
|
-
|
|
63
|
-
attr_accessor :pending_downgrade_call_cap
|
|
64
|
-
|
|
65
|
-
attr_accessor :pending_downgrade_internal_cap
|
|
66
|
-
|
|
67
|
-
attr_accessor :pending_downgrade_effective_date
|
|
40
|
+
attr_accessor :created_at
|
|
68
41
|
|
|
69
|
-
attr_accessor :
|
|
42
|
+
attr_accessor :updated_at
|
|
70
43
|
|
|
71
44
|
class EnumAttributeValidator
|
|
72
45
|
attr_reader :datatype
|
|
@@ -96,27 +69,15 @@ module Pingram
|
|
|
96
69
|
:'organization_id' => :'organizationId',
|
|
97
70
|
:'organization_type' => :'organizationType',
|
|
98
71
|
:'creator' => :'creator',
|
|
72
|
+
:'name' => :'name',
|
|
99
73
|
:'messages_cap' => :'messagesCap',
|
|
100
74
|
:'cost_cap' => :'costCap',
|
|
101
|
-
:'created_at' => :'createdAt',
|
|
102
|
-
:'updated_at' => :'updatedAt',
|
|
103
|
-
:'anniversary_date' => :'anniversaryDate',
|
|
104
|
-
:'allow_overage' => :'allowOverage',
|
|
105
|
-
:'name' => :'name',
|
|
106
75
|
:'sms_cap' => :'smsCap',
|
|
107
76
|
:'call_cap' => :'callCap',
|
|
108
|
-
:'
|
|
109
|
-
:'
|
|
110
|
-
:'
|
|
111
|
-
:'
|
|
112
|
-
:'internal_cap' => :'internalCap',
|
|
113
|
-
:'pending_downgrade_cost_cap' => :'pendingDowngradeCostCap',
|
|
114
|
-
:'pending_downgrade_messages_cap' => :'pendingDowngradeMessagesCap',
|
|
115
|
-
:'pending_downgrade_sms_cap' => :'pendingDowngradeSmsCap',
|
|
116
|
-
:'pending_downgrade_call_cap' => :'pendingDowngradeCallCap',
|
|
117
|
-
:'pending_downgrade_internal_cap' => :'pendingDowngradeInternalCap',
|
|
118
|
-
:'pending_downgrade_effective_date' => :'pendingDowngradeEffectiveDate',
|
|
119
|
-
:'pending_downgrade_account_type' => :'pendingDowngradeAccountType'
|
|
77
|
+
:'anniversary_date' => :'anniversaryDate',
|
|
78
|
+
:'allow_overage' => :'allowOverage',
|
|
79
|
+
:'created_at' => :'createdAt',
|
|
80
|
+
:'updated_at' => :'updatedAt'
|
|
120
81
|
}
|
|
121
82
|
end
|
|
122
83
|
|
|
@@ -136,34 +97,21 @@ module Pingram
|
|
|
136
97
|
:'organization_id' => :'String',
|
|
137
98
|
:'organization_type' => :'String',
|
|
138
99
|
:'creator' => :'String',
|
|
100
|
+
:'name' => :'String',
|
|
139
101
|
:'messages_cap' => :'Float',
|
|
140
102
|
:'cost_cap' => :'Float',
|
|
141
|
-
:'created_at' => :'String',
|
|
142
|
-
:'updated_at' => :'String',
|
|
143
|
-
:'anniversary_date' => :'String',
|
|
144
|
-
:'allow_overage' => :'Boolean',
|
|
145
|
-
:'name' => :'String',
|
|
146
103
|
:'sms_cap' => :'Float',
|
|
147
104
|
:'call_cap' => :'Float',
|
|
148
|
-
:'
|
|
149
|
-
:'
|
|
150
|
-
:'
|
|
151
|
-
:'
|
|
152
|
-
:'internal_cap' => :'Float',
|
|
153
|
-
:'pending_downgrade_cost_cap' => :'Float',
|
|
154
|
-
:'pending_downgrade_messages_cap' => :'Float',
|
|
155
|
-
:'pending_downgrade_sms_cap' => :'Float',
|
|
156
|
-
:'pending_downgrade_call_cap' => :'Float',
|
|
157
|
-
:'pending_downgrade_internal_cap' => :'Float',
|
|
158
|
-
:'pending_downgrade_effective_date' => :'String',
|
|
159
|
-
:'pending_downgrade_account_type' => :'String'
|
|
105
|
+
:'anniversary_date' => :'String',
|
|
106
|
+
:'allow_overage' => :'Boolean',
|
|
107
|
+
:'created_at' => :'String',
|
|
108
|
+
:'updated_at' => :'String'
|
|
160
109
|
}
|
|
161
110
|
end
|
|
162
111
|
|
|
163
112
|
# List of attributes with nullable: true
|
|
164
113
|
def self.openapi_nullable
|
|
165
114
|
Set.new([
|
|
166
|
-
:'subscription_status',
|
|
167
115
|
])
|
|
168
116
|
end
|
|
169
117
|
|
|
@@ -201,6 +149,12 @@ module Pingram
|
|
|
201
149
|
self.creator = nil
|
|
202
150
|
end
|
|
203
151
|
|
|
152
|
+
if attributes.key?(:'name')
|
|
153
|
+
self.name = attributes[:'name']
|
|
154
|
+
else
|
|
155
|
+
self.name = nil
|
|
156
|
+
end
|
|
157
|
+
|
|
204
158
|
if attributes.key?(:'messages_cap')
|
|
205
159
|
self.messages_cap = attributes[:'messages_cap']
|
|
206
160
|
else
|
|
@@ -213,16 +167,12 @@ module Pingram
|
|
|
213
167
|
self.cost_cap = nil
|
|
214
168
|
end
|
|
215
169
|
|
|
216
|
-
if attributes.key?(:'
|
|
217
|
-
self.
|
|
218
|
-
else
|
|
219
|
-
self.created_at = nil
|
|
170
|
+
if attributes.key?(:'sms_cap')
|
|
171
|
+
self.sms_cap = attributes[:'sms_cap']
|
|
220
172
|
end
|
|
221
173
|
|
|
222
|
-
if attributes.key?(:'
|
|
223
|
-
self.
|
|
224
|
-
else
|
|
225
|
-
self.updated_at = nil
|
|
174
|
+
if attributes.key?(:'call_cap')
|
|
175
|
+
self.call_cap = attributes[:'call_cap']
|
|
226
176
|
end
|
|
227
177
|
|
|
228
178
|
if attributes.key?(:'anniversary_date')
|
|
@@ -237,66 +187,16 @@ module Pingram
|
|
|
237
187
|
self.allow_overage = nil
|
|
238
188
|
end
|
|
239
189
|
|
|
240
|
-
if attributes.key?(:'
|
|
241
|
-
self.
|
|
190
|
+
if attributes.key?(:'created_at')
|
|
191
|
+
self.created_at = attributes[:'created_at']
|
|
242
192
|
else
|
|
243
|
-
self.
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
if attributes.key?(:'sms_cap')
|
|
247
|
-
self.sms_cap = attributes[:'sms_cap']
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
if attributes.key?(:'call_cap')
|
|
251
|
-
self.call_cap = attributes[:'call_cap']
|
|
252
|
-
end
|
|
253
|
-
|
|
254
|
-
if attributes.key?(:'stripe_customer_id')
|
|
255
|
-
self.stripe_customer_id = attributes[:'stripe_customer_id']
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
if attributes.key?(:'stripe_subscription_id')
|
|
259
|
-
self.stripe_subscription_id = attributes[:'stripe_subscription_id']
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
if attributes.key?(:'subscription_status')
|
|
263
|
-
self.subscription_status = attributes[:'subscription_status']
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
if attributes.key?(:'status')
|
|
267
|
-
self.status = attributes[:'status']
|
|
268
|
-
end
|
|
269
|
-
|
|
270
|
-
if attributes.key?(:'internal_cap')
|
|
271
|
-
self.internal_cap = attributes[:'internal_cap']
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
if attributes.key?(:'pending_downgrade_cost_cap')
|
|
275
|
-
self.pending_downgrade_cost_cap = attributes[:'pending_downgrade_cost_cap']
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
if attributes.key?(:'pending_downgrade_messages_cap')
|
|
279
|
-
self.pending_downgrade_messages_cap = attributes[:'pending_downgrade_messages_cap']
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
if attributes.key?(:'pending_downgrade_sms_cap')
|
|
283
|
-
self.pending_downgrade_sms_cap = attributes[:'pending_downgrade_sms_cap']
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
if attributes.key?(:'pending_downgrade_call_cap')
|
|
287
|
-
self.pending_downgrade_call_cap = attributes[:'pending_downgrade_call_cap']
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
if attributes.key?(:'pending_downgrade_internal_cap')
|
|
291
|
-
self.pending_downgrade_internal_cap = attributes[:'pending_downgrade_internal_cap']
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
if attributes.key?(:'pending_downgrade_effective_date')
|
|
295
|
-
self.pending_downgrade_effective_date = attributes[:'pending_downgrade_effective_date']
|
|
193
|
+
self.created_at = nil
|
|
296
194
|
end
|
|
297
195
|
|
|
298
|
-
if attributes.key?(:'
|
|
299
|
-
self.
|
|
196
|
+
if attributes.key?(:'updated_at')
|
|
197
|
+
self.updated_at = attributes[:'updated_at']
|
|
198
|
+
else
|
|
199
|
+
self.updated_at = nil
|
|
300
200
|
end
|
|
301
201
|
end
|
|
302
202
|
|
|
@@ -317,6 +217,10 @@ module Pingram
|
|
|
317
217
|
invalid_properties.push('invalid value for "creator", creator cannot be nil.')
|
|
318
218
|
end
|
|
319
219
|
|
|
220
|
+
if @name.nil?
|
|
221
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
222
|
+
end
|
|
223
|
+
|
|
320
224
|
if @messages_cap.nil?
|
|
321
225
|
invalid_properties.push('invalid value for "messages_cap", messages_cap cannot be nil.')
|
|
322
226
|
end
|
|
@@ -325,14 +229,6 @@ module Pingram
|
|
|
325
229
|
invalid_properties.push('invalid value for "cost_cap", cost_cap cannot be nil.')
|
|
326
230
|
end
|
|
327
231
|
|
|
328
|
-
if @created_at.nil?
|
|
329
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
if @updated_at.nil?
|
|
333
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
334
|
-
end
|
|
335
|
-
|
|
336
232
|
if @anniversary_date.nil?
|
|
337
233
|
invalid_properties.push('invalid value for "anniversary_date", anniversary_date cannot be nil.')
|
|
338
234
|
end
|
|
@@ -341,8 +237,12 @@ module Pingram
|
|
|
341
237
|
invalid_properties.push('invalid value for "allow_overage", allow_overage cannot be nil.')
|
|
342
238
|
end
|
|
343
239
|
|
|
344
|
-
if @
|
|
345
|
-
invalid_properties.push('invalid value for "
|
|
240
|
+
if @created_at.nil?
|
|
241
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if @updated_at.nil?
|
|
245
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
346
246
|
end
|
|
347
247
|
|
|
348
248
|
invalid_properties
|
|
@@ -357,19 +257,13 @@ module Pingram
|
|
|
357
257
|
organization_type_validator = EnumAttributeValidator.new('String', ["free", "paid"])
|
|
358
258
|
return false unless organization_type_validator.valid?(@organization_type)
|
|
359
259
|
return false if @creator.nil?
|
|
260
|
+
return false if @name.nil?
|
|
360
261
|
return false if @messages_cap.nil?
|
|
361
262
|
return false if @cost_cap.nil?
|
|
362
|
-
return false if @created_at.nil?
|
|
363
|
-
return false if @updated_at.nil?
|
|
364
263
|
return false if @anniversary_date.nil?
|
|
365
264
|
return false if @allow_overage.nil?
|
|
366
|
-
return false if @
|
|
367
|
-
|
|
368
|
-
return false unless subscription_status_validator.valid?(@subscription_status)
|
|
369
|
-
status_validator = EnumAttributeValidator.new('String', ["verified", "unverified", "blocked"])
|
|
370
|
-
return false unless status_validator.valid?(@status)
|
|
371
|
-
pending_downgrade_account_type_validator = EnumAttributeValidator.new('String', ["free"])
|
|
372
|
-
return false unless pending_downgrade_account_type_validator.valid?(@pending_downgrade_account_type)
|
|
265
|
+
return false if @created_at.nil?
|
|
266
|
+
return false if @updated_at.nil?
|
|
373
267
|
true
|
|
374
268
|
end
|
|
375
269
|
|
|
@@ -403,6 +297,16 @@ module Pingram
|
|
|
403
297
|
@creator = creator
|
|
404
298
|
end
|
|
405
299
|
|
|
300
|
+
# Custom attribute writer method with validation
|
|
301
|
+
# @param [Object] name Value to be assigned
|
|
302
|
+
def name=(name)
|
|
303
|
+
if name.nil?
|
|
304
|
+
fail ArgumentError, 'name cannot be nil'
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
@name = name
|
|
308
|
+
end
|
|
309
|
+
|
|
406
310
|
# Custom attribute writer method with validation
|
|
407
311
|
# @param [Object] messages_cap Value to be assigned
|
|
408
312
|
def messages_cap=(messages_cap)
|
|
@@ -423,26 +327,6 @@ module Pingram
|
|
|
423
327
|
@cost_cap = cost_cap
|
|
424
328
|
end
|
|
425
329
|
|
|
426
|
-
# Custom attribute writer method with validation
|
|
427
|
-
# @param [Object] created_at Value to be assigned
|
|
428
|
-
def created_at=(created_at)
|
|
429
|
-
if created_at.nil?
|
|
430
|
-
fail ArgumentError, 'created_at cannot be nil'
|
|
431
|
-
end
|
|
432
|
-
|
|
433
|
-
@created_at = created_at
|
|
434
|
-
end
|
|
435
|
-
|
|
436
|
-
# Custom attribute writer method with validation
|
|
437
|
-
# @param [Object] updated_at Value to be assigned
|
|
438
|
-
def updated_at=(updated_at)
|
|
439
|
-
if updated_at.nil?
|
|
440
|
-
fail ArgumentError, 'updated_at cannot be nil'
|
|
441
|
-
end
|
|
442
|
-
|
|
443
|
-
@updated_at = updated_at
|
|
444
|
-
end
|
|
445
|
-
|
|
446
330
|
# Custom attribute writer method with validation
|
|
447
331
|
# @param [Object] anniversary_date Value to be assigned
|
|
448
332
|
def anniversary_date=(anniversary_date)
|
|
@@ -464,43 +348,23 @@ module Pingram
|
|
|
464
348
|
end
|
|
465
349
|
|
|
466
350
|
# Custom attribute writer method with validation
|
|
467
|
-
# @param [Object]
|
|
468
|
-
def
|
|
469
|
-
if
|
|
470
|
-
fail ArgumentError, '
|
|
351
|
+
# @param [Object] created_at Value to be assigned
|
|
352
|
+
def created_at=(created_at)
|
|
353
|
+
if created_at.nil?
|
|
354
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
471
355
|
end
|
|
472
356
|
|
|
473
|
-
@
|
|
474
|
-
end
|
|
475
|
-
|
|
476
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
477
|
-
# @param [Object] subscription_status Object to be assigned
|
|
478
|
-
def subscription_status=(subscription_status)
|
|
479
|
-
validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
|
|
480
|
-
unless validator.valid?(subscription_status)
|
|
481
|
-
fail ArgumentError, "invalid value for \"subscription_status\", must be one of #{validator.allowable_values}."
|
|
482
|
-
end
|
|
483
|
-
@subscription_status = subscription_status
|
|
357
|
+
@created_at = created_at
|
|
484
358
|
end
|
|
485
359
|
|
|
486
|
-
# Custom attribute writer method
|
|
487
|
-
# @param [Object]
|
|
488
|
-
def
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
360
|
+
# Custom attribute writer method with validation
|
|
361
|
+
# @param [Object] updated_at Value to be assigned
|
|
362
|
+
def updated_at=(updated_at)
|
|
363
|
+
if updated_at.nil?
|
|
364
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
492
365
|
end
|
|
493
|
-
@status = status
|
|
494
|
-
end
|
|
495
366
|
|
|
496
|
-
|
|
497
|
-
# @param [Object] pending_downgrade_account_type Object to be assigned
|
|
498
|
-
def pending_downgrade_account_type=(pending_downgrade_account_type)
|
|
499
|
-
validator = EnumAttributeValidator.new('String', ["free"])
|
|
500
|
-
unless validator.valid?(pending_downgrade_account_type)
|
|
501
|
-
fail ArgumentError, "invalid value for \"pending_downgrade_account_type\", must be one of #{validator.allowable_values}."
|
|
502
|
-
end
|
|
503
|
-
@pending_downgrade_account_type = pending_downgrade_account_type
|
|
367
|
+
@updated_at = updated_at
|
|
504
368
|
end
|
|
505
369
|
|
|
506
370
|
# Checks equality by comparing each attribute.
|
|
@@ -511,27 +375,15 @@ module Pingram
|
|
|
511
375
|
organization_id == o.organization_id &&
|
|
512
376
|
organization_type == o.organization_type &&
|
|
513
377
|
creator == o.creator &&
|
|
378
|
+
name == o.name &&
|
|
514
379
|
messages_cap == o.messages_cap &&
|
|
515
380
|
cost_cap == o.cost_cap &&
|
|
516
|
-
created_at == o.created_at &&
|
|
517
|
-
updated_at == o.updated_at &&
|
|
518
|
-
anniversary_date == o.anniversary_date &&
|
|
519
|
-
allow_overage == o.allow_overage &&
|
|
520
|
-
name == o.name &&
|
|
521
381
|
sms_cap == o.sms_cap &&
|
|
522
382
|
call_cap == o.call_cap &&
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
internal_cap == o.internal_cap &&
|
|
528
|
-
pending_downgrade_cost_cap == o.pending_downgrade_cost_cap &&
|
|
529
|
-
pending_downgrade_messages_cap == o.pending_downgrade_messages_cap &&
|
|
530
|
-
pending_downgrade_sms_cap == o.pending_downgrade_sms_cap &&
|
|
531
|
-
pending_downgrade_call_cap == o.pending_downgrade_call_cap &&
|
|
532
|
-
pending_downgrade_internal_cap == o.pending_downgrade_internal_cap &&
|
|
533
|
-
pending_downgrade_effective_date == o.pending_downgrade_effective_date &&
|
|
534
|
-
pending_downgrade_account_type == o.pending_downgrade_account_type
|
|
383
|
+
anniversary_date == o.anniversary_date &&
|
|
384
|
+
allow_overage == o.allow_overage &&
|
|
385
|
+
created_at == o.created_at &&
|
|
386
|
+
updated_at == o.updated_at
|
|
535
387
|
end
|
|
536
388
|
|
|
537
389
|
# @see the `==` method
|
|
@@ -543,7 +395,7 @@ module Pingram
|
|
|
543
395
|
# Calculates hash code according to all attributes.
|
|
544
396
|
# @return [Integer] Hash code
|
|
545
397
|
def hash
|
|
546
|
-
[organization_id, organization_type, creator, messages_cap, cost_cap,
|
|
398
|
+
[organization_id, organization_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, anniversary_date, allow_overage, created_at, updated_at].hash
|
|
547
399
|
end
|
|
548
400
|
|
|
549
401
|
# Builds the object from hash
|
|
@@ -0,0 +1,190 @@
|
|
|
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 PhoneVerifyConfirmRequest < ApiModelBase
|
|
18
|
+
attr_accessor :code
|
|
19
|
+
|
|
20
|
+
attr_accessor :turnstile_token
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'code' => :'code',
|
|
26
|
+
:'turnstile_token' => :'turnstileToken'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'code' => :'String',
|
|
44
|
+
:'turnstile_token' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::PhoneVerifyConfirmRequest` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::PhoneVerifyConfirmRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'code')
|
|
71
|
+
self.code = attributes[:'code']
|
|
72
|
+
else
|
|
73
|
+
self.code = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'turnstile_token')
|
|
77
|
+
self.turnstile_token = attributes[:'turnstile_token']
|
|
78
|
+
else
|
|
79
|
+
self.turnstile_token = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @code.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @turnstile_token.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "turnstile_token", turnstile_token cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @code.nil?
|
|
104
|
+
return false if @turnstile_token.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] code Value to be assigned
|
|
110
|
+
def code=(code)
|
|
111
|
+
if code.nil?
|
|
112
|
+
fail ArgumentError, 'code cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@code = code
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] turnstile_token Value to be assigned
|
|
120
|
+
def turnstile_token=(turnstile_token)
|
|
121
|
+
if turnstile_token.nil?
|
|
122
|
+
fail ArgumentError, 'turnstile_token cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@turnstile_token = turnstile_token
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
code == o.code &&
|
|
134
|
+
turnstile_token == o.turnstile_token
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[code, turnstile_token].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|