pingram 1.0.24 → 1.0.27

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/email_api.rb +5 -5
  4. data/lib/pingram/api/environments_api.rb +0 -66
  5. data/lib/pingram/api/registrations_api.rb +330 -0
  6. data/lib/pingram/api_client.rb +1 -1
  7. data/lib/pingram/client_wrapper.rb +10 -0
  8. data/lib/pingram/models/account_get_response.rb +26 -4
  9. data/lib/pingram/models/billing_post_response_body.rb +23 -1
  10. data/lib/pingram/models/logs_get_response_logs_inner.rb +10 -10
  11. data/lib/pingram/models/ten_dlc_brand_admin_update_request.rb +378 -0
  12. data/lib/pingram/models/ten_dlc_brand_create_request.rb +41 -10
  13. data/lib/pingram/models/ten_dlc_brand_registration.rb +2 -2
  14. data/lib/pingram/models/ten_dlc_brand_registration_details.rb +3 -2
  15. data/lib/pingram/models/ten_dlc_brand_update_request.rb +24 -38
  16. data/lib/pingram/models/ten_dlc_campaign_admin_update_request.rb +363 -0
  17. data/lib/pingram/models/ten_dlc_campaign_registration.rb +448 -0
  18. data/lib/pingram/models/ten_dlc_campaign_registration_details.rb +14 -14
  19. data/lib/pingram/models/ten_dlc_campaign_update_request.rb +5 -49
  20. data/lib/pingram/version.rb +1 -1
  21. data/lib/pingram.rb +4 -2
  22. data/vendor/bundle/ruby/3.2.0/cache/psych-5.5.0.gem +0 -0
  23. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  24. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  25. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/gem_make.out +5 -5
  26. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/mkmf.log +3 -3
  27. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  28. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem_make.out +10 -10
  29. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/psych.so +0 -0
  30. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  31. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  32. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/README.md +53 -0
  33. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/extconf.rb +22 -0
  34. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych/psych.c +68 -0
  35. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych.h +4 -0
  36. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.c +4 -0
  37. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.c +79 -18
  38. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/class_loader.rb +1 -0
  39. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/parser.rb +40 -1
  40. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/scalar_scanner.rb +15 -3
  41. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/versions.rb +1 -1
  42. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/to_ruby.rb +20 -9
  43. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/yaml_tree.rb +0 -3
  44. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/lib/psych.so +0 -0
  45. data/vendor/bundle/ruby/3.2.0/specifications/{psych-5.4.0.gemspec → psych-5.5.0.gemspec} +2 -2
  46. metadata +66 -64
  47. data/lib/pingram/models/delete_email_suppressions_response.rb +0 -192
  48. data/lib/pingram/models/environment_create_request.rb +0 -164
  49. data/vendor/bundle/ruby/3.2.0/cache/psych-5.4.0.gem +0 -0
  50. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/psych.so +0 -0
  51. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/ext/psych/psych.c +0 -36
  52. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/lib/psych.so +0 -0
  53. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem.build_complete +0 -0
  54. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/mkmf.log +0 -0
  55. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/CONTRIBUTING.md +0 -0
  56. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/LICENSE +0 -0
  57. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/Makefile +0 -0
  58. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/depend +0 -0
  59. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.h +0 -0
  60. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.h +0 -0
  61. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.c +0 -0
  62. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.h +0 -0
  63. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.c +0 -0
  64. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.h +0 -0
  65. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/coder.rb +0 -0
  66. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/core_ext.rb +0 -0
  67. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/exception.rb +0 -0
  68. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handler.rb +0 -0
  69. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/document_stream.rb +0 -0
  70. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/recorder.rb +0 -0
  71. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/ruby_events.rb +0 -0
  72. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/stream.rb +0 -0
  73. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/tree_builder.rb +0 -0
  74. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/yaml_events.rb +0 -0
  75. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/alias.rb +0 -0
  76. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/document.rb +0 -0
  77. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/mapping.rb +0 -0
  78. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/node.rb +0 -0
  79. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/scalar.rb +0 -0
  80. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/sequence.rb +0 -0
  81. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/stream.rb +0 -0
  82. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes.rb +0 -0
  83. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/omap.rb +0 -0
  84. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/set.rb +0 -0
  85. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/stream.rb +0 -0
  86. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/streaming.rb +0 -0
  87. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/syntax_error.rb +0 -0
  88. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/tree_builder.rb +0 -0
  89. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/depth_first.rb +0 -0
  90. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/emitter.rb +0 -0
  91. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/json_tree.rb +0 -0
  92. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/visitor.rb +0 -0
  93. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors.rb +0 -0
  94. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/y.rb +0 -0
  95. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych.rb +0 -0
