pingram 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/pingram/api/account_api.rb +95 -26
  4. data/lib/pingram/api/members_api.rb +10 -10
  5. data/lib/pingram/api_client.rb +1 -1
  6. data/lib/pingram/client_wrapper.rb +0 -10
  7. data/lib/pingram/models/account_get_response.rb +216 -29
  8. data/lib/pingram/models/auto_join_get_response.rb +16 -16
  9. data/lib/pingram/models/auto_join_post_response.rb +16 -16
  10. data/lib/pingram/models/billing_post_response_body.rb +35 -68
  11. data/lib/pingram/models/{create_organization_request.rb → brand_webhook_response.rb} +28 -13
  12. data/lib/pingram/models/get_members_response_inner.rb +1 -27
  13. data/lib/pingram/models/get_usage_history_query.rb +1 -1
  14. data/lib/pingram/models/{organization_usage_history.rb → get_usage_history_response.rb} +5 -5
  15. data/lib/pingram/models/{organization_usage_history_items_inner.rb → get_usage_history_response_items_inner.rb} +4 -4
  16. data/lib/pingram/models/{organization_usage_history_items_inner_counts.rb → get_usage_history_response_items_inner_counts.rb} +3 -3
  17. data/lib/pingram/models/{organization_usage.rb → get_usage_response.rb} +6 -6
  18. data/lib/pingram/models/{organization_usage_costs.rb → get_usage_response_costs.rb} +3 -3
  19. data/lib/pingram/models/{organization_usage_counts.rb → get_usage_response_counts.rb} +3 -3
  20. data/lib/pingram/models/sender_post_body_options_email.rb +4 -14
  21. data/lib/pingram/models/ten_dlc_brand_create_request.rb +19 -1
  22. data/lib/pingram/models/ten_dlc_brand_registration.rb +19 -1
  23. data/lib/pingram/models/ten_dlc_brand_registration_details.rb +599 -0
  24. data/lib/pingram/models/ten_dlc_brand_update_request.rb +92 -1
  25. data/lib/pingram/version.rb +1 -1
  26. data/lib/pingram.rb +8 -10
  27. metadata +10 -12
  28. data/lib/pingram/api/organization_api.rb +0 -212
  29. data/lib/pingram/models/create_organization_response.rb +0 -216
  30. data/lib/pingram/models/organization.rb +0 -463
