pingram 1.0.14 → 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 (182) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/addresses_api.rb +67 -6
  4. data/lib/pingram/api/default_api.rb +2 -2
  5. data/lib/pingram/api/domains_api.rb +69 -8
  6. data/lib/pingram/api/email_api.rb +2 -2
  7. data/lib/pingram/api/logs_api.rb +10 -10
  8. data/lib/pingram/api/numbers_api.rb +6 -6
  9. data/lib/pingram/api/organization_api.rb +15 -4
  10. data/lib/pingram/api/profile_api.rb +314 -0
  11. data/lib/pingram/api/sms_api.rb +2 -2
  12. data/lib/pingram/api/voice_api.rb +733 -0
  13. data/lib/pingram/api_client.rb +1 -1
  14. data/lib/pingram/client_wrapper.rb +10 -0
  15. data/lib/pingram/models/api_error_body.rb +4 -24
  16. data/lib/pingram/models/billing_post_request_body.rb +2 -12
  17. data/lib/pingram/models/billing_post_response_body.rb +92 -200
  18. data/lib/pingram/models/bind_number_request.rb +164 -0
  19. data/lib/pingram/models/bind_number_response.rb +164 -0
  20. data/lib/pingram/models/bind_number_response_agent.rb +342 -0
  21. data/lib/pingram/models/bind_number_response_agent_spec.rb +376 -0
  22. data/lib/pingram/models/bind_number_response_agent_spec_compliance.rb +164 -0
  23. data/lib/pingram/models/bind_number_response_agent_spec_conversation.rb +328 -0
  24. data/lib/pingram/models/bind_number_response_agent_spec_inbound.rb +214 -0
  25. data/lib/pingram/models/bind_number_response_agent_spec_model.rb +105 -0
  26. data/lib/pingram/models/bind_number_response_agent_spec_outbound.rb +251 -0
  27. data/lib/pingram/models/bind_number_response_agent_spec_tools_inner.rb +107 -0
  28. data/lib/pingram/models/bind_number_response_agent_spec_variables_inner.rb +182 -0
  29. data/lib/pingram/models/chained.rb +401 -0
  30. data/lib/pingram/models/channels_enum.rb +2 -1
  31. data/lib/pingram/models/create_organization_request.rb +150 -0
  32. data/lib/pingram/models/create_voice_agent_request.rb +164 -0
  33. data/lib/pingram/models/create_voice_agent_response.rb +164 -0
  34. data/lib/pingram/models/custom.rb +278 -0
  35. data/lib/pingram/models/delete_account_request.rb +147 -0
  36. data/lib/pingram/models/delete_voice_agent_response.rb +164 -0
  37. data/lib/pingram/models/domain_dns_check.rb +244 -0
  38. data/lib/pingram/models/domain_dns_check_records_inner.rb +357 -0
  39. data/lib/pingram/models/dtmf.rb +188 -0
  40. data/lib/pingram/models/get_members_response_inner.rb +37 -4
  41. data/lib/pingram/models/get_notifications_response_inner_options.rb +10 -1
  42. data/lib/pingram/models/get_senders_response_inner.rb +13 -4
  43. data/lib/pingram/models/get_senders_response_inner_verification_records.rb +184 -0
  44. data/lib/pingram/models/get_senders_response_inner_verification_records_dkim.rb +287 -0
  45. data/lib/pingram/models/get_voice_agent_response.rb +164 -0
  46. data/lib/pingram/models/get_voice_call_response.rb +164 -0
  47. data/lib/pingram/models/get_voice_call_response_call.rb +521 -0
  48. data/lib/pingram/models/get_voice_call_response_call_cost.rb +193 -0
  49. data/lib/pingram/models/get_voice_call_response_call_cost_lines_inner.rb +245 -0
  50. data/lib/pingram/models/get_voice_call_response_call_timeline_inner.rb +247 -0
  51. data/lib/pingram/models/get_voice_call_response_call_timeline_inner_latency.rb +191 -0
  52. data/lib/pingram/models/inbound_response_body_results_inner.rb +4 -4
  53. data/lib/pingram/models/knowledge.rb +216 -0
  54. data/lib/pingram/models/knowledge_documents_inner.rb +217 -0
  55. data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +14 -4
  56. data/lib/pingram/models/list_voice_agents_response.rb +166 -0
  57. data/lib/pingram/models/list_voice_calls_response.rb +176 -0
  58. data/lib/pingram/models/list_voice_calls_response_calls_inner.rb +463 -0
  59. data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
  60. data/lib/pingram/models/mcp.rb +223 -0
  61. data/lib/pingram/models/mfa_setup_request.rb +189 -0
  62. data/lib/pingram/models/mfa_setup_response.rb +216 -0
  63. data/lib/pingram/models/mfa_status_response.rb +235 -0
  64. data/lib/pingram/models/mfa_verify_request.rb +241 -0
  65. data/lib/pingram/models/organization.rb +22 -1
  66. data/lib/pingram/models/organization_usage.rb +13 -159
  67. data/lib/pingram/models/organization_usage_costs.rb +148 -0
  68. data/lib/pingram/models/organization_usage_counts.rb +347 -0
  69. data/lib/pingram/models/organization_usage_history_items_inner.rb +16 -154
  70. data/lib/pingram/models/organization_usage_history_items_inner_counts.rb +346 -0
  71. data/lib/pingram/models/phone_verify_confirm_request.rb +16 -4
  72. data/lib/pingram/models/s2s.rb +295 -0
  73. data/lib/pingram/models/send_email_api_response_any_of1_error.rb +4 -24
  74. data/lib/pingram/models/send_email_request.rb +1 -1
  75. data/lib/pingram/models/send_sms_response_any_of1_error.rb +4 -24
  76. data/lib/pingram/models/sender_post_body_options_email.rb +1 -1
  77. data/lib/pingram/models/{a2p_registration_create_request.rb → ten_dlc_brand_create_request.rb} +38 -28
  78. data/lib/pingram/models/{a2p_registration.rb → ten_dlc_brand_registration.rb} +54 -22
  79. data/lib/pingram/models/{a2p_registration_update_request.rb → ten_dlc_brand_update_request.rb} +38 -11
  80. data/lib/pingram/models/transfer.rb +251 -0
  81. data/lib/pingram/models/unbind_number_response.rb +164 -0
  82. data/lib/pingram/models/update_voice_agent_request.rb +164 -0
  83. data/lib/pingram/models/update_voice_agent_response.rb +164 -0
  84. data/lib/pingram/models/voice_browser_call_request.rb +186 -0
  85. data/lib/pingram/models/voice_browser_call_response.rb +216 -0
  86. data/lib/pingram/models/voice_call_request.rb +212 -0
  87. data/lib/pingram/models/voice_call_response.rb +217 -0
  88. data/lib/pingram/models/webhook_event.rb +2 -2
  89. data/lib/pingram/version.rb +1 -1
  90. data/lib/pingram.rb +56 -3
  91. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.12.0.gem +0 -0
  92. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  93. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  94. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  95. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  96. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  97. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
  98. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  99. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  100. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current.rb +1 -1
  101. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/version.rb +1 -1
  102. data/vendor/bundle/ruby/3.2.0/specifications/{parser-3.3.11.1.gemspec → parser-3.3.12.0.gemspec} +4 -4
  103. metadata +140 -87
  104. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.11.1.gem +0 -0
  105. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/LICENSE.txt +0 -0
  106. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-parse +0 -0
  107. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-rewrite +0 -0
  108. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/gauntlet_parser.rb +0 -0
  109. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/all.rb +0 -0
  110. /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
  111. /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
  112. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/base.rb +0 -0
  113. /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
  114. /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
  115. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/color.rb +0 -0
  116. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/context.rb +0 -0
  117. /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
  118. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/deprecation.rb +0 -0
  119. /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
  120. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic.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/dedenter.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/explanation.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/literal.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/stack_state.rb +0 -0
  125. /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
  126. /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
  127. /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
  128. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/macruby.rb +0 -0
  129. /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
  130. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/messages.rb +0 -0
  131. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/meta.rb +0 -0
  132. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rewriter.rb +0 -0
  133. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby18.rb +0 -0
  134. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby19.rb +0 -0
  135. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby20.rb +0 -0
  136. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby21.rb +0 -0
  137. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby22.rb +0 -0
  138. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby23.rb +0 -0
  139. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby24.rb +0 -0
  140. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby25.rb +0 -0
  141. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby26.rb +0 -0
  142. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby27.rb +0 -0
  143. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby30.rb +0 -0
  144. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby31.rb +0 -0
  145. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby32.rb +0 -0
  146. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby33.rb +0 -0
  147. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby34.rb +0 -0
  148. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rubymotion.rb +0 -0
  149. /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
  150. /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
  151. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner.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/buffer.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/comment/associator.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/comment.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/collection.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/condition.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/constant.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/definition.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/for.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/heredoc.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/index.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/keyword.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/method_definition.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/objc_kwarg.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/operator.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/rescue_body.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/send.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/map/ternary.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/map/variable.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/map.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/range.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/rewriter/action.rb +0 -0
  173. /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
  174. /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
  175. /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
  176. /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
  177. /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
  178. /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
  179. /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
  180. /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
  181. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser.rb +0 -0
  182. /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,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 BindNumberResponseAgentSpecOutbound < ApiModelBase