@@ -46,6 +46,8 @@ module Pingram
46
46
 
47
47
  attr_accessor :status
48
48
 
49
+ attr_accessor :subscription_status
50
+
49
51
  attr_accessor :session_id
50
52
 
51
53
  attr_accessor :url
@@ -89,6 +91,7 @@ module Pingram
89
91
  :'created_at' => :'createdAt',
90
92
  :'updated_at' => :'updatedAt',
91
93
  :'status' => :'status',
94
+ :'subscription_status' => :'subscriptionStatus',
92
95
  :'session_id' => :'sessionId',
93
96
  :'url' => :'url'
94
97
  }
@@ -121,6 +124,7 @@ module Pingram
121
124
  :'created_at' => :'String',
122
125
  :'updated_at' => :'String',
123
126
  :'status' => :'String',
127
+ :'subscription_status' => :'String',
124
128
  :'session_id' => :'String',
125
129
  :'url' => :'String'
126
130
  }
@@ -129,6 +133,7 @@ module Pingram
129
133
  # List of attributes with nullable: true
130
134
  def self.openapi_nullable
131
135
  Set.new([
136
+ :'subscription_status',
132
137
  ])
133
138
  end
134
139
 
@@ -220,6 +225,10 @@ module Pingram
220
225
  self.status = attributes[:'status']
221
226
  end
222
227
 
228
+ if attributes.key?(:'subscription_status')
229
+ self.subscription_status = attributes[:'subscription_status']
230
+ end
231
+
223
232
  if attributes.key?(:'session_id')
224
233
  self.session_id = attributes[:'session_id']
225
234
  end
@@ -287,6 +296,8 @@ module Pingram
287
296
  return false if @updated_at.nil?
288
297
  status_validator = EnumAttributeValidator.new('String', ["verified", "unverified", "blocked"])
289
298
  return false unless status_validator.valid?(@status)
299
+ subscription_status_validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
300
+ return false unless subscription_status_validator.valid?(@subscription_status)
290
301
  true
291
302
  end
292
303
 
@@ -390,6 +401,16 @@ module Pingram
390
401
  @status = status
391
402
  end
392
403
 
404
+ # Custom attribute writer method checking allowed values (enum).
405
+ # @param [Object] subscription_status Object to be assigned
406
+ def subscription_status=(subscription_status)
407
+ validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
408
+ unless validator.valid?(subscription_status)
409
+ fail ArgumentError, "invalid value for \"subscription_status\", must be one of #{validator.allowable_values}."
410
+ end
411
+ @subscription_status = subscription_status
412
+ end
413
+
393
414
  # Checks equality by comparing each attribute.
394
415
  # @param [Object] Object to be compared
395
416
  def ==(o)
@@ -409,6 +430,7 @@ module Pingram
409
430
  created_at == o.created_at &&
410
431
  updated_at == o.updated_at &&
411
432
  status == o.status &&
433
+ subscription_status == o.subscription_status &&
412
434
  session_id == o.session_id &&
413
435
  url == o.url
414
436
  end
@@ -422,7 +444,7 @@ module Pingram
422
444
  # Calculates hash code according to all attributes.
423
445
  # @return [Integer] Hash code
424
446
  def hash
425
- [account_id, account_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, allow_overage, created_at, updated_at, status, session_id, url].hash
447
+ [account_id, account_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, allow_overage, created_at, updated_at, status, subscription_status, session_id, url].hash
426
448
  end
427
449
 
428
450
  # Builds the object from hash
@@ -1514,11 +1514,11 @@ module Pingram
1514
1514
  return false unless inapp_failed_code_validator.valid?(@inapp_failed_code)
1515
1515
  mobile_push_failed_code_validator = EnumAttributeValidator.new('String', ["NO_APN_CONFIG", "NO_FCM_CONFIG", "INVALID_APN_TOKEN", "INVALID_FCM_TOKEN", "UNKNOWN"])
1516
1516
  return false unless mobile_push_failed_code_validator.valid?(@mobile_push_failed_code)