@@ -0,0 +1,599 @@
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
+ # System-access GET response; includes internal Telnyx provider IDs and admin-only fields.
18
+ class TenDlcBrandRegistrationDetails < ApiModelBase
19
+ attr_accessor :account_id
20
+
21
+ attr_accessor :scenario_id
22
+
23
+ attr_accessor :business_type
24
+
25
+ attr_accessor :legal_name
26
+
27
+ # Brand display name (marketing/DBA); defaults to legalName on customer submit.
28
+ attr_accessor :display_name
29
+
30
+ attr_accessor :first_name
31
+
32
+ attr_accessor :last_name
33
+
34
+ attr_accessor :tax_id
35
+
36
+ attr_accessor :website
37
+
38
+ attr_accessor :country
39
+
40
+ attr_accessor :street
41
+
42
+ attr_accessor :city
43
+
44
+ attr_accessor :state
45
+
46
+ attr_accessor :postal_code
47
+
48
+ # Legacy records only; new submissions use structured address fields.
49
+ attr_accessor :full_address
50
+
51
+ attr_accessor :compliance_contact_email
52
+
53
+ attr_accessor :compliance_contact_phone
54
+
55
+ # Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
56
+ attr_accessor :brand_status
57
+
58
+ # Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
59
+ attr_accessor :campaign_status
60
+
61
+ attr_accessor :created_at
62
+
63
+ attr_accessor :updated_at
64
+
65
+ attr_accessor :vertical
66
+
67
+ # Legacy only when businessType is Other.
68
+ attr_accessor :entity_type
69
+
70
+ attr_accessor :telnyx_profile_id
71
+
72
+ attr_accessor :telnyx_brand_id
73
+
74
+ class EnumAttributeValidator
75
+ attr_reader :datatype
76
+ attr_reader :allowable_values
77
+
78
+ def initialize(datatype, allowable_values)
79
+ @allowable_values = allowable_values.map do |value|
80
+ case datatype.to_s
81
+ when /Integer/i
82
+ value.to_i
83
+ when /Float/i
84
+ value.to_f
85
+ else
86
+ value
87
+ end
88
+ end
89
+ end
90
+
91
+ def valid?(value)
92
+ !value || allowable_values.include?(value)
93
+ end
94
+ end
95
+
96
+ # Attribute mapping from ruby-style variable name to JSON key.
97
+ def self.attribute_map
98
+ {
99
+ :'account_id' => :'accountId',
100
+ :'scenario_id' => :'scenarioId',
101
+ :'business_type' => :'businessType',
102
+ :'legal_name' => :'legalName',
103
+ :'display_name' => :'displayName',
104
+ :'first_name' => :'firstName',
105
+ :'last_name' => :'lastName',
106
+ :'tax_id' => :'taxId',
107
+ :'website' => :'website',
108
+ :'country' => :'country',
109
+ :'street' => :'street',
110
+ :'city' => :'city',
111
+ :'state' => :'state',
112
+ :'postal_code' => :'postalCode',
113
+ :'full_address' => :'fullAddress',
114
+ :'compliance_contact_email' => :'complianceContactEmail',
115
+ :'compliance_contact_phone' => :'complianceContactPhone',
116
+ :'brand_status' => :'brandStatus',
117
+ :'campaign_status' => :'campaignStatus',
118
+ :'created_at' => :'createdAt',
119
+ :'updated_at' => :'updatedAt',
120
+ :'vertical' => :'vertical',
121
+ :'entity_type' => :'entityType',
122
+ :'telnyx_profile_id' => :'telnyxProfileId',
123
+ :'telnyx_brand_id' => :'telnyxBrandId'
124
+ }
125
+ end
126
+
127
+ # Returns attribute mapping this model knows about
128
+ def self.acceptable_attribute_map
129
+ attribute_map
130
+ end
131
+
132
+ # Returns all the JSON keys this model knows about
133
+ def self.acceptable_attributes
134
+ acceptable_attribute_map.values
135
+ end
136
+
137
+ # Attribute type mapping.
138
+ def self.openapi_types
139
+ {
140
+ :'account_id' => :'String',
141
+ :'scenario_id' => :'String',
142
+ :'business_type' => :'String',
143
+ :'legal_name' => :'String',
144
+ :'display_name' => :'String',
145
+ :'first_name' => :'String',
146
+ :'last_name' => :'String',
147
+ :'tax_id' => :'String',
148
+ :'website' => :'String',
149
+ :'country' => :'String',
150
+ :'street' => :'String',
151
+ :'city' => :'String',
152
+ :'state' => :'String',
153
+ :'postal_code' => :'String',
154
+ :'full_address' => :'String',
155
+ :'compliance_contact_email' => :'String',
156
+ :'compliance_contact_phone' => :'String',
157
+ :'brand_status' => :'String',
158
+ :'campaign_status' => :'String',
159
+ :'created_at' => :'String',
160
+ :'updated_at' => :'String',
161
+ :'vertical' => :'String',
162
+ :'entity_type' => :'String',
163
+ :'telnyx_profile_id' => :'String',
164
+ :'telnyx_brand_id' => :'String'
165
+ }
166
+ end
167
+
168
+ # List of attributes with nullable: true
169
+ def self.openapi_nullable
170
+ Set.new([
171
+ ])
172
+ end
173
+
174
+ # Initializes the object
175
+ # @param [Hash] attributes Model attributes in the form of hash
176
+ def initialize(attributes = {})
177
+ if (!attributes.is_a?(Hash))
178
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TenDlcBrandRegistrationDetails` initialize method"
179
+ end
180
+
181
+ # check to see if the attribute exists and convert string to symbol for hash key
182
+ acceptable_attribute_map = self.class.acceptable_attribute_map
183
+ attributes = attributes.each_with_object({}) { |(k, v), h|
184
+ if (!acceptable_attribute_map.key?(k.to_sym))
185
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TenDlcBrandRegistrationDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
186
+ end
187
+ h[k.to_sym] = v
188
+ }
189
+
190
+ if attributes.key?(:'account_id')
191
+ self.account_id = attributes[:'account_id']
192
+ else
193
+ self.account_id = nil
194
+ end
195
+
196
+ if attributes.key?(:'scenario_id')
197
+ self.scenario_id = attributes[:'scenario_id']
198
+ else
199
+ self.scenario_id = nil
200
+ end
201
+
202
+ if attributes.key?(:'business_type')
203
+ self.business_type = attributes[:'business_type']
204
+ else
205
+ self.business_type = nil
206
+ end
207
+
208
+ if attributes.key?(:'legal_name')
209
+ self.legal_name = attributes[:'legal_name']
210
+ else
211
+ self.legal_name = nil
212
+ end
213
+
214
+ if attributes.key?(:'display_name')
215
+ self.display_name = attributes[:'display_name']
216
+ end
217
+
218
+ if attributes.key?(:'first_name')
219
+ self.first_name = attributes[:'first_name']
220
+ end
221
+
222
+ if attributes.key?(:'last_name')
223
+ self.last_name = attributes[:'last_name']
224
+ end
225
+
226
+ if attributes.key?(:'tax_id')
227
+ self.tax_id = attributes[:'tax_id']
228
+ end
229
+
230
+ if attributes.key?(:'website')
231
+ self.website = attributes[:'website']
232
+ else
233
+ self.website = nil
234
+ end
235
+
236
+ if attributes.key?(:'country')
237
+ self.country = attributes[:'country']
238
+ else
239
+ self.country = nil
240
+ end
241
+
242
+ if attributes.key?(:'street')
243
+ self.street = attributes[:'street']
244
+ end
245
+
246
+ if attributes.key?(:'city')
247
+ self.city = attributes[:'city']
248
+ end
249
+
250
+ if attributes.key?(:'state')
251
+ self.state = attributes[:'state']
252
+ end
253
+
254
+ if attributes.key?(:'postal_code')
255
+ self.postal_code = attributes[:'postal_code']
256
+ end
257
+
258
+ if attributes.key?(:'full_address')
259
+ self.full_address = attributes[:'full_address']
260
+ end
261
+
262
+ if attributes.key?(:'compliance_contact_email')
263
+ self.compliance_contact_email = attributes[:'compliance_contact_email']
264
+ else
265
+ self.compliance_contact_email = nil
266
+ end
267
+
268
+ if attributes.key?(:'compliance_contact_phone')
269
+ self.compliance_contact_phone = attributes[:'compliance_contact_phone']
270
+ else
271
+ self.compliance_contact_phone = nil
272
+ end
273
+
274
+ if attributes.key?(:'brand_status')
275
+ self.brand_status = attributes[:'brand_status']
276
+ else
277
+ self.brand_status = nil
278
+ end
279
+
280
+ if attributes.key?(:'campaign_status')
281
+ self.campaign_status = attributes[:'campaign_status']
282
+ else
283
+ self.campaign_status = nil
284
+ end
285
+
286
+ if attributes.key?(:'created_at')
287
+ self.created_at = attributes[:'created_at']
288
+ else
289
+ self.created_at = nil
290
+ end
291
+
292
+ if attributes.key?(:'updated_at')
293
+ self.updated_at = attributes[:'updated_at']
294
+ else
295
+ self.updated_at = nil
296
+ end
297
+
298
+ if attributes.key?(:'vertical')
299
+ self.vertical = attributes[:'vertical']
300
+ end
301
+
302
+ if attributes.key?(:'entity_type')
303
+ self.entity_type = attributes[:'entity_type']
304
+ end
305
+
306
+ if attributes.key?(:'telnyx_profile_id')
307
+ self.telnyx_profile_id = attributes[:'telnyx_profile_id']
308
+ end
309
+
310
+ if attributes.key?(:'telnyx_brand_id')
311
+ self.telnyx_brand_id = attributes[:'telnyx_brand_id']
312
+ end
313
+ end
314
+
315
+ # Show invalid properties with the reasons. Usually used together with valid?
316
+ # @return Array for valid properties with the reasons
317
+ def list_invalid_properties
318
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
319
+ invalid_properties = Array.new
320
+ if @account_id.nil?
321
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
322
+ end
323
+
324
+ if @scenario_id.nil?
325
+ invalid_properties.push('invalid value for "scenario_id", scenario_id cannot be nil.')
326
+ end
327
+
328
+ if @business_type.nil?
329
+ invalid_properties.push('invalid value for "business_type", business_type cannot be nil.')
330
+ end
331
+
332
+ if @legal_name.nil?
333
+ invalid_properties.push('invalid value for "legal_name", legal_name cannot be nil.')
334
+ end
335
+
336
+ if @website.nil?
337
+ invalid_properties.push('invalid value for "website", website cannot be nil.')
338
+ end
339
+
340
+ if @country.nil?
341
+ invalid_properties.push('invalid value for "country", country cannot be nil.')
342
+ end
343
+
344
+ if @compliance_contact_email.nil?
345
+ invalid_properties.push('invalid value for "compliance_contact_email", compliance_contact_email cannot be nil.')
346
+ end
347
+
348
+ if @compliance_contact_phone.nil?
349
+ invalid_properties.push('invalid value for "compliance_contact_phone", compliance_contact_phone cannot be nil.')
350
+ end
351
+
352
+ if @brand_status.nil?
353
+ invalid_properties.push('invalid value for "brand_status", brand_status cannot be nil.')
354
+ end
355
+
356
+ if @campaign_status.nil?
357
+ invalid_properties.push('invalid value for "campaign_status", campaign_status cannot be nil.')
358
+ end
359
+
360
+ if @created_at.nil?
361
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
362
+ end
363
+
364
+ if @updated_at.nil?
365
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
366
+ end
367
+
368
+ invalid_properties
369
+ end
370
+
371
+ # Check to see if the all the properties in the model are valid
372
+ # @return true if the model is valid
373
+ def valid?
374
+ warn '[DEPRECATED] the `valid?` method is obsolete'
375
+ return false if @account_id.nil?
376
+ return false if @scenario_id.nil?
377
+ return false if @business_type.nil?
378
+ return false if @legal_name.nil?
379
+ return false if @website.nil?
380
+ return false if @country.nil?
381
+ return false if @compliance_contact_email.nil?
382
+ return false if @compliance_contact_phone.nil?
383
+ return false if @brand_status.nil?
384
+ brand_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
385
+ return false unless brand_status_validator.valid?(@brand_status)
386
+ return false if @campaign_status.nil?
387
+ campaign_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
388
+ return false unless campaign_status_validator.valid?(@campaign_status)
389
+ return false if @created_at.nil?
390
+ return false if @updated_at.nil?
391
+ true
392
+ end
393
+
394
+ # Custom attribute writer method with validation
395
+ # @param [Object] account_id Value to be assigned
396
+ def account_id=(account_id)
397
+ if account_id.nil?
398
+ fail ArgumentError, 'account_id cannot be nil'
399
+ end
400
+
401
+ @account_id = account_id
402
+ end
403
+
404
+ # Custom attribute writer method with validation
405
+ # @param [Object] scenario_id Value to be assigned
406
+ def scenario_id=(scenario_id)
407
+ if scenario_id.nil?
408
+ fail ArgumentError, 'scenario_id cannot be nil'
409
+ end
410
+
411
+ @scenario_id = scenario_id
412
+ end
413
+
414
+ # Custom attribute writer method with validation
415
+ # @param [Object] business_type Value to be assigned
416
+ def business_type=(business_type)
417
+ if business_type.nil?
418
+ fail ArgumentError, 'business_type cannot be nil'
419
+ end
420
+
421
+ @business_type = business_type
422
+ end
423
+
424
+ # Custom attribute writer method with validation
425
+ # @param [Object] legal_name Value to be assigned
426
+ def legal_name=(legal_name)
427
+ if legal_name.nil?
428
+ fail ArgumentError, 'legal_name cannot be nil'
429
+ end
430
+
431
+ @legal_name = legal_name
432
+ end
433
+
434
+ # Custom attribute writer method with validation
435
+ # @param [Object] website Value to be assigned
436
+ def website=(website)
437
+ if website.nil?
438
+ fail ArgumentError, 'website cannot be nil'
439
+ end
440
+
441
+ @website = website
442
+ end
443
+
444
+ # Custom attribute writer method with validation
445
+ # @param [Object] country Value to be assigned
446
+ def country=(country)
447
+ if country.nil?
448
+ fail ArgumentError, 'country cannot be nil'
449
+ end
450
+
451
+ @country = country
452
+ end
453
+
454
+ # Custom attribute writer method with validation
455
+ # @param [Object] compliance_contact_email Value to be assigned
456
+ def compliance_contact_email=(compliance_contact_email)
457
+ if compliance_contact_email.nil?
458
+ fail ArgumentError, 'compliance_contact_email cannot be nil'
459
+ end
460
+
461
+ @compliance_contact_email = compliance_contact_email
462
+ end
463
+
464
+ # Custom attribute writer method with validation
465
+ # @param [Object] compliance_contact_phone Value to be assigned
466
+ def compliance_contact_phone=(compliance_contact_phone)
467
+ if compliance_contact_phone.nil?
468
+ fail ArgumentError, 'compliance_contact_phone cannot be nil'
469
+ end
470
+
471
+ @compliance_contact_phone = compliance_contact_phone
472
+ end
473
+
474
+ # Custom attribute writer method checking allowed values (enum).
475
+ # @param [Object] brand_status Object to be assigned
476
+ def brand_status=(brand_status)
477
+ validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
478
+ unless validator.valid?(brand_status)
479
+ fail ArgumentError, "invalid value for \"brand_status\", must be one of #{validator.allowable_values}."
480
+ end
481
+ @brand_status = brand_status
482
+ end
483
+
484
+ # Custom attribute writer method checking allowed values (enum).
485
+ # @param [Object] campaign_status Object to be assigned
486
+ def campaign_status=(campaign_status)
487
+ validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
488
+ unless validator.valid?(campaign_status)
489
+ fail ArgumentError, "invalid value for \"campaign_status\", must be one of #{validator.allowable_values}."
490
+ end
491
+ @campaign_status = campaign_status
492
+ end
493
+
494
+ # Custom attribute writer method with validation
495
+ # @param [Object] created_at Value to be assigned
496
+ def created_at=(created_at)
497
+ if created_at.nil?
498
+ fail ArgumentError, 'created_at cannot be nil'
499
+ end
500
+
501
+ @created_at = created_at
502
+ end
503
+
504
+ # Custom attribute writer method with validation
505
+ # @param [Object] updated_at Value to be assigned
506
+ def updated_at=(updated_at)
507
+ if updated_at.nil?
508
+ fail ArgumentError, 'updated_at cannot be nil'
509
+ end
510
+
511
+ @updated_at = updated_at
512
+ end
513
+
514
+ # Checks equality by comparing each attribute.
515
+ # @param [Object] Object to be compared
516
+ def ==(o)
517
+ return true if self.equal?(o)
518
+ self.class == o.class &&
519
+ account_id == o.account_id &&
520
+ scenario_id == o.scenario_id &&
521
+ business_type == o.business_type &&
522
+ legal_name == o.legal_name &&
523
+ display_name == o.display_name &&
524
+ first_name == o.first_name &&
525
+ last_name == o.last_name &&
526
+ tax_id == o.tax_id &&
527
+ website == o.website &&
528
+ country == o.country &&
529
+ street == o.street &&
530
+ city == o.city &&
531
+ state == o.state &&
532
+ postal_code == o.postal_code &&
533
+ full_address == o.full_address &&
534
+ compliance_contact_email == o.compliance_contact_email &&
535
+ compliance_contact_phone == o.compliance_contact_phone &&
536
+ brand_status == o.brand_status &&
537
+ campaign_status == o.campaign_status &&
538
+ created_at == o.created_at &&
539
+ updated_at == o.updated_at &&
540
+ vertical == o.vertical &&
541
+ entity_type == o.entity_type &&
542
+ telnyx_profile_id == o.telnyx_profile_id &&
543
+ telnyx_brand_id == o.telnyx_brand_id
544
+ end
545
+
546
+ # @see the `==` method
547
+ # @param [Object] Object to be compared
548
+ def eql?(o)
549
+ self == o
550
+ end
551
+
552
+ # Calculates hash code according to all attributes.
553
+ # @return [Integer] Hash code
554
+ def hash
555
+ [account_id, scenario_id, business_type, legal_name, display_name, first_name, last_name, tax_id, website, country, street, city, state, postal_code, full_address, compliance_contact_email, compliance_contact_phone, brand_status, campaign_status, created_at, updated_at, vertical, entity_type, telnyx_profile_id, telnyx_brand_id].hash
556
+ end
557
+
558
+ # Builds the object from hash
559
+ # @param [Hash] attributes Model attributes in the form of hash
560
+ # @return [Object] Returns the model itself
561
+ def self.build_from_hash(attributes)
562
+ return nil unless attributes.is_a?(Hash)
563
+ attributes = attributes.transform_keys(&:to_sym)
564
+ transformed_hash = {}
565
+ openapi_types.each_pair do |key, type|
566
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
567
+ transformed_hash["#{key}"] = nil
568
+ elsif type =~ /\AArray<(.*)>/i
569
+ # check to ensure the input is an array given that the attribute
570
+ # is documented as an array but the input is not
571
+ if attributes[attribute_map[key]].is_a?(Array)
572
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
573
+ end
574
+ elsif !attributes[attribute_map[key]].nil?
575
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
576
+ end
577
+ end
578
+ new(transformed_hash)
579
+ end
580
+
581
+ # Returns the object in the form of hash
582
+ # @return [Hash] Returns the object in the form of hash
583
+ def to_hash
584
+ hash = {}
585
+ self.class.attribute_map.each_pair do |attr, param|
586
+ value = self.send(attr)
587
+ if value.nil?
588
+ is_nullable = self.class.openapi_nullable.include?(attr)
589
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
590
+ end
591
+
592
+ hash[param] = _to_hash(value)
593
+ end
594
+ hash
595
+ end
596
+
597
+ end
598
+
599
+ end