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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/pingram/api/addresses_api.rb +67 -6
- data/lib/pingram/api/default_api.rb +2 -2
- data/lib/pingram/api/domains_api.rb +69 -8
- data/lib/pingram/api/email_api.rb +2 -2
- data/lib/pingram/api/logs_api.rb +10 -10
- data/lib/pingram/api/numbers_api.rb +6 -6
- data/lib/pingram/api/organization_api.rb +15 -4
- data/lib/pingram/api/profile_api.rb +314 -0
- data/lib/pingram/api/sms_api.rb +2 -2
- data/lib/pingram/api/voice_api.rb +733 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +10 -0
- data/lib/pingram/models/api_error_body.rb +4 -24
- data/lib/pingram/models/billing_post_request_body.rb +2 -12
- data/lib/pingram/models/billing_post_response_body.rb +92 -200
- data/lib/pingram/models/bind_number_request.rb +164 -0
- data/lib/pingram/models/bind_number_response.rb +164 -0
- data/lib/pingram/models/bind_number_response_agent.rb +342 -0
- data/lib/pingram/models/bind_number_response_agent_spec.rb +376 -0
- data/lib/pingram/models/bind_number_response_agent_spec_compliance.rb +164 -0
- data/lib/pingram/models/bind_number_response_agent_spec_conversation.rb +328 -0
- data/lib/pingram/models/bind_number_response_agent_spec_inbound.rb +214 -0
- data/lib/pingram/models/bind_number_response_agent_spec_model.rb +105 -0
- data/lib/pingram/models/bind_number_response_agent_spec_outbound.rb +251 -0
- data/lib/pingram/models/bind_number_response_agent_spec_tools_inner.rb +107 -0
- data/lib/pingram/models/bind_number_response_agent_spec_variables_inner.rb +182 -0
- data/lib/pingram/models/chained.rb +401 -0
- data/lib/pingram/models/channels_enum.rb +2 -1
- data/lib/pingram/models/create_organization_request.rb +150 -0
- data/lib/pingram/models/create_voice_agent_request.rb +164 -0
- data/lib/pingram/models/create_voice_agent_response.rb +164 -0
- data/lib/pingram/models/custom.rb +278 -0
- data/lib/pingram/models/delete_account_request.rb +147 -0
- data/lib/pingram/models/delete_voice_agent_response.rb +164 -0
- data/lib/pingram/models/domain_dns_check.rb +244 -0
- data/lib/pingram/models/domain_dns_check_records_inner.rb +357 -0
- data/lib/pingram/models/dtmf.rb +188 -0
- data/lib/pingram/models/get_members_response_inner.rb +37 -4
- data/lib/pingram/models/get_notifications_response_inner_options.rb +10 -1
- data/lib/pingram/models/get_senders_response_inner.rb +13 -4
- data/lib/pingram/models/get_senders_response_inner_verification_records.rb +184 -0
- data/lib/pingram/models/get_senders_response_inner_verification_records_dkim.rb +287 -0
- data/lib/pingram/models/get_voice_agent_response.rb +164 -0
- data/lib/pingram/models/get_voice_call_response.rb +164 -0
- data/lib/pingram/models/get_voice_call_response_call.rb +521 -0
- data/lib/pingram/models/get_voice_call_response_call_cost.rb +193 -0
- data/lib/pingram/models/get_voice_call_response_call_cost_lines_inner.rb +245 -0
- data/lib/pingram/models/get_voice_call_response_call_timeline_inner.rb +247 -0
- data/lib/pingram/models/get_voice_call_response_call_timeline_inner_latency.rb +191 -0
- data/lib/pingram/models/inbound_response_body_results_inner.rb +4 -4
- data/lib/pingram/models/knowledge.rb +216 -0
- data/lib/pingram/models/knowledge_documents_inner.rb +217 -0
- data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +14 -4
- data/lib/pingram/models/list_voice_agents_response.rb +166 -0
- data/lib/pingram/models/list_voice_calls_response.rb +176 -0
- data/lib/pingram/models/list_voice_calls_response_calls_inner.rb +463 -0
- data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
- data/lib/pingram/models/mcp.rb +223 -0
- data/lib/pingram/models/mfa_setup_request.rb +189 -0
- data/lib/pingram/models/mfa_setup_response.rb +216 -0
- data/lib/pingram/models/mfa_status_response.rb +235 -0
- data/lib/pingram/models/mfa_verify_request.rb +241 -0
- data/lib/pingram/models/organization.rb +22 -1
- data/lib/pingram/models/organization_usage.rb +13 -159
- data/lib/pingram/models/organization_usage_costs.rb +148 -0
- data/lib/pingram/models/organization_usage_counts.rb +347 -0
- data/lib/pingram/models/organization_usage_history_items_inner.rb +16 -154
- data/lib/pingram/models/organization_usage_history_items_inner_counts.rb +346 -0
- data/lib/pingram/models/phone_verify_confirm_request.rb +16 -4
- data/lib/pingram/models/s2s.rb +295 -0
- data/lib/pingram/models/send_email_api_response_any_of1_error.rb +4 -24
- data/lib/pingram/models/send_email_request.rb +1 -1
- data/lib/pingram/models/send_sms_response_any_of1_error.rb +4 -24
- data/lib/pingram/models/sender_post_body_options_email.rb +1 -1
- data/lib/pingram/models/{a2p_registration_create_request.rb → ten_dlc_brand_create_request.rb} +38 -28
- data/lib/pingram/models/{a2p_registration.rb → ten_dlc_brand_registration.rb} +54 -22
- data/lib/pingram/models/{a2p_registration_update_request.rb → ten_dlc_brand_update_request.rb} +38 -11
- data/lib/pingram/models/transfer.rb +251 -0
- data/lib/pingram/models/unbind_number_response.rb +164 -0
- data/lib/pingram/models/update_voice_agent_request.rb +164 -0
- data/lib/pingram/models/update_voice_agent_response.rb +164 -0
- data/lib/pingram/models/voice_browser_call_request.rb +186 -0
- data/lib/pingram/models/voice_browser_call_response.rb +216 -0
- data/lib/pingram/models/voice_call_request.rb +212 -0
- data/lib/pingram/models/voice_call_response.rb +217 -0
- data/lib/pingram/models/webhook_event.rb +2 -2
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +56 -3
- data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.12.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/version.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/specifications/{parser-3.3.11.1.gemspec → parser-3.3.12.0.gemspec} +4 -4
- metadata +140 -87
- data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.11.1.gem +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/LICENSE.txt +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-parse +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-rewrite +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/gauntlet_parser.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/all.rb +0 -0
- /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
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/base.rb +0 -0
- /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
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/color.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/context.rb +0 -0
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/deprecation.rb +0 -0
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic.rb +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/macruby.rb +0 -0
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/messages.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/meta.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rewriter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby18.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby19.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby20.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby21.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby22.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby23.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby24.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby25.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby26.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby27.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby30.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby31.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby32.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby33.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby34.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rubymotion.rb +0 -0
- /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
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner.rb +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser.rb +0 -0
- /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,164 @@
|
|
|
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 GetVoiceCallResponse < ApiModelBase
|
|
18
|
+
attr_accessor :call
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'call' => :'call'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'call' => :'GetVoiceCallResponseCall'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetVoiceCallResponse` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetVoiceCallResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'call')
|
|
67
|
+
self.call = attributes[:'call']
|
|
68
|
+
else
|
|
69
|
+
self.call = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @call.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "call", call cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @call.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] call Value to be assigned
|
|
95
|
+
def call=(call)
|
|
96
|
+
if call.nil?
|
|
97
|
+
fail ArgumentError, 'call cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@call = call
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
call == o.call
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[call].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
@@ -0,0 +1,521 @@
|
|
|
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 GetVoiceCallResponseCall < ApiModelBase
|
|
18
|
+
attr_accessor :tracking_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :status
|
|
21
|
+
|
|
22
|
+
# Omitted for playground calls made before the agent was saved.
|
|
23
|
+
attr_accessor :agent_id
|
|
24
|
+
|
|
25
|
+
attr_accessor :agent_name
|
|
26
|
+
|
|
27
|
+
attr_accessor :direction
|
|
28
|
+
|
|
29
|
+
attr_accessor :source
|
|
30
|
+
|
|
31
|
+
attr_accessor :from
|
|
32
|
+
|
|
33
|
+
attr_accessor :to
|
|
34
|
+
|
|
35
|
+
attr_accessor :started_at
|
|
36
|
+
|
|
37
|
+
attr_accessor :duration_seconds
|
|
38
|
+
|
|
39
|
+
attr_accessor :outcome
|
|
40
|
+
|
|
41
|
+
# Machine-readable reason the call ended — persisted on every call record.
|
|
42
|
+
attr_accessor :end_reason
|
|
43
|
+
|
|
44
|
+
# Short human-readable detail (e.g. provider error message).
|
|
45
|
+
attr_accessor :end_detail
|
|
46
|
+
|
|
47
|
+
# Full chronological timeline (transcript + ops events).
|
|
48
|
+
attr_accessor :timeline
|
|
49
|
+
|
|
50
|
+
attr_accessor :recording_url
|
|
51
|
+
|
|
52
|
+
attr_accessor :variables
|
|
53
|
+
|
|
54
|
+
attr_accessor :cost
|
|
55
|
+
|
|
56
|
+
class EnumAttributeValidator
|
|
57
|
+
attr_reader :datatype
|
|
58
|
+
attr_reader :allowable_values
|
|
59
|
+
|
|
60
|
+
def initialize(datatype, allowable_values)
|
|
61
|
+
@allowable_values = allowable_values.map do |value|
|
|
62
|
+
case datatype.to_s
|
|
63
|
+
when /Integer/i
|
|
64
|
+
value.to_i
|
|
65
|
+
when /Float/i
|
|
66
|
+
value.to_f
|
|
67
|
+
else
|
|
68
|
+
value
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def valid?(value)
|
|
74
|
+
!value || allowable_values.include?(value)
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
79
|
+
def self.attribute_map
|
|
80
|
+
{
|
|
81
|
+
:'tracking_id' => :'trackingId',
|
|
82
|
+
:'status' => :'status',
|
|
83
|
+
:'agent_id' => :'agentId',
|
|
84
|
+
:'agent_name' => :'agentName',
|
|
85
|
+
:'direction' => :'direction',
|
|
86
|
+
:'source' => :'source',
|
|
87
|
+
:'from' => :'from',
|
|
88
|
+
:'to' => :'to',
|
|
89
|
+
:'started_at' => :'startedAt',
|
|
90
|
+
:'duration_seconds' => :'durationSeconds',
|
|
91
|
+
:'outcome' => :'outcome',
|
|
92
|
+
:'end_reason' => :'endReason',
|
|
93
|
+
:'end_detail' => :'endDetail',
|
|
94
|
+
:'timeline' => :'timeline',
|
|
95
|
+
:'recording_url' => :'recordingUrl',
|
|
96
|
+
:'variables' => :'variables',
|
|
97
|
+
:'cost' => :'cost'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Returns attribute mapping this model knows about
|
|
102
|
+
def self.acceptable_attribute_map
|
|
103
|
+
attribute_map
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Returns all the JSON keys this model knows about
|
|
107
|
+
def self.acceptable_attributes
|
|
108
|
+
acceptable_attribute_map.values
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Attribute type mapping.
|
|
112
|
+
def self.openapi_types
|
|
113
|
+
{
|
|
114
|
+
:'tracking_id' => :'String',
|
|
115
|
+
:'status' => :'String',
|
|
116
|
+
:'agent_id' => :'String',
|
|
117
|
+
:'agent_name' => :'String',
|
|
118
|
+
:'direction' => :'String',
|
|
119
|
+
:'source' => :'String',
|
|
120
|
+
:'from' => :'String',
|
|
121
|
+
:'to' => :'String',
|
|
122
|
+
:'started_at' => :'String',
|
|
123
|
+
:'duration_seconds' => :'Float',
|
|
124
|
+
:'outcome' => :'String',
|
|
125
|
+
:'end_reason' => :'String',
|
|
126
|
+
:'end_detail' => :'String',
|
|
127
|
+
:'timeline' => :'Array<GetVoiceCallResponseCallTimelineInner>',
|
|
128
|
+
:'recording_url' => :'String',
|
|
129
|
+
:'variables' => :'Hash<String, String>',
|
|
130
|
+
:'cost' => :'GetVoiceCallResponseCallCost'
|
|
131
|
+
}
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# List of attributes with nullable: true
|
|
135
|
+
def self.openapi_nullable
|
|
136
|
+
Set.new([
|
|
137
|
+
])
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Initializes the object
|
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
142
|
+
def initialize(attributes = {})
|
|
143
|
+
if (!attributes.is_a?(Hash))
|
|
144
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetVoiceCallResponseCall` initialize method"
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
148
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
149
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
150
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
151
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetVoiceCallResponseCall`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
152
|
+
end
|
|
153
|
+
h[k.to_sym] = v
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'tracking_id')
|
|
157
|
+
self.tracking_id = attributes[:'tracking_id']
|
|
158
|
+
else
|
|
159
|
+
self.tracking_id = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'status')
|
|
163
|
+
self.status = attributes[:'status']
|
|
164
|
+
else
|
|
165
|
+
self.status = nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'agent_id')
|
|
169
|
+
self.agent_id = attributes[:'agent_id']
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'agent_name')
|
|
173
|
+
self.agent_name = attributes[:'agent_name']
|
|
174
|
+
else
|
|
175
|
+
self.agent_name = nil
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'direction')
|
|
179
|
+
self.direction = attributes[:'direction']
|
|
180
|
+
else
|
|
181
|
+
self.direction = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'source')
|
|
185
|
+
self.source = attributes[:'source']
|
|
186
|
+
else
|
|
187
|
+
self.source = nil
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'from')
|
|
191
|
+
self.from = attributes[:'from']
|
|
192
|
+
else
|
|
193
|
+
self.from = nil
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'to')
|
|
197
|
+
self.to = attributes[:'to']
|
|
198
|
+
else
|
|
199
|
+
self.to = nil
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'started_at')
|
|
203
|
+
self.started_at = attributes[:'started_at']
|
|
204
|
+
else
|
|
205
|
+
self.started_at = nil
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'duration_seconds')
|
|
209
|
+
self.duration_seconds = attributes[:'duration_seconds']
|
|
210
|
+
else
|
|
211
|
+
self.duration_seconds = nil
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'outcome')
|
|
215
|
+
self.outcome = attributes[:'outcome']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'end_reason')
|
|
219
|
+
self.end_reason = attributes[:'end_reason']
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if attributes.key?(:'end_detail')
|
|
223
|
+
self.end_detail = attributes[:'end_detail']
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'timeline')
|
|
227
|
+
if (value = attributes[:'timeline']).is_a?(Array)
|
|
228
|
+
self.timeline = value
|
|
229
|
+
end
|
|
230
|
+
else
|
|
231
|
+
self.timeline = nil
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'recording_url')
|
|
235
|
+
self.recording_url = attributes[:'recording_url']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'variables')
|
|
239
|
+
if (value = attributes[:'variables']).is_a?(Hash)
|
|
240
|
+
self.variables = value
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if attributes.key?(:'cost')
|
|
245
|
+
self.cost = attributes[:'cost']
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
250
|
+
# @return Array for valid properties with the reasons
|
|
251
|
+
def list_invalid_properties
|
|
252
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
253
|
+
invalid_properties = Array.new
|
|
254
|
+
if @tracking_id.nil?
|
|
255
|
+
invalid_properties.push('invalid value for "tracking_id", tracking_id cannot be nil.')
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if @status.nil?
|
|
259
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if @agent_name.nil?
|
|
263
|
+
invalid_properties.push('invalid value for "agent_name", agent_name cannot be nil.')
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if @direction.nil?
|
|
267
|
+
invalid_properties.push('invalid value for "direction", direction cannot be nil.')
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if @source.nil?
|
|
271
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if @from.nil?
|
|
275
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if @to.nil?
|
|
279
|
+
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if @started_at.nil?
|
|
283
|
+
invalid_properties.push('invalid value for "started_at", started_at cannot be nil.')
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if @duration_seconds.nil?
|
|
287
|
+
invalid_properties.push('invalid value for "duration_seconds", duration_seconds cannot be nil.')
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if @timeline.nil?
|
|
291
|
+
invalid_properties.push('invalid value for "timeline", timeline cannot be nil.')
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
invalid_properties
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Check to see if the all the properties in the model are valid
|
|
298
|
+
# @return true if the model is valid
|
|
299
|
+
def valid?
|
|
300
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
301
|
+
return false if @tracking_id.nil?
|
|
302
|
+
return false if @status.nil?
|
|
303
|
+
status_validator = EnumAttributeValidator.new('String', ["active", "ended", "failed"])
|
|
304
|
+
return false unless status_validator.valid?(@status)
|
|
305
|
+
return false if @agent_name.nil?
|
|
306
|
+
return false if @direction.nil?
|
|
307
|
+
direction_validator = EnumAttributeValidator.new('String', ["inbound", "outbound"])
|
|
308
|
+
return false unless direction_validator.valid?(@direction)
|
|
309
|
+
return false if @source.nil?
|
|
310
|
+
source_validator = EnumAttributeValidator.new('String', ["pstn", "web"])
|
|
311
|
+
return false unless source_validator.valid?(@source)
|
|
312
|
+
return false if @from.nil?
|
|
313
|
+
return false if @to.nil?
|
|
314
|
+
return false if @started_at.nil?
|
|
315
|
+
return false if @duration_seconds.nil?
|
|
316
|
+
outcome_validator = EnumAttributeValidator.new('String', ["completed", "transferred", "voicemail", "no_answer", "failed"])
|
|
317
|
+
return false unless outcome_validator.valid?(@outcome)
|
|
318
|
+
end_reason_validator = EnumAttributeValidator.new('String', ["user_hangup", "agent_end_call", "silence_timeout", "max_duration", "free_tier_limit", "transferred", "voicemail", "provider_error", "connection_lost", "no_answer", "session_expired", "server_shutdown"])
|
|
319
|
+
return false unless end_reason_validator.valid?(@end_reason)
|
|
320
|
+
return false if @timeline.nil?
|
|
321
|
+
true
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Custom attribute writer method with validation
|
|
325
|
+
# @param [Object] tracking_id Value to be assigned
|
|
326
|
+
def tracking_id=(tracking_id)
|
|
327
|
+
if tracking_id.nil?
|
|
328
|
+
fail ArgumentError, 'tracking_id cannot be nil'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
@tracking_id = tracking_id
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
335
|
+
# @param [Object] status Object to be assigned
|
|
336
|
+
def status=(status)
|
|
337
|
+
validator = EnumAttributeValidator.new('String', ["active", "ended", "failed"])
|
|
338
|
+
unless validator.valid?(status)
|
|
339
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
340
|
+
end
|
|
341
|
+
@status = status
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Custom attribute writer method with validation
|
|
345
|
+
# @param [Object] agent_name Value to be assigned
|
|
346
|
+
def agent_name=(agent_name)
|
|
347
|
+
if agent_name.nil?
|
|
348
|
+
fail ArgumentError, 'agent_name cannot be nil'
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
@agent_name = agent_name
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
355
|
+
# @param [Object] direction Object to be assigned
|
|
356
|
+
def direction=(direction)
|
|
357
|
+
validator = EnumAttributeValidator.new('String', ["inbound", "outbound"])
|
|
358
|
+
unless validator.valid?(direction)
|
|
359
|
+
fail ArgumentError, "invalid value for \"direction\", must be one of #{validator.allowable_values}."
|
|
360
|
+
end
|
|
361
|
+
@direction = direction
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
365
|
+
# @param [Object] source Object to be assigned
|
|
366
|
+
def source=(source)
|
|
367
|
+
validator = EnumAttributeValidator.new('String', ["pstn", "web"])
|
|
368
|
+
unless validator.valid?(source)
|
|
369
|
+
fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
|
|
370
|
+
end
|
|
371
|
+
@source = source
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Custom attribute writer method with validation
|
|
375
|
+
# @param [Object] from Value to be assigned
|
|
376
|
+
def from=(from)
|
|
377
|
+
if from.nil?
|
|
378
|
+
fail ArgumentError, 'from cannot be nil'
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
@from = from
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Custom attribute writer method with validation
|
|
385
|
+
# @param [Object] to Value to be assigned
|
|
386
|
+
def to=(to)
|
|
387
|
+
if to.nil?
|
|
388
|
+
fail ArgumentError, 'to cannot be nil'
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
@to = to
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# Custom attribute writer method with validation
|
|
395
|
+
# @param [Object] started_at Value to be assigned
|
|
396
|
+
def started_at=(started_at)
|
|
397
|
+
if started_at.nil?
|
|
398
|
+
fail ArgumentError, 'started_at cannot be nil'
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
@started_at = started_at
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Custom attribute writer method with validation
|
|
405
|
+
# @param [Object] duration_seconds Value to be assigned
|
|
406
|
+
def duration_seconds=(duration_seconds)
|
|
407
|
+
if duration_seconds.nil?
|
|
408
|
+
fail ArgumentError, 'duration_seconds cannot be nil'
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
@duration_seconds = duration_seconds
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
415
|
+
# @param [Object] outcome Object to be assigned
|
|
416
|
+
def outcome=(outcome)
|
|
417
|
+
validator = EnumAttributeValidator.new('String', ["completed", "transferred", "voicemail", "no_answer", "failed"])
|
|
418
|
+
unless validator.valid?(outcome)
|
|
419
|
+
fail ArgumentError, "invalid value for \"outcome\", must be one of #{validator.allowable_values}."
|
|
420
|
+
end
|
|
421
|
+
@outcome = outcome
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
425
|
+
# @param [Object] end_reason Object to be assigned
|
|
426
|
+
def end_reason=(end_reason)
|
|
427
|
+
validator = EnumAttributeValidator.new('String', ["user_hangup", "agent_end_call", "silence_timeout", "max_duration", "free_tier_limit", "transferred", "voicemail", "provider_error", "connection_lost", "no_answer", "session_expired", "server_shutdown"])
|
|
428
|
+
unless validator.valid?(end_reason)
|
|
429
|
+
fail ArgumentError, "invalid value for \"end_reason\", must be one of #{validator.allowable_values}."
|
|
430
|
+
end
|
|
431
|
+
@end_reason = end_reason
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Custom attribute writer method with validation
|
|
435
|
+
# @param [Object] timeline Value to be assigned
|
|
436
|
+
def timeline=(timeline)
|
|
437
|
+
if timeline.nil?
|
|
438
|
+
fail ArgumentError, 'timeline cannot be nil'
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
@timeline = timeline
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Checks equality by comparing each attribute.
|
|
445
|
+
# @param [Object] Object to be compared
|
|
446
|
+
def ==(o)
|
|
447
|
+
return true if self.equal?(o)
|
|
448
|
+
self.class == o.class &&
|
|
449
|
+
tracking_id == o.tracking_id &&
|
|
450
|
+
status == o.status &&
|
|
451
|
+
agent_id == o.agent_id &&
|
|
452
|
+
agent_name == o.agent_name &&
|
|
453
|
+
direction == o.direction &&
|
|
454
|
+
source == o.source &&
|
|
455
|
+
from == o.from &&
|
|
456
|
+
to == o.to &&
|
|
457
|
+
started_at == o.started_at &&
|
|
458
|
+
duration_seconds == o.duration_seconds &&
|
|
459
|
+
outcome == o.outcome &&
|
|
460
|
+
end_reason == o.end_reason &&
|
|
461
|
+
end_detail == o.end_detail &&
|
|
462
|
+
timeline == o.timeline &&
|
|
463
|
+
recording_url == o.recording_url &&
|
|
464
|
+
variables == o.variables &&
|
|
465
|
+
cost == o.cost
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# @see the `==` method
|
|
469
|
+
# @param [Object] Object to be compared
|
|
470
|
+
def eql?(o)
|
|
471
|
+
self == o
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
# Calculates hash code according to all attributes.
|
|
475
|
+
# @return [Integer] Hash code
|
|
476
|
+
def hash
|
|
477
|
+
[tracking_id, status, agent_id, agent_name, direction, source, from, to, started_at, duration_seconds, outcome, end_reason, end_detail, timeline, recording_url, variables, cost].hash
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Builds the object from hash
|
|
481
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
482
|
+
# @return [Object] Returns the model itself
|
|
483
|
+
def self.build_from_hash(attributes)
|
|
484
|
+
return nil unless attributes.is_a?(Hash)
|
|
485
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
486
|
+
transformed_hash = {}
|
|
487
|
+
openapi_types.each_pair do |key, type|
|
|
488
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
489
|
+
transformed_hash["#{key}"] = nil
|
|
490
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
491
|
+
# check to ensure the input is an array given that the attribute
|
|
492
|
+
# is documented as an array but the input is not
|
|
493
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
494
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
495
|
+
end
|
|
496
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
497
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
498
|
+
end
|
|
499
|
+
end
|
|
500
|
+
new(transformed_hash)
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# Returns the object in the form of hash
|
|
504
|
+
# @return [Hash] Returns the object in the form of hash
|
|
505
|
+
def to_hash
|
|
506
|
+
hash = {}
|
|
507
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
508
|
+
value = self.send(attr)
|
|
509
|
+
if value.nil?
|
|
510
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
511
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
hash[param] = _to_hash(value)
|
|
515
|
+
end
|
|
516
|
+
hash
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
end
|