pingram 1.0.42 → 1.0.43

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 (163) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/account_api.rb +26 -0
  4. data/lib/pingram/api/accounts_api.rb +76 -0
  5. data/lib/pingram/api/broadcasts_api.rb +28 -0
  6. data/lib/pingram/api/default_api.rb +2 -0
  7. data/lib/pingram/api/domains_api.rb +12 -4
  8. data/lib/pingram/api/editor_api.rb +2 -0
  9. data/lib/pingram/api/email_api.rb +4 -0
  10. data/lib/pingram/api/environments_api.rb +2 -0
  11. data/lib/pingram/api/health_api.rb +2 -0
  12. data/lib/pingram/api/library_api.rb +4 -0
  13. data/lib/pingram/api/logs_api.rb +12 -0
  14. data/lib/pingram/api/members_api.rb +2 -0
  15. data/lib/pingram/api/numbers_api.rb +10 -0
  16. data/lib/pingram/api/registrations_api.rb +10 -0
  17. data/lib/pingram/api/sender_api.rb +2 -0
  18. data/lib/pingram/api/sms_api.rb +2 -0
  19. data/lib/pingram/api/sub_notifications_api.rb +4 -0
  20. data/lib/pingram/api/user_api.rb +6 -0
  21. data/lib/pingram/api/users_api.rb +2 -0
  22. data/lib/pingram/api/voice_api.rb +80 -0
  23. data/lib/pingram/api/webhooks_api.rb +8 -0
  24. data/lib/pingram/api_client.rb +1 -1
  25. data/lib/pingram/models/account_summary.rb +304 -0
  26. data/lib/pingram/models/agent.rb +10 -1
  27. data/lib/pingram/models/agent1.rb +10 -1
  28. data/lib/pingram/models/agent_agent_model.rb +2 -0
  29. data/lib/pingram/models/arm_voice_inbound_claim_request_inbound.rb +2 -0
  30. data/lib/pingram/models/brand_webhook_response.rb +1 -1
  31. data/lib/pingram/models/campaign_webhook_response.rb +1 -1
  32. data/lib/pingram/models/check_domain_dns_request.rb +148 -0
  33. data/lib/pingram/models/domain_dns_check_records_inner.rb +2 -2
  34. data/lib/pingram/models/elevenlabs.rb +207 -0
  35. data/lib/pingram/models/elevenlabs1.rb +207 -0
  36. data/lib/pingram/models/elevenlabs_eleven_realtime_v1_max.rb +251 -0
  37. data/lib/pingram/models/elevenlabs_eleven_realtime_v1_mini.rb +251 -0
  38. data/lib/pingram/models/get_senders_response_inner.rb +68 -4
  39. data/lib/pingram/models/get_senders_response_inner_verification_records.rb +13 -4
  40. data/lib/pingram/models/get_senders_response_inner_verification_records_dkim.rb +2 -2
  41. data/lib/pingram/models/get_voice_call_response_call.rb +30 -1
  42. data/lib/pingram/models/get_voice_call_response_call_setup.rb +272 -0
  43. data/lib/pingram/models/get_voice_call_response_call_setup_stream.rb +190 -0
  44. data/lib/pingram/models/get_voice_call_response_call_setup_transcript.rb +41 -0
  45. data/lib/pingram/models/google_gemini31_flash_live_preview.rb +22 -1
  46. data/lib/pingram/models/inbound_config.rb +2 -0
  47. data/lib/pingram/models/intercom_webhook.rb +1 -1
  48. data/lib/pingram/models/internal_transfer_body.rb +254 -0
  49. data/lib/pingram/models/internal_transfer_body_agent_meters_inner.rb +328 -0
  50. data/lib/pingram/models/list_voice_calls_response_calls_inner.rb +24 -4
  51. data/lib/pingram/models/member_update_request.rb +1 -1
  52. data/lib/pingram/models/openai_gpt_live1.rb +22 -1
  53. data/lib/pingram/models/openai_gpt_realtime21.rb +22 -1
  54. data/lib/pingram/models/openai_gpt_realtime21_mini.rb +22 -1
  55. data/lib/pingram/models/script.rb +10 -1
  56. data/lib/pingram/models/script1.rb +10 -1
  57. data/lib/pingram/models/script_privacy.rb +43 -8
  58. data/lib/pingram/models/script_stream.rb +193 -0
  59. data/lib/pingram/models/sign_in_username_response.rb +1 -1
  60. data/lib/pingram/models/sign_out_request.rb +1 -1
  61. data/lib/pingram/models/sms_compliance_countries_response_countries_inner.rb +1 -1
  62. data/lib/pingram/models/sms_compliance_country.rb +1 -1
  63. data/lib/pingram/models/stream.rb +207 -0
  64. data/lib/pingram/models/ten_dlc_brand_admin_update_request.rb +1 -1
  65. data/lib/pingram/models/transfer1.rb +40 -1
  66. data/lib/pingram/models/transfer_call_request.rb +196 -0
  67. data/lib/pingram/models/transfer_destinations_inner.rb +25 -56
  68. data/lib/pingram/models/update_account_request.rb +184 -0
  69. data/lib/pingram/models/voice_browser_call_request_config_any_of.rb +3 -1
  70. data/lib/pingram/models/voice_call_response.rb +32 -5
  71. data/lib/pingram/version.rb +1 -1
  72. data/lib/pingram.rb +15 -0
  73. data/vendor/bundle/ruby/3.2.0/cache/ethon-0.19.2.gem +0 -0
  74. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/CHANGELOG.md +45 -1
  75. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/README.md +55 -8
  76. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curl.rb +44 -0
  77. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.2/lib/ethon/easy/form.rb +261 -0
  78. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/informations.rb +30 -0
  79. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/mirror.rb +7 -1
  80. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/options.rb +11 -7
  81. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/queryable.rb +5 -0
  82. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.2/lib/ethon/errors/fork_safety.rb +10 -0
  83. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/libc.rb +5 -0
  84. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.2/lib/ethon/multipart.rb +115 -0
  85. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/version.rb +1 -1
  86. data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon.rb +1 -0
  87. data/vendor/bundle/ruby/3.2.0/specifications/{ethon-0.19.1.gemspec → ethon-0.19.2.gemspec} +4 -4
  88. metadata +104 -88
  89. data/vendor/bundle/ruby/3.2.0/cache/ethon-0.19.1.gem +0 -0
  90. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/easy/form.rb +0 -166
  91. data/vendor/bundle/ruby/3.2.0/gems/ethon-0.19.1/lib/ethon/errors/fork_safety.rb +0 -10
  92. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/LICENSE +0 -0
  93. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/ethon.gemspec +0 -0
  94. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/classes.rb +0 -0
  95. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/codes.rb +0 -0
  96. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/constants.rb +0 -0
  97. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/form_options.rb +0 -0
  98. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/functions.rb +0 -0
  99. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/infos.rb +0 -0
  100. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/introspection.rb +0 -0
  101. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/introspection_constants.rb +0 -0
  102. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/messages.rb +0 -0
  103. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/mime.rb +0 -0
  104. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/optional.rb +0 -0
  105. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/options.rb +0 -0
  106. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/settings.rb +0 -0
  107. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/share.rb +0 -0
  108. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/share_constants.rb +0 -0
  109. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/url.rb +0 -0
  110. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/curls/url_constants.rb +0 -0
  111. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/callbacks.rb +0 -0
  112. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/debug_info.rb +0 -0
  113. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/features.rb +0 -0
  114. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/files.rb +0 -0
  115. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/header.rb +0 -0
  116. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/headers_api.rb +0 -0
  117. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/actionable.rb +0 -0
  118. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/custom.rb +0 -0
  119. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/delete.rb +0 -0
  120. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/get.rb +0 -0
  121. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/head.rb +0 -0
  122. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/options.rb +0 -0
  123. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/patch.rb +0 -0
  124. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/post.rb +0 -0
  125. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/postable.rb +0 -0
  126. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/put.rb +0 -0
  127. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http/putable.rb +0 -0
  128. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/http.rb +0 -0
  129. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/mime.rb +0 -0
  130. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/operations.rb +0 -0
  131. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/params.rb +0 -0
  132. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/response_callbacks.rb +0 -0
  133. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/share.rb +0 -0
  134. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/url.rb +0 -0
  135. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy/util.rb +0 -0
  136. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/easy.rb +0 -0
  137. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/ethon_error.rb +0 -0
  138. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/form_add.rb +0 -0
  139. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/global_init.rb +0 -0
  140. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/header.rb +0 -0
  141. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/invalid_option.rb +0 -0
  142. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/invalid_value.rb +0 -0
  143. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/mime.rb +0 -0
  144. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_add.rb +0 -0
  145. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_assign.rb +0 -0
  146. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_fdset.rb +0 -0
  147. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_perform.rb +0 -0
  148. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_poll.rb +0 -0
  149. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_remove.rb +0 -0
  150. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_timeout.rb +0 -0
  151. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_wait.rb +0 -0
  152. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/multi_wakeup.rb +0 -0
  153. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/select.rb +0 -0
  154. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/set_option.rb +0 -0
  155. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/share.rb +0 -0
  156. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/unsupported_option.rb +0 -0
  157. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors/url.rb +0 -0
  158. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/errors.rb +0 -0
  159. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/loggable.rb +0 -0
  160. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/multi/operations.rb +0 -0
  161. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/multi/options.rb +0 -0
  162. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/multi/stack.rb +0 -0
  163. /data/vendor/bundle/ruby/3.2.0/gems/{ethon-0.19.1 → ethon-0.19.2}/lib/ethon/multi.rb +0 -0
