pingram 1.0.16 → 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 (179) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  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/numbers_api.rb +2 -2
  6. data/lib/pingram/api/profile_api.rb +66 -0
  7. data/lib/pingram/api/voice_api.rb +733 -0
  8. data/lib/pingram/api_client.rb +1 -1
  9. data/lib/pingram/client_wrapper.rb +10 -10
  10. data/lib/pingram/models/account_get_response.rb +216 -29
  11. data/lib/pingram/models/api_error_body.rb +4 -24
  12. data/lib/pingram/models/auto_join_get_response.rb +16 -16
  13. data/lib/pingram/models/auto_join_post_response.rb +16 -16
  14. data/lib/pingram/models/billing_post_request_body.rb +2 -12
  15. data/lib/pingram/models/billing_post_response_body.rb +56 -68
  16. data/lib/pingram/models/bind_number_request.rb +164 -0
  17. data/lib/pingram/models/bind_number_response.rb +164 -0
  18. data/lib/pingram/models/bind_number_response_agent.rb +342 -0
  19. data/lib/pingram/models/bind_number_response_agent_spec.rb +376 -0
  20. data/lib/pingram/models/bind_number_response_agent_spec_compliance.rb +164 -0
  21. data/lib/pingram/models/bind_number_response_agent_spec_conversation.rb +328 -0
  22. data/lib/pingram/models/bind_number_response_agent_spec_inbound.rb +214 -0
  23. data/lib/pingram/models/bind_number_response_agent_spec_model.rb +105 -0
  24. data/lib/pingram/models/bind_number_response_agent_spec_outbound.rb +251 -0
  25. data/lib/pingram/models/bind_number_response_agent_spec_tools_inner.rb +107 -0
  26. data/lib/pingram/models/bind_number_response_agent_spec_variables_inner.rb +182 -0
  27. data/lib/pingram/models/brand_webhook_response.rb +165 -0
  28. data/lib/pingram/models/chained.rb +401 -0
  29. data/lib/pingram/models/channels_enum.rb +2 -1
  30. data/lib/pingram/models/create_voice_agent_request.rb +164 -0
  31. data/lib/pingram/models/create_voice_agent_response.rb +164 -0
  32. data/lib/pingram/models/custom.rb +278 -0
  33. data/lib/pingram/models/delete_account_request.rb +147 -0
  34. data/lib/pingram/models/delete_voice_agent_response.rb +164 -0
  35. data/lib/pingram/models/dtmf.rb +188 -0
  36. data/lib/pingram/models/get_members_response_inner.rb +1 -27
  37. data/lib/pingram/models/get_notifications_response_inner_options.rb +10 -1
  38. data/lib/pingram/models/get_senders_response_inner.rb +13 -4
  39. data/lib/pingram/models/get_senders_response_inner_verification_records.rb +184 -0
  40. data/lib/pingram/models/get_senders_response_inner_verification_records_dkim.rb +287 -0
  41. data/lib/pingram/models/get_usage_history_query.rb +1 -1
  42. data/lib/pingram/models/{organization_usage_history.rb → get_usage_history_response.rb} +5 -5
  43. data/lib/pingram/models/get_usage_history_response_items_inner.rb +192 -0
  44. data/lib/pingram/models/get_usage_history_response_items_inner_counts.rb +346 -0
  45. data/lib/pingram/models/{organization_usage.rb → get_usage_response.rb} +17 -163
  46. data/lib/pingram/models/get_usage_response_costs.rb +148 -0
  47. data/lib/pingram/models/get_usage_response_counts.rb +347 -0
  48. data/lib/pingram/models/get_voice_agent_response.rb +164 -0
  49. data/lib/pingram/models/get_voice_call_response.rb +164 -0
  50. data/lib/pingram/models/get_voice_call_response_call.rb +521 -0
  51. data/lib/pingram/models/{a2p_registration_update_request.rb → get_voice_call_response_call_cost.rb} +53 -80
  52. data/lib/pingram/models/get_voice_call_response_call_cost_lines_inner.rb +245 -0
  53. data/lib/pingram/models/get_voice_call_response_call_timeline_inner.rb +247 -0
  54. data/lib/pingram/models/get_voice_call_response_call_timeline_inner_latency.rb +191 -0
  55. data/lib/pingram/models/inbound_response_body_results_inner.rb +4 -4
  56. data/lib/pingram/models/knowledge.rb +216 -0
  57. data/lib/pingram/models/{create_organization_response.rb → knowledge_documents_inner.rb} +50 -49
  58. data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +14 -4
  59. data/lib/pingram/models/list_voice_agents_response.rb +166 -0
  60. data/lib/pingram/models/list_voice_calls_response.rb +176 -0
  61. data/lib/pingram/models/list_voice_calls_response_calls_inner.rb +463 -0
  62. data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
  63. data/lib/pingram/models/mcp.rb +223 -0
  64. data/lib/pingram/models/phone_verify_confirm_request.rb +16 -4
  65. data/lib/pingram/models/s2s.rb +295 -0
  66. data/lib/pingram/models/send_email_api_response_any_of1_error.rb +4 -24
  67. data/lib/pingram/models/send_email_request.rb +1 -1
  68. data/lib/pingram/models/send_sms_response_any_of1_error.rb +4 -24
  69. data/lib/pingram/models/sender_post_body_options_email.rb +5 -15
  70. data/lib/pingram/models/{a2p_registration_create_request.rb → ten_dlc_brand_create_request.rb} +56 -28
  71. data/lib/pingram/models/{a2p_registration.rb → ten_dlc_brand_registration.rb} +72 -22
  72. data/lib/pingram/models/ten_dlc_brand_registration_details.rb +599 -0
  73. data/lib/pingram/models/ten_dlc_brand_update_request.rb +338 -0
  74. data/lib/pingram/models/transfer.rb +251 -0
  75. data/lib/pingram/models/unbind_number_response.rb +164 -0
  76. data/lib/pingram/models/update_voice_agent_request.rb +164 -0
  77. data/lib/pingram/models/update_voice_agent_response.rb +164 -0
  78. data/lib/pingram/models/voice_browser_call_request.rb +186 -0
  79. data/lib/pingram/models/voice_browser_call_response.rb +216 -0
  80. data/lib/pingram/models/voice_call_request.rb +212 -0
  81. data/lib/pingram/models/voice_call_response.rb +217 -0
  82. data/lib/pingram/models/webhook_event.rb +2 -2
  83. data/lib/pingram/version.rb +1 -1
  84. data/lib/pingram.rb +54 -9
  85. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.12.0.gem +0 -0
  86. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  87. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  88. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  89. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  90. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  91. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
  92. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  93. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  94. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current.rb +1 -1
  95. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/version.rb +1 -1
  96. data/vendor/bundle/ruby/3.2.0/specifications/{parser-3.3.11.1.gemspec → parser-3.3.12.0.gemspec} +4 -4
  97. metadata +138 -93
  98. data/lib/pingram/api/organization_api.rb +0 -201
  99. data/lib/pingram/models/organization.rb +0 -442
  100. data/lib/pingram/models/organization_usage_history_items_inner.rb +0 -330
  101. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.11.1.gem +0 -0
  102. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/LICENSE.txt +0 -0
  103. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-parse +0 -0
  104. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-rewrite +0 -0
  105. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/gauntlet_parser.rb +0 -0
  106. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/all.rb +0 -0
  107. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ast/node.rb +0 -0
  108. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ast/processor.rb +0 -0
  109. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/base.rb +0 -0
  110. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/builders/default.rb +0 -0
  111. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/clobbering_error.rb +0 -0
  112. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/color.rb +0 -0
  113. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/context.rb +0 -0
  114. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current_arg_stack.rb +0 -0
  115. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/deprecation.rb +0 -0
  116. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic/engine.rb +0 -0
  117. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic.rb +0 -0
  118. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/dedenter.rb +0 -0
  119. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/explanation.rb +0 -0
  120. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/literal.rb +0 -0
  121. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/stack_state.rb +0 -0
  122. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-F0.rb +0 -0
  123. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-F1.rb +0 -0
  124. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-strings.rb +0 -0
  125. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/macruby.rb +0 -0
  126. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/max_numparam_stack.rb +0 -0
  127. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/messages.rb +0 -0
  128. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/meta.rb +0 -0
  129. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rewriter.rb +0 -0
  130. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby18.rb +0 -0
  131. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby19.rb +0 -0
  132. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby20.rb +0 -0
  133. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby21.rb +0 -0
  134. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby22.rb +0 -0
  135. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby23.rb +0 -0
  136. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby24.rb +0 -0
  137. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby25.rb +0 -0
  138. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby26.rb +0 -0
  139. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby27.rb +0 -0
  140. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby30.rb +0 -0
  141. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby31.rb +0 -0
  142. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby32.rb +0 -0
  143. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby33.rb +0 -0
  144. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby34.rb +0 -0
  145. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rubymotion.rb +0 -0
  146. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner/ruby_parse.rb +0 -0
  147. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner/ruby_rewrite.rb +0 -0
  148. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner.rb +0 -0
  149. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/buffer.rb +0 -0
  150. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/comment/associator.rb +0 -0
  151. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/comment.rb +0 -0
  152. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/collection.rb +0 -0
  153. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/condition.rb +0 -0
  154. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/constant.rb +0 -0
  155. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/definition.rb +0 -0
  156. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/for.rb +0 -0
  157. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/heredoc.rb +0 -0
  158. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/index.rb +0 -0
  159. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/keyword.rb +0 -0
  160. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/method_definition.rb +0 -0
  161. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/objc_kwarg.rb +0 -0
  162. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/operator.rb +0 -0
  163. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/rescue_body.rb +0 -0
  164. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/send.rb +0 -0
  165. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/ternary.rb +0 -0
  166. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/variable.rb +0 -0
  167. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map.rb +0 -0
  168. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/range.rb +0 -0
  169. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/rewriter/action.rb +0 -0
  170. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/rewriter.rb +0 -0
  171. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/tree_rewriter/action.rb +0 -0
  172. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/tree_rewriter.rb +0 -0
  173. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/static_environment.rb +0 -0
  174. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/syntax_error.rb +0 -0
  175. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/tree_rewriter.rb +0 -0
  176. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/unknown_encoding_in_magic_comment_error.rb +0 -0
  177. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/variables_stack.rb +0 -0
  178. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser.rb +0 -0
  179. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/parser.gemspec +0 -0