1517
- email_failed_code_validator = EnumAttributeValidator.new('String', ["UNVERIFIED_SENDER", "PERMANENT_GENERAL_BOUNCE", "PERMANENT_NO_EMAIL_BOUNCE", "PERMANENT_SUPPRESSED_BOUNCE", "TRANSIENT_GENERAL_BOUNCE", "TRANSIENT_MAILBOX_FULL_BOUNCE", "TRANSIENT_MESSAGE_TOO_LARGE_BOUNCE", "TRANSIENT_CONTENT_REJECTED_BOUNCE", "TRANSIENT_ATTACHMENT_REJECTED_BOUNCE", "UNDETERMINED_BOUNCE", "COMPLAINT_ABUSE", "COMPLAINT_AUTH", "COMPLAINT_FRAUD", "COMPLAINT_NOT_SPAM", "COMPLAINT_OTHER", "COMPLAINT_VIRUS", "SUPPRESSED_COMPLAINT", "SUPPRESSED_BOUNCE", "MISSING_EMAIL_RECIPIENT", "MISSING_EMAIL_SUBJECT", "MISSING_EMAIL_HTML", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT"])
1517
+ email_failed_code_validator = EnumAttributeValidator.new('String', ["UNVERIFIED_SENDER", "PERMANENT_GENERAL_BOUNCE", "PERMANENT_NO_EMAIL_BOUNCE", "PERMANENT_SUPPRESSED_BOUNCE", "TRANSIENT_GENERAL_BOUNCE", "TRANSIENT_MAILBOX_FULL_BOUNCE", "TRANSIENT_MESSAGE_TOO_LARGE_BOUNCE", "TRANSIENT_CONTENT_REJECTED_BOUNCE", "TRANSIENT_ATTACHMENT_REJECTED_BOUNCE", "UNDETERMINED_BOUNCE", "COMPLAINT_ABUSE", "COMPLAINT_AUTH", "COMPLAINT_FRAUD", "COMPLAINT_NOT_SPAM", "COMPLAINT_OTHER", "COMPLAINT_VIRUS", "SUPPRESSED_COMPLAINT", "SUPPRESSED_BOUNCE", "MISSING_EMAIL_RECIPIENT", "MISSING_EMAIL_SUBJECT", "MISSING_EMAIL_HTML", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
1518
1518
  return false unless email_failed_code_validator.valid?(@email_failed_code)
1519
1519
  email_inbound_resolution_type_validator = EnumAttributeValidator.new('String', ["reply", "builtin", "custom"])
1520
1520
  return false unless email_inbound_resolution_type_validator.valid?(@email_inbound_resolution_type)
1521
- web_push_failed_code_validator = EnumAttributeValidator.new('String', ["UNSUBSCIRBED_OR_EXPIRED", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT"])
1521
+ web_push_failed_code_validator = EnumAttributeValidator.new('String', ["UNSUBSCIRBED_OR_EXPIRED", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
1522
1522
  return false unless web_push_failed_code_validator.valid?(@web_push_failed_code)
1523
1523
  ignored_validator = EnumAttributeValidator.new('String', ["THROTTLING", "DEDUPLICATION", "DISABLED_NOTIFICATION", "ALL_CHANNELS_IGNORED"])
1524
1524
  return false unless ignored_validator.valid?(@ignored)
@@ -1550,13 +1550,13 @@ module Pingram
1550
1550
  return false unless slack_routing_validator.valid?(@slack_routing)
1551
1551
  slack_routing_reason_validator = EnumAttributeValidator.new('String', ["IGNORE_BY_PREFERENCES", "IGNORE_BY_ENVIRONMENT", "IGNORE_BY_DEFAULT_DELIVERY"])
1552
1552
  return false unless slack_routing_reason_validator.valid?(@slack_routing_reason)
1553
- slack_failed_code_validator = EnumAttributeValidator.new('String', ["CHANNEL_NOT_FOUND", "NOT_IN_CHANNEL", "CHANNEL_ARCHIVED", "MESSAGE_TOO_LONG", "NO_TEXT", "RESTRICTED_ACTION", "TOKEN_EXPIRED", "INVALID_AUTH", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT"])
1553
+ slack_failed_code_validator = EnumAttributeValidator.new('String', ["CHANNEL_NOT_FOUND", "NOT_IN_CHANNEL", "CHANNEL_ARCHIVED", "MESSAGE_TOO_LONG", "NO_TEXT", "RESTRICTED_ACTION", "TOKEN_EXPIRED", "INVALID_AUTH", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
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"])
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"])
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"])
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"])
1560
1560
  return false unless sms_failed_code_validator.valid?(@sms_failed_code)
1561
1561
  true
1562
1562
  end
@@ -1614,7 +1614,7 @@ module Pingram
1614
1614
  # Custom attribute writer method checking allowed values (enum).
1615
1615
  # @param [Object] email_failed_code Object to be assigned
1616
1616
  def email_failed_code=(email_failed_code)
1617
- validator = EnumAttributeValidator.new('String', ["UNVERIFIED_SENDER", "PERMANENT_GENERAL_BOUNCE", "PERMANENT_NO_EMAIL_BOUNCE", "PERMANENT_SUPPRESSED_BOUNCE", "TRANSIENT_GENERAL_BOUNCE", "TRANSIENT_MAILBOX_FULL_BOUNCE", "TRANSIENT_MESSAGE_TOO_LARGE_BOUNCE", "TRANSIENT_CONTENT_REJECTED_BOUNCE", "TRANSIENT_ATTACHMENT_REJECTED_BOUNCE", "UNDETERMINED_BOUNCE", "COMPLAINT_ABUSE", "COMPLAINT_AUTH", "COMPLAINT_FRAUD", "COMPLAINT_NOT_SPAM", "COMPLAINT_OTHER", "COMPLAINT_VIRUS", "SUPPRESSED_COMPLAINT", "SUPPRESSED_BOUNCE", "MISSING_EMAIL_RECIPIENT", "MISSING_EMAIL_SUBJECT", "MISSING_EMAIL_HTML", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT"])
1617
+ validator = EnumAttributeValidator.new('String', ["UNVERIFIED_SENDER", "PERMANENT_GENERAL_BOUNCE", "PERMANENT_NO_EMAIL_BOUNCE", "PERMANENT_SUPPRESSED_BOUNCE", "TRANSIENT_GENERAL_BOUNCE", "TRANSIENT_MAILBOX_FULL_BOUNCE", "TRANSIENT_MESSAGE_TOO_LARGE_BOUNCE", "TRANSIENT_CONTENT_REJECTED_BOUNCE", "TRANSIENT_ATTACHMENT_REJECTED_BOUNCE", "UNDETERMINED_BOUNCE", "COMPLAINT_ABUSE", "COMPLAINT_AUTH", "COMPLAINT_FRAUD", "COMPLAINT_NOT_SPAM", "COMPLAINT_OTHER", "COMPLAINT_VIRUS", "SUPPRESSED_COMPLAINT", "SUPPRESSED_BOUNCE", "MISSING_EMAIL_RECIPIENT", "MISSING_EMAIL_SUBJECT", "MISSING_EMAIL_HTML", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
1618
1618
  unless validator.valid?(email_failed_code)
1619
1619
  fail ArgumentError, "invalid value for \"email_failed_code\", must be one of #{validator.allowable_values}."
1620
1620
  end
@@ -1634,7 +1634,7 @@ module Pingram
1634
1634
  # Custom attribute writer method checking allowed values (enum).
1635
1635
  # @param [Object] web_push_failed_code Object to be assigned
1636
1636
  def web_push_failed_code=(web_push_failed_code)
1637
- validator = EnumAttributeValidator.new('String', ["UNSUBSCIRBED_OR_EXPIRED", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT"])
1637
+ validator = EnumAttributeValidator.new('String', ["UNSUBSCIRBED_OR_EXPIRED", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
1638
1638
  unless validator.valid?(web_push_failed_code)
1639
1639
  fail ArgumentError, "invalid value for \"web_push_failed_code\", must be one of #{validator.allowable_values}."
1640
1640
  end
@@ -1794,7 +1794,7 @@ module Pingram
1794
1794
  # Custom attribute writer method checking allowed values (enum).
1795
1795
  # @param [Object] slack_failed_code Object to be assigned
1796
1796
  def slack_failed_code=(slack_failed_code)
1797
- validator = EnumAttributeValidator.new('String', ["CHANNEL_NOT_FOUND", "NOT_IN_CHANNEL", "CHANNEL_ARCHIVED", "MESSAGE_TOO_LONG", "NO_TEXT", "RESTRICTED_ACTION", "TOKEN_EXPIRED", "INVALID_AUTH", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT"])
1797
+ validator = EnumAttributeValidator.new('String', ["CHANNEL_NOT_FOUND", "NOT_IN_CHANNEL", "CHANNEL_ARCHIVED", "MESSAGE_TOO_LONG", "NO_TEXT", "RESTRICTED_ACTION", "TOKEN_EXPIRED", "INVALID_AUTH", "UNKNOWN", "NO_ADDRESS", "USAGE_LIMIT", "VERIFICATION_LIMIT", "TEMPLATE_NOT_FOUND", "NO_DEFAULT_TEMPLATE", "SPAM_CONTENT", "SMS_FREE_RESTRICTED"])
1798
1798
  unless validator.valid?(slack_failed_code)
1799
1799
  fail ArgumentError, "invalid value for \"slack_failed_code\", must be one of #{validator.allowable_values}."
1800
1800
  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"])
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"])
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"])
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"])
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
@@ -0,0 +1,378 @@
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
+ # Request body for the superadmin-only PATCH /registrations/us/10dlc/brand/admin
18
+ class TenDlcBrandAdminUpdateRequest < ApiModelBase
19
+ # Who the 10DLC brand is registered for. - own_brand: personal or company project - client_brand: agency or contractor
20
+ attr_accessor :scenario_id
21
+
22
+ # Legal entity type for a 10DLC brand. - PRIVATE_PROFIT: private for-profit (LLC, corp, etc.) - SOLE_PROPRIETOR: sole proprietorship - PUBLIC_PROFIT: publicly traded for-profit - NON_PROFIT: non-profit - GOVERNMENT: government
23
+ attr_accessor :business_type
24
+
25
+ attr_accessor :legal_name
26
+
27
+ # Brand display name (marketing/DBA); defaults to legalName when omitted on legalName-only updates.
28
+ attr_accessor :display_name
29
+
30
+ attr_accessor :first_name
31
+
32
+ attr_accessor :last_name
33
+
34
+ # For US companies (country US): 9-digit EIN (Employer Identification Number). For Canada (country CA): 9-digit BN (Business Number). For other countries: national business tax identifier.
35
+ attr_accessor :tax_id
36
+
37
+ attr_accessor :website
38
+
39
+ attr_accessor :country
40
+
41
+ attr_accessor :street
42
+
43
+ attr_accessor :city
44
+
45
+ attr_accessor :state
46
+
47
+ attr_accessor :postal_code
48
+
49
+ attr_accessor :compliance_contact_email
50
+
51
+ attr_accessor :compliance_contact_phone
52
+
53
+ # Industry vertical required before Pingram submits the brand to carriers.
54
+ attr_accessor :vertical
55
+
56
+ # Legacy only when businessType is Other.
57
+ attr_accessor :entity_type
58
+
59
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - 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
60
+ attr_accessor :brand_status
61
+
62
+ class EnumAttributeValidator
63
+ attr_reader :datatype
64
+ attr_reader :allowable_values
65
+
66
+ def initialize(datatype, allowable_values)
67
+ @allowable_values = allowable_values.map do |value|
68
+ case datatype.to_s
69
+ when /Integer/i
70
+ value.to_i
71
+ when /Float/i
72
+ value.to_f
73
+ else
74
+ value
75
+ end
76
+ end
77
+ end
78
+
79
+ def valid?(value)
80
+ !value || allowable_values.include?(value)
81
+ end
82
+ end
83
+
84
+ # Attribute mapping from ruby-style variable name to JSON key.
85
+ def self.attribute_map
86
+ {
87
+ :'scenario_id' => :'scenarioId',
88
+ :'business_type' => :'businessType',
89
+ :'legal_name' => :'legalName',
90
+ :'display_name' => :'displayName',
91
+ :'first_name' => :'firstName',
92
+ :'last_name' => :'lastName',
93
+ :'tax_id' => :'taxId',
94
+ :'website' => :'website',
95
+ :'country' => :'country',
96
+ :'street' => :'street',
97
+ :'city' => :'city',
98
+ :'state' => :'state',
99
+ :'postal_code' => :'postalCode',
100
+ :'compliance_contact_email' => :'complianceContactEmail',
101
+ :'compliance_contact_phone' => :'complianceContactPhone',
102
+ :'vertical' => :'vertical',
103
+ :'entity_type' => :'entityType',
104
+ :'brand_status' => :'brandStatus'
105
+ }
106
+ end
107
+
108
+ # Returns attribute mapping this model knows about
109
+ def self.acceptable_attribute_map
110
+ attribute_map
111
+ end
112
+
113
+ # Returns all the JSON keys this model knows about
114
+ def self.acceptable_attributes
115
+ acceptable_attribute_map.values
116
+ end
117
+
118
+ # Attribute type mapping.
119
+ def self.openapi_types
120
+ {
121
+ :'scenario_id' => :'String',
122
+ :'business_type' => :'String',
123
+ :'legal_name' => :'String',
124
+ :'display_name' => :'String',
125
+ :'first_name' => :'String',
126
+ :'last_name' => :'String',
127
+ :'tax_id' => :'String',
128
+ :'website' => :'String',
129
+ :'country' => :'String',
130
+ :'street' => :'String',
131
+ :'city' => :'String',
132
+ :'state' => :'String',
133
+ :'postal_code' => :'String',
134
+ :'compliance_contact_email' => :'String',
135
+ :'compliance_contact_phone' => :'String',
136
+ :'vertical' => :'String',
137
+ :'entity_type' => :'String',
138
+ :'brand_status' => :'String'
139
+ }
140
+ end
141
+
142
+ # List of attributes with nullable: true
143
+ def self.openapi_nullable
144
+ Set.new([
145
+ ])
146
+ end
147
+
148
+ # Initializes the object
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ def initialize(attributes = {})
151
+ if (!attributes.is_a?(Hash))
152
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TenDlcBrandAdminUpdateRequest` initialize method"
153
+ end
154
+
155
+ # check to see if the attribute exists and convert string to symbol for hash key
156
+ acceptable_attribute_map = self.class.acceptable_attribute_map
157
+ attributes = attributes.each_with_object({}) { |(k, v), h|
158
+ if (!acceptable_attribute_map.key?(k.to_sym))
159
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TenDlcBrandAdminUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
160
+ end
161
+ h[k.to_sym] = v
162
+ }
163
+
164
+ if attributes.key?(:'scenario_id')
165
+ self.scenario_id = attributes[:'scenario_id']
166
+ end
167
+
168
+ if attributes.key?(:'business_type')
169
+ self.business_type = attributes[:'business_type']
170
+ end
171
+
172
+ if attributes.key?(:'legal_name')
173
+ self.legal_name = attributes[:'legal_name']
174
+ end
175
+
176
+ if attributes.key?(:'display_name')
177
+ self.display_name = attributes[:'display_name']
178
+ end
179
+
180
+ if attributes.key?(:'first_name')
181
+ self.first_name = attributes[:'first_name']
182
+ end
183
+
184
+ if attributes.key?(:'last_name')
185
+ self.last_name = attributes[:'last_name']
186
+ end
187
+
188
+ if attributes.key?(:'tax_id')
189
+ self.tax_id = attributes[:'tax_id']
190
+ end
191
+
192
+ if attributes.key?(:'website')
193
+ self.website = attributes[:'website']
194
+ end
195
+
196
+ if attributes.key?(:'country')
197
+ self.country = attributes[:'country']
198
+ end
199
+
200
+ if attributes.key?(:'street')
201
+ self.street = attributes[:'street']
202
+ end
203
+
204
+ if attributes.key?(:'city')
205
+ self.city = attributes[:'city']
206
+ end
207
+
208
+ if attributes.key?(:'state')
209
+ self.state = attributes[:'state']
210
+ end
211
+
212
+ if attributes.key?(:'postal_code')
213
+ self.postal_code = attributes[:'postal_code']
214
+ end
215
+
216
+ if attributes.key?(:'compliance_contact_email')
217
+ self.compliance_contact_email = attributes[:'compliance_contact_email']
218
+ end
219
+
220
+ if attributes.key?(:'compliance_contact_phone')
221
+ self.compliance_contact_phone = attributes[:'compliance_contact_phone']
222
+ end
223
+
224
+ if attributes.key?(:'vertical')
225
+ self.vertical = attributes[:'vertical']
226
+ end
227
+
228
+ if attributes.key?(:'entity_type')
229
+ self.entity_type = attributes[:'entity_type']
230
+ end
231
+
232
+ if attributes.key?(:'brand_status')
233
+ self.brand_status = attributes[:'brand_status']
234
+ end
235
+ end
236
+
237
+ # Show invalid properties with the reasons. Usually used together with valid?
238
+ # @return Array for valid properties with the reasons
239
+ def list_invalid_properties
240
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
241
+ invalid_properties = Array.new
242
+ invalid_properties
243
+ end
244
+
245
+ # Check to see if the all the properties in the model are valid
246
+ # @return true if the model is valid
247
+ def valid?
248
+ warn '[DEPRECATED] the `valid?` method is obsolete'
249
+ scenario_id_validator = EnumAttributeValidator.new('String', ["own_brand", "client_brand"])
250
+ return false unless scenario_id_validator.valid?(@scenario_id)
251
+ business_type_validator = EnumAttributeValidator.new('String', ["PRIVATE_PROFIT", "SOLE_PROPRIETOR", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT"])
252
+ return false unless business_type_validator.valid?(@business_type)
253
+ vertical_validator = EnumAttributeValidator.new('String', ["AGRICULTURE", "COMMUNICATION", "CONSTRUCTION", "EDUCATION", "ENERGY", "ENTERTAINMENT", "FINANCIAL", "GAMBLING", "GOVERNMENT", "HEALTHCARE", "HOSPITALITY", "HUMAN_RESOURCES", "INSURANCE", "LEGAL", "MANUFACTURING", "NGO", "POLITICAL", "POSTAL", "PROFESSIONAL", "REAL_ESTATE", "RETAIL", "TECHNOLOGY", "TRANSPORTATION"])
254
+ return false unless vertical_validator.valid?(@vertical)
255
+ brand_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
256
+ return false unless brand_status_validator.valid?(@brand_status)
257
+ true
258
+ end
259
+
260
+ # Custom attribute writer method checking allowed values (enum).
261
+ # @param [Object] scenario_id Object to be assigned
262
+ def scenario_id=(scenario_id)
263
+ validator = EnumAttributeValidator.new('String', ["own_brand", "client_brand"])
264
+ unless validator.valid?(scenario_id)
265
+ fail ArgumentError, "invalid value for \"scenario_id\", must be one of #{validator.allowable_values}."
266
+ end
267
+ @scenario_id = scenario_id
268
+ end
269
+
270
+ # Custom attribute writer method checking allowed values (enum).
271
+ # @param [Object] business_type Object to be assigned
272
+ def business_type=(business_type)
273
+ validator = EnumAttributeValidator.new('String', ["PRIVATE_PROFIT", "SOLE_PROPRIETOR", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT"])
274
+ unless validator.valid?(business_type)
275
+ fail ArgumentError, "invalid value for \"business_type\", must be one of #{validator.allowable_values}."
276
+ end
277
+ @business_type = business_type
278
+ end
279
+
280
+ # Custom attribute writer method checking allowed values (enum).
281
+ # @param [Object] vertical Object to be assigned
282
+ def vertical=(vertical)
283
+ validator = EnumAttributeValidator.new('String', ["AGRICULTURE", "COMMUNICATION", "CONSTRUCTION", "EDUCATION", "ENERGY", "ENTERTAINMENT", "FINANCIAL", "GAMBLING", "GOVERNMENT", "HEALTHCARE", "HOSPITALITY", "HUMAN_RESOURCES", "INSURANCE", "LEGAL", "MANUFACTURING", "NGO", "POLITICAL", "POSTAL", "PROFESSIONAL", "REAL_ESTATE", "RETAIL", "TECHNOLOGY", "TRANSPORTATION"])
284
+ unless validator.valid?(vertical)
285
+ fail ArgumentError, "invalid value for \"vertical\", must be one of #{validator.allowable_values}."
286
+ end
287
+ @vertical = vertical
288
+ end
289
+
290
+ # Custom attribute writer method checking allowed values (enum).
291
+ # @param [Object] brand_status Object to be assigned
292
+ def brand_status=(brand_status)
293
+ validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
294
+ unless validator.valid?(brand_status)
295
+ fail ArgumentError, "invalid value for \"brand_status\", must be one of #{validator.allowable_values}."
296
+ end
297
+ @brand_status = brand_status
298
+ end
299
+
300
+ # Checks equality by comparing each attribute.
301
+ # @param [Object] Object to be compared
302
+ def ==(o)
303
+ return true if self.equal?(o)
304
+ self.class == o.class &&
305
+ scenario_id == o.scenario_id &&
306
+ business_type == o.business_type &&
307
+ legal_name == o.legal_name &&
308
+ display_name == o.display_name &&
309
+ first_name == o.first_name &&
310
+ last_name == o.last_name &&
311
+ tax_id == o.tax_id &&
312
+ website == o.website &&
313
+ country == o.country &&
314
+ street == o.street &&
315
+ city == o.city &&
316
+ state == o.state &&
317
+ postal_code == o.postal_code &&
318
+ compliance_contact_email == o.compliance_contact_email &&
319
+ compliance_contact_phone == o.compliance_contact_phone &&
320
+ vertical == o.vertical &&
321
+ entity_type == o.entity_type &&
322
+ brand_status == o.brand_status
323
+ end
324
+
325
+ # @see the `==` method
326
+ # @param [Object] Object to be compared
327
+ def eql?(o)
328
+ self == o
329
+ end
330
+
331
+ # Calculates hash code according to all attributes.
332
+ # @return [Integer] Hash code
333
+ def hash
334
+ [scenario_id, business_type, legal_name, display_name, first_name, last_name, tax_id, website, country, street, city, state, postal_code, compliance_contact_email, compliance_contact_phone, vertical, entity_type, brand_status].hash
335
+ end
336
+
337
+ # Builds the object from hash
338
+ # @param [Hash] attributes Model attributes in the form of hash
339
+ # @return [Object] Returns the model itself
340
+ def self.build_from_hash(attributes)
341
+ return nil unless attributes.is_a?(Hash)
342
+ attributes = attributes.transform_keys(&:to_sym)
343
+ transformed_hash = {}
344
+ openapi_types.each_pair do |key, type|
345
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
346
+ transformed_hash["#{key}"] = nil
347
+ elsif type =~ /\AArray<(.*)>/i
348
+ # check to ensure the input is an array given that the attribute
349
+ # is documented as an array but the input is not
350
+ if attributes[attribute_map[key]].is_a?(Array)
351
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
352
+ end
353
+ elsif !attributes[attribute_map[key]].nil?
354
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
355
+ end
356
+ end
357
+ new(transformed_hash)
358
+ end
359
+
360
+ # Returns the object in the form of hash
361
+ # @return [Hash] Returns the object in the form of hash
362
+ def to_hash
363
+ hash = {}
364
+ self.class.attribute_map.each_pair do |attr, param|
365
+ value = self.send(attr)
366
+ if value.nil?
367
+ is_nullable = self.class.openapi_nullable.include?(attr)
368
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
369
+ end
370
+
371
+ hash[param] = _to_hash(value)
372
+ end
373
+ hash
374
+ end
375
+
376
+ end
377
+
378
+ end
@@ -16,16 +16,21 @@ require 'time'
16
16
  module Pingram
17
17
  # Request body for POST /registrations/us/10dlc/brand
18
18
  class TenDlcBrandCreateRequest < ApiModelBase
19
+ # Who the 10DLC brand is registered for. - own_brand: personal or company project - client_brand: agency or contractor
19
20
  attr_accessor :scenario_id
20
21
 
22
+ # Legal entity type for a 10DLC brand. - PRIVATE_PROFIT: private for-profit (LLC, corp, etc.) - SOLE_PROPRIETOR: sole proprietorship - PUBLIC_PROFIT: publicly traded for-profit - NON_PROFIT: non-profit - GOVERNMENT: government
21
23
  attr_accessor :business_type
22
24
 
23
25
  attr_accessor :legal_name
24
26
 
27
+ # Required when businessType is SOLE_PROPRIETOR.
25
28
  attr_accessor :first_name
26
29
 
30
+ # Required when businessType is SOLE_PROPRIETOR.
27
31
  attr_accessor :last_name
28
32
 
33
+ # For US companies (country US): 9-digit EIN (Employer Identification Number). For Canada (country CA): 9-digit BN (Business Number). For other countries: national business tax identifier. Required except when businessType is SOLE_PROPRIETOR.
29
34
  attr_accessor :tax_id
30
35
 
31
36
  attr_accessor :website
@@ -44,6 +49,28 @@ module Pingram
44
49
 
45
50
  attr_accessor :compliance_contact_phone
46
51
 
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
47
74
  # Attribute mapping from ruby-style variable name to JSON key.
48
75
  def self.attribute_map
49
76
  {
@@ -228,7 +255,11 @@ module Pingram
228
255
  def valid?
229
256
  warn '[DEPRECATED] the `valid?` method is obsolete'
230
257
  return false if @scenario_id.nil?
258
+ scenario_id_validator = EnumAttributeValidator.new('String', ["own_brand", "client_brand"])
259
+ return false unless scenario_id_validator.valid?(@scenario_id)
231
260
  return false if @business_type.nil?
261
+ business_type_validator = EnumAttributeValidator.new('String', ["PRIVATE_PROFIT", "SOLE_PROPRIETOR", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT"])
262
+ return false unless business_type_validator.valid?(@business_type)
232
263
  return false if @legal_name.nil?
233
264
  return false if @website.nil?
234
265
  return false if @country.nil?
@@ -237,23 +268,23 @@ module Pingram
237
268
  true
238
269
  end
239
270
 
240
- # Custom attribute writer method with validation
241
- # @param [Object] scenario_id Value to be assigned
271
+ # Custom attribute writer method checking allowed values (enum).
272
+ # @param [Object] scenario_id Object to be assigned
242
273
  def scenario_id=(scenario_id)
243
- if scenario_id.nil?
244
- fail ArgumentError, 'scenario_id cannot be nil'
274
+ validator = EnumAttributeValidator.new('String', ["own_brand", "client_brand"])
275
+ unless validator.valid?(scenario_id)
276
+ fail ArgumentError, "invalid value for \"scenario_id\", must be one of #{validator.allowable_values}."
245
277
  end
246
-
247
278
  @scenario_id = scenario_id
248
279
  end
249
280
 
250
- # Custom attribute writer method with validation
251
- # @param [Object] business_type Value to be assigned
281
+ # Custom attribute writer method checking allowed values (enum).
282
+ # @param [Object] business_type Object to be assigned
252
283
  def business_type=(business_type)
253
- if business_type.nil?
254
- fail ArgumentError, 'business_type cannot be nil'
284
+ validator = EnumAttributeValidator.new('String', ["PRIVATE_PROFIT", "SOLE_PROPRIETOR", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT"])
285
+ unless validator.valid?(business_type)
286
+ fail ArgumentError, "invalid value for \"business_type\", must be one of #{validator.allowable_values}."
255
287
  end
256
-
257
288
  @business_type = business_type
258
289
  end
259
290
 
@@ -52,10 +52,10 @@ module Pingram
52
52
 
53
53
  attr_accessor :compliance_contact_phone
54
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
55
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - 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
56
  attr_accessor :brand_status
57
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
58
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - 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
59
  attr_accessor :campaign_status
60
60
 
61
61
  attr_accessor :created_at