@@ -0,0 +1,207 @@
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
+ # Answer and SIP-transfer the caller to ElevenLabs. The destination is the called number.
18
+ class Elevenlabs < ApiModelBase
19
+ attr_accessor :type
20
+
21
+ attr_accessor :stream
22
+
23
+ attr_accessor :privacy
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'type' => :'type',
51
+ :'stream' => :'stream',
52
+ :'privacy' => :'privacy'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'type' => :'String',
70
+ :'stream' => :'ScriptStream',
71
+ :'privacy' => :'ScriptPrivacy'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::Elevenlabs` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::Elevenlabs`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ else
100
+ self.type = nil
101
+ end
102
+
103
+ if attributes.key?(:'stream')
104
+ self.stream = attributes[:'stream']
105
+ end
106
+
107
+ if attributes.key?(:'privacy')
108
+ self.privacy = attributes[:'privacy']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ if @type.nil?
118
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
119
+ end
120
+
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ warn '[DEPRECATED] the `valid?` method is obsolete'
128
+ return false if @type.nil?
129
+ type_validator = EnumAttributeValidator.new('String', ["elevenlabs"])
130
+ return false unless type_validator.valid?(@type)
131
+ true
132
+ end
133
+
134
+ # Custom attribute writer method checking allowed values (enum).
135
+ # @param [Object] type Object to be assigned
136
+ def type=(type)
137
+ validator = EnumAttributeValidator.new('String', ["elevenlabs"])
138
+ unless validator.valid?(type)
139
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
140
+ end
141
+ @type = type
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ type == o.type &&
150
+ stream == o.stream &&
151
+ privacy == o.privacy
152
+ end
153
+
154
+ # @see the `==` method
155
+ # @param [Object] Object to be compared
156
+ def eql?(o)
157
+ self == o
158
+ end
159
+
160
+ # Calculates hash code according to all attributes.
161
+ # @return [Integer] Hash code
162
+ def hash
163
+ [type, stream, privacy].hash
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def self.build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ attributes = attributes.transform_keys(&:to_sym)
172
+ transformed_hash = {}
173
+ openapi_types.each_pair do |key, type|
174
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = nil
176
+ elsif type =~ /\AArray<(.*)>/i
177
+ # check to ensure the input is an array given that the attribute
178
+ # is documented as an array but the input is not
179
+ if attributes[attribute_map[key]].is_a?(Array)
180
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
181
+ end
182
+ elsif !attributes[attribute_map[key]].nil?
183
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
184
+ end
185
+ end
186
+ new(transformed_hash)
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ end
206
+
207
+ end
@@ -0,0 +1,207 @@
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
+ # Dial the destination, then SIP-transfer the answered call to ElevenLabs at the from number.
18
+ class Elevenlabs1 < ApiModelBase
19
+ attr_accessor :type
20
+
21
+ attr_accessor :stream
22
+
23
+ attr_accessor :privacy
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'type' => :'type',
51
+ :'stream' => :'stream',
52
+ :'privacy' => :'privacy'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'type' => :'String',
70
+ :'stream' => :'ScriptStream',
71
+ :'privacy' => :'ScriptPrivacy'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::Elevenlabs1` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::Elevenlabs1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ else
100
+ self.type = nil
101
+ end
102
+
103
+ if attributes.key?(:'stream')
104
+ self.stream = attributes[:'stream']
105
+ end
106
+
107
+ if attributes.key?(:'privacy')
108
+ self.privacy = attributes[:'privacy']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ if @type.nil?
118
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
119
+ end
120
+
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ warn '[DEPRECATED] the `valid?` method is obsolete'
128
+ return false if @type.nil?
129
+ type_validator = EnumAttributeValidator.new('String', ["elevenlabs"])
130
+ return false unless type_validator.valid?(@type)
131
+ true
132
+ end
133
+
134
+ # Custom attribute writer method checking allowed values (enum).
135
+ # @param [Object] type Object to be assigned
136
+ def type=(type)
137
+ validator = EnumAttributeValidator.new('String', ["elevenlabs"])
138
+ unless validator.valid?(type)
139
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
140
+ end
141
+ @type = type
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ type == o.type &&
150
+ stream == o.stream &&
151
+ privacy == o.privacy
152
+ end
153
+
154
+ # @see the `==` method
155
+ # @param [Object] Object to be compared
156
+ def eql?(o)
157
+ self == o
158
+ end
159
+
160
+ # Calculates hash code according to all attributes.
161
+ # @return [Integer] Hash code
162
+ def hash
163
+ [type, stream, privacy].hash
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def self.build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ attributes = attributes.transform_keys(&:to_sym)
172
+ transformed_hash = {}
173
+ openapi_types.each_pair do |key, type|
174
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = nil
176
+ elsif type =~ /\AArray<(.*)>/i
177
+ # check to ensure the input is an array given that the attribute
178
+ # is documented as an array but the input is not
179
+ if attributes[attribute_map[key]].is_a?(Array)
180
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
181
+ end
182
+ elsif !attributes[attribute_map[key]].nil?
183
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
184
+ end
185
+ end
186
+ new(transformed_hash)
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ end
206
+
207
+ 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 ElevenlabsElevenRealtimeV1Max < ApiModelBase
18
+ attr_accessor :language
19
+
20
+ # Which realtime model processes the call.
21
+ attr_accessor :model
22
+
23
+ attr_accessor :voice_id
24
+
25
+ # How varied replies are. 0 is focused, 1 is more creative. Default: 0.8.
26
+ attr_accessor :temperature
27
+
28
+ # Maximum length of one reply, in tokens. Default: 4096.
29
+ attr_accessor :max_tokens
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.include?(value)
50
+ end
51
+ end
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'language' => :'language',
57
+ :'model' => :'model',
58
+ :'voice_id' => :'voiceId',
59
+ :'temperature' => :'temperature',
60
+ :'max_tokens' => :'maxTokens'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'language' => :'String',
78
+ :'model' => :'String',
79
+ :'voice_id' => :'String',
80
+ :'temperature' => :'Float',
81
+ :'max_tokens' => :'Float'
82
+ }
83
+ end
84
+
85
+ # List of attributes with nullable: true
86
+ def self.openapi_nullable
87
+ Set.new([
88
+ ])
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ if (!attributes.is_a?(Hash))
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ElevenlabsElevenRealtimeV1Max` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ acceptable_attribute_map = self.class.acceptable_attribute_map
100
+ attributes = attributes.each_with_object({}) { |(k, v), h|
101
+ if (!acceptable_attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ElevenlabsElevenRealtimeV1Max`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
103
+ end
104
+ h[k.to_sym] = v
105
+ }
106
+
107
+ if attributes.key?(:'language')
108
+ self.language = attributes[:'language']
109
+ end
110
+
111
+ if attributes.key?(:'model')
112
+ self.model = attributes[:'model']
113
+ else
114
+ self.model = nil
115
+ end
116
+
117
+ if attributes.key?(:'voice_id')
118
+ self.voice_id = attributes[:'voice_id']
119
+ end
120
+
121
+ if attributes.key?(:'temperature')
122
+ self.temperature = attributes[:'temperature']
123
+ end
124
+
125
+ if attributes.key?(:'max_tokens')
126
+ self.max_tokens = attributes[:'max_tokens']
127
+ end
128
+ end
129
+
130
+ # Show invalid properties with the reasons. Usually used together with valid?
131
+ # @return Array for valid properties with the reasons
132
+ def list_invalid_properties
133
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
134
+ invalid_properties = Array.new
135
+ if @model.nil?
136
+ invalid_properties.push('invalid value for "model", model cannot be nil.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ warn '[DEPRECATED] the `valid?` method is obsolete'
146
+ language_validator = EnumAttributeValidator.new('String', ["en", "ar", "bg", "zh", "hr", "cs", "da", "nl", "fil", "fi", "fr", "de", "el", "he", "hi", "hu", "id", "it", "ja", "ko", "ms", "no", "pl", "pt", "ro", "ru", "sk", "es", "sv", "ta", "tr", "uk", "vi"])
147
+ return false unless language_validator.valid?(@language)
148
+ return false if @model.nil?
149
+ model_validator = EnumAttributeValidator.new('String', ["elevenlabs:eleven_realtime_v1_max"])
150
+ return false unless model_validator.valid?(@model)
151
+ voice_id_validator = EnumAttributeValidator.new('String', ["brian", "rachel", "adam", "antoni", "elli", "josh", "bella", "charlotte", "dTmTLshIypwp08eftJH6", "M8xXPW1xIZVqZLxYby5T", "KbgdAMqTSb5aaLUaXEm2"])
152
+ return false unless voice_id_validator.valid?(@voice_id)
153
+ true
154
+ end
155
+
156
+ # Custom attribute writer method checking allowed values (enum).
157
+ # @param [Object] language Object to be assigned
158
+ def language=(language)
159
+ validator = EnumAttributeValidator.new('String', ["en", "ar", "bg", "zh", "hr", "cs", "da", "nl", "fil", "fi", "fr", "de", "el", "he", "hi", "hu", "id", "it", "ja", "ko", "ms", "no", "pl", "pt", "ro", "ru", "sk", "es", "sv", "ta", "tr", "uk", "vi"])
160
+ unless validator.valid?(language)
161
+ fail ArgumentError, "invalid value for \"language\", must be one of #{validator.allowable_values}."
162
+ end
163
+ @language = language
164
+ end
165
+
166
+ # Custom attribute writer method checking allowed values (enum).
167
+ # @param [Object] model Object to be assigned
168
+ def model=(model)
169
+ validator = EnumAttributeValidator.new('String', ["elevenlabs:eleven_realtime_v1_max"])
170
+ unless validator.valid?(model)
171
+ fail ArgumentError, "invalid value for \"model\", must be one of #{validator.allowable_values}."
172
+ end
173
+ @model = model
174
+ end
175
+
176
+ # Custom attribute writer method checking allowed values (enum).
177
+ # @param [Object] voice_id Object to be assigned
178
+ def voice_id=(voice_id)
179
+ validator = EnumAttributeValidator.new('String', ["brian", "rachel", "adam", "antoni", "elli", "josh", "bella", "charlotte", "dTmTLshIypwp08eftJH6", "M8xXPW1xIZVqZLxYby5T", "KbgdAMqTSb5aaLUaXEm2"])
180
+ unless validator.valid?(voice_id)
181
+ fail ArgumentError, "invalid value for \"voice_id\", must be one of #{validator.allowable_values}."
182
+ end
183
+ @voice_id = voice_id
184
+ end
185
+
186
+ # Checks equality by comparing each attribute.
187
+ # @param [Object] Object to be compared
188
+ def ==(o)
189
+ return true if self.equal?(o)
190
+ self.class == o.class &&
191
+ language == o.language &&
192
+ model == o.model &&
193
+ voice_id == o.voice_id &&
194
+ temperature == o.temperature &&
195
+ max_tokens == o.max_tokens
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
+ [language, model, voice_id, temperature, max_tokens].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