@@ -0,0 +1,338 @@
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 PATCH /registrations/us/10dlc/brand
18
+ class TenDlcBrandUpdateRequest < ApiModelBase
19
+ attr_accessor :scenario_id
20
+
21
+ attr_accessor :business_type
22
+
23
+ attr_accessor :legal_name
24
+
25
+ # Brand display name (marketing/DBA); defaults to legalName when omitted on legalName-only updates.
26
+ attr_accessor :display_name
27
+
28
+ attr_accessor :first_name
29
+
30
+ attr_accessor :last_name
31
+
32
+ attr_accessor :vertical
33
+
34
+ # Admin-only; legacy Other records. Ignored on customer PATCH.
35
+ attr_accessor :entity_type
36
+
37
+ # 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
38
+ attr_accessor :brand_status
39
+
40
+ attr_accessor :tax_id
41
+
42
+ attr_accessor :website
43
+
44
+ attr_accessor :country
45
+
46
+ attr_accessor :street
47
+
48
+ attr_accessor :city
49
+
50
+ attr_accessor :state
51
+
52
+ attr_accessor :postal_code
53
+
54
+ attr_accessor :compliance_contact_email
55
+
56
+ attr_accessor :compliance_contact_phone
57
+
58
+ class EnumAttributeValidator
59
+ attr_reader :datatype
60
+ attr_reader :allowable_values
61
+
62
+ def initialize(datatype, allowable_values)
63
+ @allowable_values = allowable_values.map do |value|
64
+ case datatype.to_s
65
+ when /Integer/i
66
+ value.to_i
67
+ when /Float/i
68
+ value.to_f
69
+ else
70
+ value
71
+ end
72
+ end
73
+ end
74
+
75
+ def valid?(value)
76
+ !value || allowable_values.include?(value)
77
+ end
78
+ end
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'scenario_id' => :'scenarioId',
84
+ :'business_type' => :'businessType',
85
+ :'legal_name' => :'legalName',
86
+ :'display_name' => :'displayName',
87
+ :'first_name' => :'firstName',
88
+ :'last_name' => :'lastName',
89
+ :'vertical' => :'vertical',
90
+ :'entity_type' => :'entityType',
91
+ :'brand_status' => :'brandStatus',
92
+ :'tax_id' => :'taxId',
93
+ :'website' => :'website',
94
+ :'country' => :'country',
95
+ :'street' => :'street',
96
+ :'city' => :'city',
97
+ :'state' => :'state',
98
+ :'postal_code' => :'postalCode',
99
+ :'compliance_contact_email' => :'complianceContactEmail',
100
+ :'compliance_contact_phone' => :'complianceContactPhone'
101
+ }
102
+ end
103
+
104
+ # Returns attribute mapping this model knows about
105
+ def self.acceptable_attribute_map
106
+ attribute_map
107
+ end
108
+
109
+ # Returns all the JSON keys this model knows about
110
+ def self.acceptable_attributes
111
+ acceptable_attribute_map.values
112
+ end
113
+
114
+ # Attribute type mapping.
115
+ def self.openapi_types
116
+ {
117
+ :'scenario_id' => :'String',
118
+ :'business_type' => :'String',
119
+ :'legal_name' => :'String',
120
+ :'display_name' => :'String',
121
+ :'first_name' => :'String',
122
+ :'last_name' => :'String',
123
+ :'vertical' => :'String',
124
+ :'entity_type' => :'String',
125
+ :'brand_status' => :'String',
126
+ :'tax_id' => :'String',
127
+ :'website' => :'String',
128
+ :'country' => :'String',
129
+ :'street' => :'String',
130
+ :'city' => :'String',
131
+ :'state' => :'String',
132
+ :'postal_code' => :'String',
133
+ :'compliance_contact_email' => :'String',
134
+ :'compliance_contact_phone' => :'String'
135
+ }
136
+ end
137
+
138
+ # List of attributes with nullable: true
139
+ def self.openapi_nullable
140
+ Set.new([
141
+ ])
142
+ end
143
+
144
+ # Initializes the object
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ def initialize(attributes = {})
147
+ if (!attributes.is_a?(Hash))
148
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TenDlcBrandUpdateRequest` initialize method"
149
+ end
150
+
151
+ # check to see if the attribute exists and convert string to symbol for hash key
152
+ acceptable_attribute_map = self.class.acceptable_attribute_map
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!acceptable_attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TenDlcBrandUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'scenario_id')
161
+ self.scenario_id = attributes[:'scenario_id']
162
+ end
163
+
164
+ if attributes.key?(:'business_type')
165
+ self.business_type = attributes[:'business_type']
166
+ end
167
+
168
+ if attributes.key?(:'legal_name')
169
+ self.legal_name = attributes[:'legal_name']
170
+ end
171
+
172
+ if attributes.key?(:'display_name')
173
+ self.display_name = attributes[:'display_name']
174
+ end
175
+
176
+ if attributes.key?(:'first_name')
177
+ self.first_name = attributes[:'first_name']
178
+ end
179
+
180
+ if attributes.key?(:'last_name')
181
+ self.last_name = attributes[:'last_name']
182
+ end
183
+
184
+ if attributes.key?(:'vertical')
185
+ self.vertical = attributes[:'vertical']
186
+ end
187
+
188
+ if attributes.key?(:'entity_type')
189
+ self.entity_type = attributes[:'entity_type']
190
+ end
191
+
192
+ if attributes.key?(:'brand_status')
193
+ self.brand_status = attributes[:'brand_status']
194
+ end
195
+
196
+ if attributes.key?(:'tax_id')
197
+ self.tax_id = attributes[:'tax_id']
198
+ end
199
+
200
+ if attributes.key?(:'website')
201
+ self.website = attributes[:'website']
202
+ end
203
+
204
+ if attributes.key?(:'country')
205
+ self.country = attributes[:'country']
206
+ end
207
+
208
+ if attributes.key?(:'street')
209
+ self.street = attributes[:'street']
210
+ end
211
+
212
+ if attributes.key?(:'city')
213
+ self.city = attributes[:'city']
214
+ end
215
+
216
+ if attributes.key?(:'state')
217
+ self.state = attributes[:'state']
218
+ end
219
+
220
+ if attributes.key?(:'postal_code')
221
+ self.postal_code = attributes[:'postal_code']
222
+ end
223
+
224
+ if attributes.key?(:'compliance_contact_email')
225
+ self.compliance_contact_email = attributes[:'compliance_contact_email']
226
+ end
227
+
228
+ if attributes.key?(:'compliance_contact_phone')
229
+ self.compliance_contact_phone = attributes[:'compliance_contact_phone']
230
+ end
231
+ end
232
+
233
+ # Show invalid properties with the reasons. Usually used together with valid?
234
+ # @return Array for valid properties with the reasons
235
+ def list_invalid_properties
236
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
237
+ invalid_properties = Array.new
238
+ invalid_properties
239
+ end
240
+
241
+ # Check to see if the all the properties in the model are valid
242
+ # @return true if the model is valid
243
+ def valid?
244
+ warn '[DEPRECATED] the `valid?` method is obsolete'
245
+ brand_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
246
+ return false unless brand_status_validator.valid?(@brand_status)
247
+ true
248
+ end
249
+
250
+ # Custom attribute writer method checking allowed values (enum).
251
+ # @param [Object] brand_status Object to be assigned
252
+ def brand_status=(brand_status)
253
+ validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
254
+ unless validator.valid?(brand_status)
255
+ fail ArgumentError, "invalid value for \"brand_status\", must be one of #{validator.allowable_values}."
256
+ end
257
+ @brand_status = brand_status
258
+ end
259
+
260
+ # Checks equality by comparing each attribute.
261
+ # @param [Object] Object to be compared
262
+ def ==(o)
263
+ return true if self.equal?(o)
264
+ self.class == o.class &&
265
+ scenario_id == o.scenario_id &&
266
+ business_type == o.business_type &&
267
+ legal_name == o.legal_name &&
268
+ display_name == o.display_name &&
269
+ first_name == o.first_name &&
270
+ last_name == o.last_name &&
271
+ vertical == o.vertical &&
272
+ entity_type == o.entity_type &&
273
+ brand_status == o.brand_status &&
274
+ tax_id == o.tax_id &&
275
+ website == o.website &&
276
+ country == o.country &&
277
+ street == o.street &&
278
+ city == o.city &&
279
+ state == o.state &&
280
+ postal_code == o.postal_code &&
281
+ compliance_contact_email == o.compliance_contact_email &&
282
+ compliance_contact_phone == o.compliance_contact_phone
283
+ end
284
+
285
+ # @see the `==` method
286
+ # @param [Object] Object to be compared
287
+ def eql?(o)
288
+ self == o
289
+ end
290
+
291
+ # Calculates hash code according to all attributes.
292
+ # @return [Integer] Hash code
293
+ def hash
294
+ [scenario_id, business_type, legal_name, display_name, first_name, last_name, vertical, entity_type, brand_status, tax_id, website, country, street, city, state, postal_code, compliance_contact_email, compliance_contact_phone].hash
295
+ end
296
+
297
+ # Builds the object from hash
298
+ # @param [Hash] attributes Model attributes in the form of hash
299
+ # @return [Object] Returns the model itself
300
+ def self.build_from_hash(attributes)
301
+ return nil unless attributes.is_a?(Hash)
302
+ attributes = attributes.transform_keys(&:to_sym)
303
+ transformed_hash = {}
304
+ openapi_types.each_pair do |key, type|
305
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
306
+ transformed_hash["#{key}"] = nil
307
+ elsif type =~ /\AArray<(.*)>/i
308
+ # check to ensure the input is an array given that the attribute
309
+ # is documented as an array but the input is not
310
+ if attributes[attribute_map[key]].is_a?(Array)
311
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
312
+ end
313
+ elsif !attributes[attribute_map[key]].nil?
314
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
315
+ end
316
+ end
317
+ new(transformed_hash)
318
+ end
319
+
320
+ # Returns the object in the form of hash
321
+ # @return [Hash] Returns the object in the form of hash
322
+ def to_hash
323
+ hash = {}
324
+ self.class.attribute_map.each_pair do |attr, param|
325
+ value = self.send(attr)
326
+ if value.nil?
327
+ is_nullable = self.class.openapi_nullable.include?(attr)
328
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
329
+ end
330
+
331
+ hash[param] = _to_hash(value)
332
+ end
333
+ hash
334
+ end
335
+
336
+ end
337
+
338
+ end
@@ -0,0 +1,251 @@
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 Transfer < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :transfer_mode
21
+
22
+ attr_accessor :destination
23
+
24
+ attr_accessor :briefing
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'type' => :'type',
52
+ :'transfer_mode' => :'transferMode',
53
+ :'destination' => :'destination',
54
+ :'briefing' => :'briefing'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'type' => :'String',
72
+ :'transfer_mode' => :'String',
73
+ :'destination' => :'String',
74
+ :'briefing' => :'String'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::Transfer` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::Transfer`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'type')
101
+ self.type = attributes[:'type']
102
+ else
103
+ self.type = nil
104
+ end
105
+
106
+ if attributes.key?(:'transfer_mode')
107
+ self.transfer_mode = attributes[:'transfer_mode']
108
+ else
109
+ self.transfer_mode = nil
110
+ end
111
+
112
+ if attributes.key?(:'destination')
113
+ self.destination = attributes[:'destination']
114
+ else
115
+ self.destination = nil
116
+ end
117
+
118
+ if attributes.key?(:'briefing')
119
+ self.briefing = attributes[:'briefing']
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ if @type.nil?
129
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
130
+ end
131
+
132
+ if @transfer_mode.nil?
133
+ invalid_properties.push('invalid value for "transfer_mode", transfer_mode cannot be nil.')
134
+ end
135
+
136
+ if @destination.nil?
137
+ invalid_properties.push('invalid value for "destination", destination cannot be nil.')
138
+ end
139
+
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ warn '[DEPRECATED] the `valid?` method is obsolete'
147
+ return false if @type.nil?
148
+ type_validator = EnumAttributeValidator.new('String', ["transfer"])
149
+ return false unless type_validator.valid?(@type)
150
+ return false if @transfer_mode.nil?
151
+ transfer_mode_validator = EnumAttributeValidator.new('String', ["warm", "cold"])
152
+ return false unless transfer_mode_validator.valid?(@transfer_mode)
153
+ return false if @destination.nil?
154
+ true
155
+ end
156
+
157
+ # Custom attribute writer method checking allowed values (enum).
158
+ # @param [Object] type Object to be assigned
159
+ def type=(type)
160
+ validator = EnumAttributeValidator.new('String', ["transfer"])
161
+ unless validator.valid?(type)
162
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
163
+ end
164
+ @type = type
165
+ end
166
+
167
+ # Custom attribute writer method checking allowed values (enum).
168
+ # @param [Object] transfer_mode Object to be assigned
169
+ def transfer_mode=(transfer_mode)
170
+ validator = EnumAttributeValidator.new('String', ["warm", "cold"])
171
+ unless validator.valid?(transfer_mode)
172
+ fail ArgumentError, "invalid value for \"transfer_mode\", must be one of #{validator.allowable_values}."
173
+ end
174
+ @transfer_mode = transfer_mode
175
+ end
176
+
177
+ # Custom attribute writer method with validation
178
+ # @param [Object] destination Value to be assigned
179
+ def destination=(destination)
180
+ if destination.nil?
181
+ fail ArgumentError, 'destination cannot be nil'
182
+ end
183
+
184
+ @destination = destination
185
+ end
186
+
187
+ # Checks equality by comparing each attribute.
188
+ # @param [Object] Object to be compared
189
+ def ==(o)
190
+ return true if self.equal?(o)
191
+ self.class == o.class &&
192
+ type == o.type &&
193
+ transfer_mode == o.transfer_mode &&
194
+ destination == o.destination &&
195
+ briefing == o.briefing
196
+ end
197
+
198
+ # @see the `==` method
199
+ # @param [Object] Object to be compared
200
+ def eql?(o)
201
+ self == o
202
+ end
203
+
204
+ # Calculates hash code according to all attributes.
205
+ # @return [Integer] Hash code
206
+ def hash
207
+ [type, transfer_mode, destination, briefing].hash
208
+ end
209
+
210
+ # Builds the object from hash
211
+ # @param [Hash] attributes Model attributes in the form of hash
212
+ # @return [Object] Returns the model itself
213
+ def self.build_from_hash(attributes)
214
+ return nil unless attributes.is_a?(Hash)
215
+ attributes = attributes.transform_keys(&:to_sym)
216
+ transformed_hash = {}
217
+ openapi_types.each_pair do |key, type|
218
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = nil
220
+ elsif type =~ /\AArray<(.*)>/i
221
+ # check to ensure the input is an array given that the attribute
222
+ # is documented as an array but the input is not
223
+ if attributes[attribute_map[key]].is_a?(Array)
224
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
225
+ end
226
+ elsif !attributes[attribute_map[key]].nil?
227
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
228
+ end
229
+ end
230
+ new(transformed_hash)
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ end
250
+
251
+ end