18
+ attr_accessor :first_action
19
+
20
+ attr_accessor :opener
21
+
22
+ attr_accessor :voicemail_action
23
+
24
+ attr_accessor :voicemail_message
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
+ :'first_action' => :'firstAction',
52
+ :'opener' => :'opener',
53
+ :'voicemail_action' => :'voicemailAction',
54
+ :'voicemail_message' => :'voicemailMessage'
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
+ :'first_action' => :'String',
72
+ :'opener' => :'String',
73
+ :'voicemail_action' => :'String',
74
+ :'voicemail_message' => :'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::BindNumberResponseAgentSpecOutbound` 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::BindNumberResponseAgentSpecOutbound`. 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?(:'first_action')
101
+ self.first_action = attributes[:'first_action']
102
+ else
103
+ self.first_action = nil
104
+ end
105
+
106
+ if attributes.key?(:'opener')
107
+ self.opener = attributes[:'opener']
108
+ else
109
+ self.opener = nil
110
+ end
111
+
112
+ if attributes.key?(:'voicemail_action')
113
+ self.voicemail_action = attributes[:'voicemail_action']
114
+ else
115
+ self.voicemail_action = nil
116
+ end
117
+
118
+ if attributes.key?(:'voicemail_message')
119
+ self.voicemail_message = attributes[:'voicemail_message']
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 @first_action.nil?
129
+ invalid_properties.push('invalid value for "first_action", first_action cannot be nil.')
130
+ end
131
+
132
+ if @opener.nil?
133
+ invalid_properties.push('invalid value for "opener", opener cannot be nil.')
134
+ end
135
+
136
+ if @voicemail_action.nil?
137
+ invalid_properties.push('invalid value for "voicemail_action", voicemail_action 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 @first_action.nil?
148
+ first_action_validator = EnumAttributeValidator.new('String', ["speak", "wait"])
149
+ return false unless first_action_validator.valid?(@first_action)
150
+ return false if @opener.nil?
151
+ return false if @voicemail_action.nil?
152
+ voicemail_action_validator = EnumAttributeValidator.new('String', ["hangup", "message", "continue"])
153
+ return false unless voicemail_action_validator.valid?(@voicemail_action)
154
+ true
155
+ end
156
+
157
+ # Custom attribute writer method checking allowed values (enum).
158
+ # @param [Object] first_action Object to be assigned
159
+ def first_action=(first_action)
160
+ validator = EnumAttributeValidator.new('String', ["speak", "wait"])
161
+ unless validator.valid?(first_action)
162
+ fail ArgumentError, "invalid value for \"first_action\", must be one of #{validator.allowable_values}."
163
+ end
164
+ @first_action = first_action
165
+ end
166
+
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] opener Value to be assigned
169
+ def opener=(opener)
170
+ if opener.nil?
171
+ fail ArgumentError, 'opener cannot be nil'
172
+ end
173
+
174
+ @opener = opener
175
+ end
176
+
177
+ # Custom attribute writer method checking allowed values (enum).
178
+ # @param [Object] voicemail_action Object to be assigned
179
+ def voicemail_action=(voicemail_action)
180
+ validator = EnumAttributeValidator.new('String', ["hangup", "message", "continue"])
181
+ unless validator.valid?(voicemail_action)
182
+ fail ArgumentError, "invalid value for \"voicemail_action\", must be one of #{validator.allowable_values}."
183
+ end
184
+ @voicemail_action = voicemail_action
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
+ first_action == o.first_action &&
193
+ opener == o.opener &&
194
+ voicemail_action == o.voicemail_action &&
195
+ voicemail_message == o.voicemail_message
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
+ [first_action, opener, voicemail_action, voicemail_message].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
@@ -0,0 +1,107 @@
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
+ module BindNumberResponseAgentSpecToolsInner
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'Custom',
23
+ :'Dtmf',
24
+ :'Knowledge',
25
+ :'Mcp',
26
+ :'Transfer'
27
+ ]
28
+ end
29
+
30
+ # Builds the object
31
+ # @param [Mixed] Data to be matched against the list of oneOf items
32
+ # @return [Object] Returns the model or the data itself
33
+ def build(data)
34
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
35
+ # Note:
36
+ # - We do not attempt to check whether exactly one item matches.
37
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
38
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
39
+ # - TODO: scalar values are de facto behaving as if they were nullable.
40
+ # - TODO: logging when debugging is set.
41
+ openapi_one_of.each do |klass|
42
+ begin
43
+ next if klass == :AnyType # "nullable: true"
44
+ return find_and_cast_into_type(klass, data)
45
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
46
+ end
47
+ end
48
+
49
+ openapi_one_of.include?(:AnyType) ? data : nil
50
+ end
51
+
52
+ private
53
+
54
+ SchemaMismatchError = Class.new(StandardError)
55
+
56
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
57
+ def find_and_cast_into_type(klass, data)
58
+ return if data.nil?
59
+
60
+ case klass.to_s
61
+ when 'Boolean'
62
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
63
+ when 'Float'
64
+ return data if data.instance_of?(Float)
65
+ when 'Integer'
66
+ return data if data.instance_of?(Integer)
67
+ when 'Time'
68
+ return Time.parse(data)
69
+ when 'Date'
70
+ return Date.iso8601(data)
71
+ when 'String'
72
+ return data if data.instance_of?(String)
73
+ when 'Object' # "type: object"
74
+ return data if data.instance_of?(Hash)
75
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
76
+ if data.instance_of?(Array)
77
+ sub_type = Regexp.last_match[:sub_type]
78
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
79
+ end
80
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
81
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
82
+ sub_type = Regexp.last_match[:sub_type]
83
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
84
+ end
85
+ else # model
86
+ const = Pingram.const_get(klass)
87
+ if const
88
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
89
+ model = const.build(data)
90
+ return model if model
91
+ else
92
+ # raise if data contains keys that are not known to the model
93
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
94
+ model = const.build_from_hash(data)
95
+ return model if model
96
+ end
97
+ end
98
+ end
99
+
100
+ raise # if no match by now, raise
101
+ rescue
102
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
103
+ end
104
+ end
105
+ end
106
+
107
+ end
@@ -0,0 +1,182 @@
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 BindNumberResponseAgentSpecVariablesInner < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :description
21
+
22
+ attr_accessor :default_value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'description' => :'description',
29
+ :'default_value' => :'defaultValue'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'name' => :'String',
47
+ :'description' => :'String',
48
+ :'default_value' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::BindNumberResponseAgentSpecVariablesInner` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::BindNumberResponseAgentSpecVariablesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'name')
75
+ self.name = attributes[:'name']
76
+ else
77
+ self.name = nil
78
+ end
79
+
80
+ if attributes.key?(:'description')
81
+ self.description = attributes[:'description']
82
+ end
83
+
84
+ if attributes.key?(:'default_value')
85
+ self.default_value = attributes[:'default_value']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ if @name.nil?
95
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @name.nil?
106
+ true
107
+ end
108
+
109
+ # Custom attribute writer method with validation
110
+ # @param [Object] name Value to be assigned
111
+ def name=(name)
112
+ if name.nil?
113
+ fail ArgumentError, 'name cannot be nil'
114
+ end
115
+
116
+ @name = name
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ name == o.name &&
125
+ description == o.description &&
126
+ default_value == o.default_value
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [name, description, default_value].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
+ end
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
160
+ end
161
+ new(transformed_hash)
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ if value.nil?
171
+ is_nullable = self.class.openapi_nullable.include?(attr)
172
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
173
+ end
174
+
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ end
181
+
182
+ end