pingram 1.0.16 → 1.0.17

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 (169) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/numbers_api.rb +2 -2
  4. data/lib/pingram/api/organization_api.rb +15 -4
  5. data/lib/pingram/api/profile_api.rb +66 -0
  6. data/lib/pingram/api/voice_api.rb +733 -0
  7. data/lib/pingram/api_client.rb +1 -1
  8. data/lib/pingram/client_wrapper.rb +10 -0
  9. data/lib/pingram/models/api_error_body.rb +4 -24
  10. data/lib/pingram/models/billing_post_request_body.rb +2 -12
  11. data/lib/pingram/models/billing_post_response_body.rb +22 -1
  12. data/lib/pingram/models/bind_number_request.rb +164 -0
  13. data/lib/pingram/models/bind_number_response.rb +164 -0
  14. data/lib/pingram/models/bind_number_response_agent.rb +342 -0
  15. data/lib/pingram/models/bind_number_response_agent_spec.rb +376 -0
  16. data/lib/pingram/models/bind_number_response_agent_spec_compliance.rb +164 -0
  17. data/lib/pingram/models/bind_number_response_agent_spec_conversation.rb +328 -0
  18. data/lib/pingram/models/bind_number_response_agent_spec_inbound.rb +214 -0
  19. data/lib/pingram/models/bind_number_response_agent_spec_model.rb +105 -0
  20. data/lib/pingram/models/bind_number_response_agent_spec_outbound.rb +251 -0
  21. data/lib/pingram/models/bind_number_response_agent_spec_tools_inner.rb +107 -0
  22. data/lib/pingram/models/bind_number_response_agent_spec_variables_inner.rb +182 -0
  23. data/lib/pingram/models/chained.rb +401 -0
  24. data/lib/pingram/models/channels_enum.rb +2 -1
  25. data/lib/pingram/models/create_organization_request.rb +150 -0
  26. data/lib/pingram/models/create_voice_agent_request.rb +164 -0
  27. data/lib/pingram/models/create_voice_agent_response.rb +164 -0
  28. data/lib/pingram/models/custom.rb +278 -0
  29. data/lib/pingram/models/delete_account_request.rb +147 -0
  30. data/lib/pingram/models/delete_voice_agent_response.rb +164 -0
  31. data/lib/pingram/models/dtmf.rb +188 -0
  32. data/lib/pingram/models/get_notifications_response_inner_options.rb +10 -1
  33. data/lib/pingram/models/get_senders_response_inner.rb +13 -4
  34. data/lib/pingram/models/get_senders_response_inner_verification_records.rb +184 -0
  35. data/lib/pingram/models/get_senders_response_inner_verification_records_dkim.rb +287 -0
  36. data/lib/pingram/models/get_voice_agent_response.rb +164 -0
  37. data/lib/pingram/models/get_voice_call_response.rb +164 -0
  38. data/lib/pingram/models/get_voice_call_response_call.rb +521 -0
  39. data/lib/pingram/models/get_voice_call_response_call_cost.rb +193 -0
  40. data/lib/pingram/models/get_voice_call_response_call_cost_lines_inner.rb +245 -0
  41. data/lib/pingram/models/get_voice_call_response_call_timeline_inner.rb +247 -0
  42. data/lib/pingram/models/get_voice_call_response_call_timeline_inner_latency.rb +191 -0
  43. data/lib/pingram/models/inbound_response_body_results_inner.rb +4 -4
  44. data/lib/pingram/models/knowledge.rb +216 -0
  45. data/lib/pingram/models/knowledge_documents_inner.rb +217 -0
  46. data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +14 -4
  47. data/lib/pingram/models/list_voice_agents_response.rb +166 -0
  48. data/lib/pingram/models/list_voice_calls_response.rb +176 -0
  49. data/lib/pingram/models/list_voice_calls_response_calls_inner.rb +463 -0
  50. data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
  51. data/lib/pingram/models/mcp.rb +223 -0
  52. data/lib/pingram/models/organization.rb +22 -1
  53. data/lib/pingram/models/organization_usage.rb +13 -159
  54. data/lib/pingram/models/organization_usage_costs.rb +148 -0
  55. data/lib/pingram/models/organization_usage_counts.rb +347 -0
  56. data/lib/pingram/models/organization_usage_history_items_inner.rb +16 -154
  57. data/lib/pingram/models/organization_usage_history_items_inner_counts.rb +346 -0
  58. data/lib/pingram/models/phone_verify_confirm_request.rb +16 -4
  59. data/lib/pingram/models/s2s.rb +295 -0
  60. data/lib/pingram/models/send_email_api_response_any_of1_error.rb +4 -24
  61. data/lib/pingram/models/send_email_request.rb +1 -1
  62. data/lib/pingram/models/send_sms_response_any_of1_error.rb +4 -24
  63. data/lib/pingram/models/sender_post_body_options_email.rb +1 -1
  64. data/lib/pingram/models/{a2p_registration_create_request.rb → ten_dlc_brand_create_request.rb} +38 -28
  65. data/lib/pingram/models/{a2p_registration.rb → ten_dlc_brand_registration.rb} +54 -22
  66. data/lib/pingram/models/{a2p_registration_update_request.rb → ten_dlc_brand_update_request.rb} +38 -11
  67. data/lib/pingram/models/transfer.rb +251 -0
  68. data/lib/pingram/models/unbind_number_response.rb +164 -0
  69. data/lib/pingram/models/update_voice_agent_request.rb +164 -0
  70. data/lib/pingram/models/update_voice_agent_response.rb +164 -0
  71. data/lib/pingram/models/voice_browser_call_request.rb +186 -0
  72. data/lib/pingram/models/voice_browser_call_response.rb +216 -0
  73. data/lib/pingram/models/voice_call_request.rb +212 -0
  74. data/lib/pingram/models/voice_call_response.rb +217 -0
  75. data/lib/pingram/models/webhook_event.rb +2 -2
  76. data/lib/pingram/version.rb +1 -1
  77. data/lib/pingram.rb +50 -3
  78. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.12.0.gem +0 -0
  79. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  80. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  81. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  82. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  83. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  84. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
  85. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  86. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  87. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current.rb +1 -1
  88. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/version.rb +1 -1
  89. data/vendor/bundle/ruby/3.2.0/specifications/{parser-3.3.11.1.gemspec → parser-3.3.12.0.gemspec} +4 -4
  90. metadata +134 -87
  91. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.11.1.gem +0 -0
  92. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/LICENSE.txt +0 -0
  93. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-parse +0 -0
  94. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-rewrite +0 -0
  95. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/gauntlet_parser.rb +0 -0
  96. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/all.rb +0 -0
  97. /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
  98. /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
  99. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/base.rb +0 -0
  100. /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
  101. /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
  102. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/color.rb +0 -0
  103. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/context.rb +0 -0
  104. /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
  105. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/deprecation.rb +0 -0
  106. /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
  107. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic.rb +0 -0
  108. /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
  109. /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
  110. /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
  111. /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
  112. /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
  113. /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
  114. /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
  115. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/macruby.rb +0 -0
  116. /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
  117. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/messages.rb +0 -0
  118. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/meta.rb +0 -0
  119. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rewriter.rb +0 -0
  120. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby18.rb +0 -0
  121. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby19.rb +0 -0
  122. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby20.rb +0 -0
  123. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby21.rb +0 -0
  124. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby22.rb +0 -0
  125. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby23.rb +0 -0
  126. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby24.rb +0 -0
  127. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby25.rb +0 -0
  128. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby26.rb +0 -0
  129. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby27.rb +0 -0
  130. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby30.rb +0 -0
  131. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby31.rb +0 -0
  132. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby32.rb +0 -0
  133. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby33.rb +0 -0
  134. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby34.rb +0 -0
  135. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rubymotion.rb +0 -0
  136. /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
  137. /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
  138. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner.rb +0 -0
  139. /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
  140. /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
  141. /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
  142. /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
  143. /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
  144. /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
  145. /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
  146. /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
  147. /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
  148. /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
  149. /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
  150. /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
  151. /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
  152. /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
  153. /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
  154. /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
  155. /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
  156. /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
  157. /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
  158. /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
  159. /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
  160. /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
  161. /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
  162. /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
  163. /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
  164. /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
  165. /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
  166. /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
  167. /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
  168. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser.rb +0 -0
  169. /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,342 @@
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
+ # Agent record returned by GET /voice/agents.
18
+ class BindNumberResponseAgent < ApiModelBase
19
+ attr_accessor :agent_id
20
+
21
+ attr_accessor :deployment
22
+
23
+ attr_accessor :spec
24
+
25
+ attr_accessor :phone_numbers
26
+
27
+ attr_accessor :worker_presence
28
+
29
+ attr_accessor :created_at
30
+
31
+ attr_accessor :updated_at
32
+
33
+ class EnumAttributeValidator
34
+ attr_reader :datatype
35
+ attr_reader :allowable_values
36
+
37
+ def initialize(datatype, allowable_values)
38
+ @allowable_values = allowable_values.map do |value|
39
+ case datatype.to_s
40
+ when /Integer/i
41
+ value.to_i
42
+ when /Float/i
43
+ value.to_f
44
+ else
45
+ value
46
+ end
47
+ end
48
+ end
49
+
50
+ def valid?(value)
51
+ !value || allowable_values.include?(value)
52
+ end
53
+ end
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'agent_id' => :'agentId',
59
+ :'deployment' => :'deployment',
60
+ :'spec' => :'spec',
61
+ :'phone_numbers' => :'phoneNumbers',
62
+ :'worker_presence' => :'workerPresence',
63
+ :'created_at' => :'createdAt',
64
+ :'updated_at' => :'updatedAt'
65
+ }
66
+ end
67
+
68
+ # Returns attribute mapping this model knows about
69
+ def self.acceptable_attribute_map
70
+ attribute_map
71
+ end
72
+
73
+ # Returns all the JSON keys this model knows about
74
+ def self.acceptable_attributes
75
+ acceptable_attribute_map.values
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.openapi_types
80
+ {
81
+ :'agent_id' => :'String',
82
+ :'deployment' => :'String',
83
+ :'spec' => :'BindNumberResponseAgentSpec',
84
+ :'phone_numbers' => :'Array<String>',
85
+ :'worker_presence' => :'String',
86
+ :'created_at' => :'String',
87
+ :'updated_at' => :'String'
88
+ }
89
+ end
90
+
91
+ # List of attributes with nullable: true
92
+ def self.openapi_nullable
93
+ Set.new([
94
+ ])
95
+ end
96
+
97
+ # Initializes the object
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ def initialize(attributes = {})
100
+ if (!attributes.is_a?(Hash))
101
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::BindNumberResponseAgent` initialize method"
102
+ end
103
+
104
+ # check to see if the attribute exists and convert string to symbol for hash key
105
+ acceptable_attribute_map = self.class.acceptable_attribute_map
106
+ attributes = attributes.each_with_object({}) { |(k, v), h|
107
+ if (!acceptable_attribute_map.key?(k.to_sym))
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::BindNumberResponseAgent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
109
+ end
110
+ h[k.to_sym] = v
111
+ }
112
+
113
+ if attributes.key?(:'agent_id')
114
+ self.agent_id = attributes[:'agent_id']
115
+ else
116
+ self.agent_id = nil
117
+ end
118
+
119
+ if attributes.key?(:'deployment')
120
+ self.deployment = attributes[:'deployment']
121
+ else
122
+ self.deployment = nil
123
+ end
124
+
125
+ if attributes.key?(:'spec')
126
+ self.spec = attributes[:'spec']
127
+ else
128
+ self.spec = nil
129
+ end
130
+
131
+ if attributes.key?(:'phone_numbers')
132
+ if (value = attributes[:'phone_numbers']).is_a?(Array)
133
+ self.phone_numbers = value
134
+ end
135
+ else
136
+ self.phone_numbers = nil
137
+ end
138
+
139
+ if attributes.key?(:'worker_presence')
140
+ self.worker_presence = attributes[:'worker_presence']
141
+ end
142
+
143
+ if attributes.key?(:'created_at')
144
+ self.created_at = attributes[:'created_at']
145
+ else
146
+ self.created_at = nil
147
+ end
148
+
149
+ if attributes.key?(:'updated_at')
150
+ self.updated_at = attributes[:'updated_at']
151
+ else
152
+ self.updated_at = nil
153
+ end
154
+ end
155
+
156
+ # Show invalid properties with the reasons. Usually used together with valid?
157
+ # @return Array for valid properties with the reasons
158
+ def list_invalid_properties
159
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
160
+ invalid_properties = Array.new
161
+ if @agent_id.nil?
162
+ invalid_properties.push('invalid value for "agent_id", agent_id cannot be nil.')
163
+ end
164
+
165
+ if @deployment.nil?
166
+ invalid_properties.push('invalid value for "deployment", deployment cannot be nil.')
167
+ end
168
+
169
+ if @spec.nil?
170
+ invalid_properties.push('invalid value for "spec", spec cannot be nil.')
171
+ end
172
+
173
+ if @phone_numbers.nil?
174
+ invalid_properties.push('invalid value for "phone_numbers", phone_numbers cannot be nil.')
175
+ end
176
+
177
+ if @created_at.nil?
178
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
179
+ end
180
+
181
+ if @updated_at.nil?
182
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
183
+ end
184
+
185
+ invalid_properties
186
+ end
187
+
188
+ # Check to see if the all the properties in the model are valid
189
+ # @return true if the model is valid
190
+ def valid?
191
+ warn '[DEPRECATED] the `valid?` method is obsolete'
192
+ return false if @agent_id.nil?
193
+ return false if @deployment.nil?
194
+ deployment_validator = EnumAttributeValidator.new('String', ["hosted", "ejected"])
195
+ return false unless deployment_validator.valid?(@deployment)
196
+ return false if @spec.nil?
197
+ return false if @phone_numbers.nil?
198
+ worker_presence_validator = EnumAttributeValidator.new('String', ["online", "offline"])
199
+ return false unless worker_presence_validator.valid?(@worker_presence)
200
+ return false if @created_at.nil?
201
+ return false if @updated_at.nil?
202
+ true
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] agent_id Value to be assigned
207
+ def agent_id=(agent_id)
208
+ if agent_id.nil?
209
+ fail ArgumentError, 'agent_id cannot be nil'
210
+ end
211
+
212
+ @agent_id = agent_id
213
+ end
214
+
215
+ # Custom attribute writer method checking allowed values (enum).
216
+ # @param [Object] deployment Object to be assigned
217
+ def deployment=(deployment)
218
+ validator = EnumAttributeValidator.new('String', ["hosted", "ejected"])
219
+ unless validator.valid?(deployment)
220
+ fail ArgumentError, "invalid value for \"deployment\", must be one of #{validator.allowable_values}."
221
+ end
222
+ @deployment = deployment
223
+ end
224
+
225
+ # Custom attribute writer method with validation
226
+ # @param [Object] spec Value to be assigned
227
+ def spec=(spec)
228
+ if spec.nil?
229
+ fail ArgumentError, 'spec cannot be nil'
230
+ end
231
+
232
+ @spec = spec
233
+ end
234
+
235
+ # Custom attribute writer method with validation
236
+ # @param [Object] phone_numbers Value to be assigned
237
+ def phone_numbers=(phone_numbers)
238
+ if phone_numbers.nil?
239
+ fail ArgumentError, 'phone_numbers cannot be nil'
240
+ end
241
+
242
+ @phone_numbers = phone_numbers
243
+ end
244
+
245
+ # Custom attribute writer method checking allowed values (enum).
246
+ # @param [Object] worker_presence Object to be assigned
247
+ def worker_presence=(worker_presence)
248
+ validator = EnumAttributeValidator.new('String', ["online", "offline"])
249
+ unless validator.valid?(worker_presence)
250
+ fail ArgumentError, "invalid value for \"worker_presence\", must be one of #{validator.allowable_values}."
251
+ end
252
+ @worker_presence = worker_presence
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] created_at Value to be assigned
257
+ def created_at=(created_at)
258
+ if created_at.nil?
259
+ fail ArgumentError, 'created_at cannot be nil'
260
+ end
261
+
262
+ @created_at = created_at
263
+ end
264
+
265
+ # Custom attribute writer method with validation
266
+ # @param [Object] updated_at Value to be assigned
267
+ def updated_at=(updated_at)
268
+ if updated_at.nil?
269
+ fail ArgumentError, 'updated_at cannot be nil'
270
+ end
271
+
272
+ @updated_at = updated_at
273
+ end
274
+
275
+ # Checks equality by comparing each attribute.
276
+ # @param [Object] Object to be compared
277
+ def ==(o)
278
+ return true if self.equal?(o)
279
+ self.class == o.class &&
280
+ agent_id == o.agent_id &&
281
+ deployment == o.deployment &&
282
+ spec == o.spec &&
283
+ phone_numbers == o.phone_numbers &&
284
+ worker_presence == o.worker_presence &&
285
+ created_at == o.created_at &&
286
+ updated_at == o.updated_at
287
+ end
288
+
289
+ # @see the `==` method
290
+ # @param [Object] Object to be compared
291
+ def eql?(o)
292
+ self == o
293
+ end
294
+
295
+ # Calculates hash code according to all attributes.
296
+ # @return [Integer] Hash code
297
+ def hash
298
+ [agent_id, deployment, spec, phone_numbers, worker_presence, created_at, updated_at].hash
299
+ end
300
+
301
+ # Builds the object from hash
302
+ # @param [Hash] attributes Model attributes in the form of hash
303
+ # @return [Object] Returns the model itself
304
+ def self.build_from_hash(attributes)
305
+ return nil unless attributes.is_a?(Hash)
306
+ attributes = attributes.transform_keys(&:to_sym)
307
+ transformed_hash = {}
308
+ openapi_types.each_pair do |key, type|
309
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
310
+ transformed_hash["#{key}"] = nil
311
+ elsif type =~ /\AArray<(.*)>/i
312
+ # check to ensure the input is an array given that the attribute
313
+ # is documented as an array but the input is not
314
+ if attributes[attribute_map[key]].is_a?(Array)
315
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
316
+ end
317
+ elsif !attributes[attribute_map[key]].nil?
318
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
319
+ end
320
+ end
321
+ new(transformed_hash)
322
+ end
323
+
324
+ # Returns the object in the form of hash
325
+ # @return [Hash] Returns the object in the form of hash
326
+ def to_hash
327
+ hash = {}
328
+ self.class.attribute_map.each_pair do |attr, param|
329
+ value = self.send(attr)
330
+ if value.nil?
331
+ is_nullable = self.class.openapi_nullable.include?(attr)
332
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
333
+ end
334
+
335
+ hash[param] = _to_hash(value)
336
+ end
337
+ hash
338
+ end
339
+
340
+ end
341
+
342
+ end
@@ -0,0 +1,376 @@
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 BindNumberResponseAgentSpec < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :instructions
21
+
22
+ attr_accessor :inbound
23
+
24
+ attr_accessor :outbound
25
+
26
+ attr_accessor :model
27
+
28
+ attr_accessor :tools
29
+
30
+ attr_accessor :variables
31
+
32
+ attr_accessor :conversation
33
+
34
+ attr_accessor :compliance
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'name' => :'name',
40
+ :'instructions' => :'instructions',
41
+ :'inbound' => :'inbound',
42
+ :'outbound' => :'outbound',
43
+ :'model' => :'model',
44
+ :'tools' => :'tools',
45
+ :'variables' => :'variables',
46
+ :'conversation' => :'conversation',
47
+ :'compliance' => :'compliance'
48
+ }
49
+ end
50
+
51
+ # Returns attribute mapping this model knows about
52
+ def self.acceptable_attribute_map
53
+ attribute_map
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ acceptable_attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'name' => :'String',
65
+ :'instructions' => :'String',
66
+ :'inbound' => :'BindNumberResponseAgentSpecInbound',
67
+ :'outbound' => :'BindNumberResponseAgentSpecOutbound',
68
+ :'model' => :'BindNumberResponseAgentSpecModel',
69
+ :'tools' => :'Array<BindNumberResponseAgentSpecToolsInner>',
70
+ :'variables' => :'Array<BindNumberResponseAgentSpecVariablesInner>',
71
+ :'conversation' => :'BindNumberResponseAgentSpecConversation',
72
+ :'compliance' => :'BindNumberResponseAgentSpecCompliance'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::BindNumberResponseAgentSpec` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!acceptable_attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::BindNumberResponseAgentSpec`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'name')
99
+ self.name = attributes[:'name']
100
+ else
101
+ self.name = nil
102
+ end
103
+
104
+ if attributes.key?(:'instructions')
105
+ self.instructions = attributes[:'instructions']
106
+ else
107
+ self.instructions = nil
108
+ end
109
+
110
+ if attributes.key?(:'inbound')
111
+ self.inbound = attributes[:'inbound']
112
+ else
113
+ self.inbound = nil
114
+ end
115
+
116
+ if attributes.key?(:'outbound')
117
+ self.outbound = attributes[:'outbound']
118
+ else
119
+ self.outbound = nil
120
+ end
121
+
122
+ if attributes.key?(:'model')
123
+ self.model = attributes[:'model']
124
+ else
125
+ self.model = nil
126
+ end
127
+
128
+ if attributes.key?(:'tools')
129
+ if (value = attributes[:'tools']).is_a?(Array)
130
+ self.tools = value
131
+ end
132
+ else
133
+ self.tools = nil
134
+ end
135
+
136
+ if attributes.key?(:'variables')
137
+ if (value = attributes[:'variables']).is_a?(Array)
138
+ self.variables = value
139
+ end
140
+ else
141
+ self.variables = nil
142
+ end
143
+
144
+ if attributes.key?(:'conversation')
145
+ self.conversation = attributes[:'conversation']
146
+ else
147
+ self.conversation = nil
148
+ end
149
+
150
+ if attributes.key?(:'compliance')
151
+ self.compliance = attributes[:'compliance']
152
+ else
153
+ self.compliance = nil
154
+ end
155
+ end
156
+
157
+ # Show invalid properties with the reasons. Usually used together with valid?
158
+ # @return Array for valid properties with the reasons
159
+ def list_invalid_properties
160
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
161
+ invalid_properties = Array.new
162
+ if @name.nil?
163
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
164
+ end
165
+
166
+ if @instructions.nil?
167
+ invalid_properties.push('invalid value for "instructions", instructions cannot be nil.')
168
+ end
169
+
170
+ if @inbound.nil?
171
+ invalid_properties.push('invalid value for "inbound", inbound cannot be nil.')
172
+ end
173
+
174
+ if @outbound.nil?
175
+ invalid_properties.push('invalid value for "outbound", outbound cannot be nil.')
176
+ end
177
+
178
+ if @model.nil?
179
+ invalid_properties.push('invalid value for "model", model cannot be nil.')
180
+ end
181
+
182
+ if @tools.nil?
183
+ invalid_properties.push('invalid value for "tools", tools cannot be nil.')
184
+ end
185
+
186
+ if @variables.nil?
187
+ invalid_properties.push('invalid value for "variables", variables cannot be nil.')
188
+ end
189
+
190
+ if @conversation.nil?
191
+ invalid_properties.push('invalid value for "conversation", conversation cannot be nil.')
192
+ end
193
+
194
+ if @compliance.nil?
195
+ invalid_properties.push('invalid value for "compliance", compliance cannot be nil.')
196
+ end
197
+
198
+ invalid_properties
199
+ end
200
+
201
+ # Check to see if the all the properties in the model are valid
202
+ # @return true if the model is valid
203
+ def valid?
204
+ warn '[DEPRECATED] the `valid?` method is obsolete'
205
+ return false if @name.nil?
206
+ return false if @instructions.nil?
207
+ return false if @inbound.nil?
208
+ return false if @outbound.nil?
209
+ return false if @model.nil?
210
+ return false if @tools.nil?
211
+ return false if @variables.nil?
212
+ return false if @conversation.nil?
213
+ return false if @compliance.nil?
214
+ true
215
+ end
216
+
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] name Value to be assigned
219
+ def name=(name)
220
+ if name.nil?
221
+ fail ArgumentError, 'name cannot be nil'
222
+ end
223
+
224
+ @name = name
225
+ end
226
+
227
+ # Custom attribute writer method with validation
228
+ # @param [Object] instructions Value to be assigned
229
+ def instructions=(instructions)
230
+ if instructions.nil?
231
+ fail ArgumentError, 'instructions cannot be nil'
232
+ end
233
+
234
+ @instructions = instructions
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] inbound Value to be assigned
239
+ def inbound=(inbound)
240
+ if inbound.nil?
241
+ fail ArgumentError, 'inbound cannot be nil'
242
+ end
243
+
244
+ @inbound = inbound
245
+ end
246
+
247
+ # Custom attribute writer method with validation
248
+ # @param [Object] outbound Value to be assigned
249
+ def outbound=(outbound)
250
+ if outbound.nil?
251
+ fail ArgumentError, 'outbound cannot be nil'
252
+ end
253
+
254
+ @outbound = outbound
255
+ end
256
+
257
+ # Custom attribute writer method with validation
258
+ # @param [Object] model Value to be assigned
259
+ def model=(model)
260
+ if model.nil?
261
+ fail ArgumentError, 'model cannot be nil'
262
+ end
263
+
264
+ @model = model
265
+ end
266
+
267
+ # Custom attribute writer method with validation
268
+ # @param [Object] tools Value to be assigned
269
+ def tools=(tools)
270
+ if tools.nil?
271
+ fail ArgumentError, 'tools cannot be nil'
272
+ end
273
+
274
+ @tools = tools
275
+ end
276
+
277
+ # Custom attribute writer method with validation
278
+ # @param [Object] variables Value to be assigned
279
+ def variables=(variables)
280
+ if variables.nil?
281
+ fail ArgumentError, 'variables cannot be nil'
282
+ end
283
+
284
+ @variables = variables
285
+ end
286
+
287
+ # Custom attribute writer method with validation
288
+ # @param [Object] conversation Value to be assigned
289
+ def conversation=(conversation)
290
+ if conversation.nil?
291
+ fail ArgumentError, 'conversation cannot be nil'
292
+ end
293
+
294
+ @conversation = conversation
295
+ end
296
+
297
+ # Custom attribute writer method with validation
298
+ # @param [Object] compliance Value to be assigned
299
+ def compliance=(compliance)
300
+ if compliance.nil?
301
+ fail ArgumentError, 'compliance cannot be nil'
302
+ end
303
+
304
+ @compliance = compliance
305
+ end
306
+
307
+ # Checks equality by comparing each attribute.
308
+ # @param [Object] Object to be compared
309
+ def ==(o)
310
+ return true if self.equal?(o)
311
+ self.class == o.class &&
312
+ name == o.name &&
313
+ instructions == o.instructions &&
314
+ inbound == o.inbound &&
315
+ outbound == o.outbound &&
316
+ model == o.model &&
317
+ tools == o.tools &&
318
+ variables == o.variables &&
319
+ conversation == o.conversation &&
320
+ compliance == o.compliance
321
+ end
322
+
323
+ # @see the `==` method
324
+ # @param [Object] Object to be compared
325
+ def eql?(o)
326
+ self == o
327
+ end
328
+
329
+ # Calculates hash code according to all attributes.
330
+ # @return [Integer] Hash code
331
+ def hash
332
+ [name, instructions, inbound, outbound, model, tools, variables, conversation, compliance].hash
333
+ end
334
+
335
+ # Builds the object from hash
336
+ # @param [Hash] attributes Model attributes in the form of hash
337
+ # @return [Object] Returns the model itself
338
+ def self.build_from_hash(attributes)
339
+ return nil unless attributes.is_a?(Hash)
340
+ attributes = attributes.transform_keys(&:to_sym)
341
+ transformed_hash = {}
342
+ openapi_types.each_pair do |key, type|
343
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
344
+ transformed_hash["#{key}"] = nil
345
+ elsif type =~ /\AArray<(.*)>/i
346
+ # check to ensure the input is an array given that the attribute
347
+ # is documented as an array but the input is not
348
+ if attributes[attribute_map[key]].is_a?(Array)
349
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
350
+ end
351
+ elsif !attributes[attribute_map[key]].nil?
352
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
353
+ end
354
+ end
355
+ new(transformed_hash)
356
+ end
357
+
358
+ # Returns the object in the form of hash
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_hash
361
+ hash = {}
362
+ self.class.attribute_map.each_pair do |attr, param|
363
+ value = self.send(attr)
364
+ if value.nil?
365
+ is_nullable = self.class.openapi_nullable.include?(attr)
366
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
367
+ end
368
+
369
+ hash[param] = _to_hash(value)
370
+ end
371
+ hash
372
+ end
373
+
374
+ end
375
+
376
+ end