Class: GongAPI::CallBasicData
- Inherits:
-
Object
- Object
- GongAPI::CallBasicData
- Defined in:
- lib/gong_api/models/call_basic_data.rb
Overview
Basic details such as call date, title, call URL, etc.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#client_unique_id ⇒ Object
The call’s unique identifier in the origin recording system (typically a telephony recording system).
-
#custom_data ⇒ Object
Metadata as was provided to Gong during the call creation via the Public API.
-
#direction ⇒ Object
Call direction.
-
#duration ⇒ Object
The duration of the call, in seconds.
-
#id ⇒ Object
Gong’s unique numeric identifier for the call (up to 20 digits).
-
#is_private ⇒ Object
If the call is private.
-
#language ⇒ Object
The language codes (as defined by ISO-639-2B).
-
#media ⇒ Object
Media type.
-
#meeting_url ⇒ Object
The meeting provider URL on which the web conference was recorded.
-
#primary_user_id ⇒ Object
The primary user ID of the team member who hosted the call.
-
#purpose ⇒ Object
The purpose of the call.
-
#scheduled ⇒ Object
Scheduled date and time of the call in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
-
#scope ⇒ Object
The scope of the call: ‘internal’ if all the participants are from the company, ‘external’ if some participants are not from the company, or ‘unknown’ if the scope is unknown.
-
#sdr_disposition ⇒ Object
The SDR disposition of the call.
-
#started ⇒ Object
The date and time when the call was recorded in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
-
#system ⇒ Object
The system with which the call was carried out (e.g., WebEx, ShoreTel, etc.).
-
#title ⇒ Object
The title of the call.
-
#url ⇒ Object
The URL to the page in the Gong web application where the call is available.
-
#workspace_id ⇒ Object
Gong’s unique numeric identifier for the call’s workspace (up to 20 digits).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CallBasicData
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CallBasicData
Initializes the object
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/gong_api/models/call_basic_data.rb', line 154 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `GongAPI::CallBasicData` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `GongAPI::CallBasicData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'client_unique_id') self.client_unique_id = attributes[:'client_unique_id'] end if attributes.key?(:'custom_data') self.custom_data = attributes[:'custom_data'] end if attributes.key?(:'direction') self.direction = attributes[:'direction'] end if attributes.key?(:'duration') self.duration = attributes[:'duration'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'is_private') self.is_private = attributes[:'is_private'] end if attributes.key?(:'language') self.language = attributes[:'language'] end if attributes.key?(:'media') self.media = attributes[:'media'] end if attributes.key?(:'meeting_url') self.meeting_url = attributes[:'meeting_url'] end if attributes.key?(:'primary_user_id') self.primary_user_id = attributes[:'primary_user_id'] end if attributes.key?(:'purpose') self.purpose = attributes[:'purpose'] end if attributes.key?(:'scheduled') self.scheduled = attributes[:'scheduled'] end if attributes.key?(:'scope') self.scope = attributes[:'scope'] end if attributes.key?(:'sdr_disposition') self.sdr_disposition = attributes[:'sdr_disposition'] end if attributes.key?(:'started') self.started = attributes[:'started'] end if attributes.key?(:'system') self.system = attributes[:'system'] end if attributes.key?(:'title') self.title = attributes[:'title'] end if attributes.key?(:'url') self.url = attributes[:'url'] end if attributes.key?(:'workspace_id') self.workspace_id = attributes[:'workspace_id'] end end |
Instance Attribute Details
#client_unique_id ⇒ Object
The call’s unique identifier in the origin recording system (typically a telephony recording system). The identifier is provided to Gong during the call creation via the Public API or through telephony systems integrations.
18 19 20 |
# File 'lib/gong_api/models/call_basic_data.rb', line 18 def client_unique_id @client_unique_id end |
#custom_data ⇒ Object
Metadata as was provided to Gong during the call creation via the Public API.
21 22 23 |
# File 'lib/gong_api/models/call_basic_data.rb', line 21 def custom_data @custom_data end |
#direction ⇒ Object
Call direction.
24 25 26 |
# File 'lib/gong_api/models/call_basic_data.rb', line 24 def direction @direction end |
#duration ⇒ Object
The duration of the call, in seconds.
27 28 29 |
# File 'lib/gong_api/models/call_basic_data.rb', line 27 def duration @duration end |
#id ⇒ Object
Gong’s unique numeric identifier for the call (up to 20 digits).
30 31 32 |
# File 'lib/gong_api/models/call_basic_data.rb', line 30 def id @id end |
#is_private ⇒ Object
If the call is private.
33 34 35 |
# File 'lib/gong_api/models/call_basic_data.rb', line 33 def is_private @is_private end |
#language ⇒ Object
The language codes (as defined by ISO-639-2B). E.g., eng, fre, spa, ger, and ita. Also used are und (unsupported language), and zxx (not enough speech content for identification).
36 37 38 |
# File 'lib/gong_api/models/call_basic_data.rb', line 36 def language @language end |
#media ⇒ Object
Media type
39 40 41 |
# File 'lib/gong_api/models/call_basic_data.rb', line 39 def media @media end |
#meeting_url ⇒ Object
The meeting provider URL on which the web conference was recorded.
42 43 44 |
# File 'lib/gong_api/models/call_basic_data.rb', line 42 def meeting_url @meeting_url end |
#primary_user_id ⇒ Object
The primary user ID of the team member who hosted the call.
45 46 47 |
# File 'lib/gong_api/models/call_basic_data.rb', line 45 def primary_user_id @primary_user_id end |
#purpose ⇒ Object
The purpose of the call.
48 49 50 |
# File 'lib/gong_api/models/call_basic_data.rb', line 48 def purpose @purpose end |
#scheduled ⇒ Object
Scheduled date and time of the call in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
51 52 53 |
# File 'lib/gong_api/models/call_basic_data.rb', line 51 def scheduled @scheduled end |
#scope ⇒ Object
The scope of the call: ‘internal’ if all the participants are from the company, ‘external’ if some participants are not from the company, or ‘unknown’ if the scope is unknown.
54 55 56 |
# File 'lib/gong_api/models/call_basic_data.rb', line 54 def scope @scope end |
#sdr_disposition ⇒ Object
The SDR disposition of the call
57 58 59 |
# File 'lib/gong_api/models/call_basic_data.rb', line 57 def sdr_disposition @sdr_disposition end |
#started ⇒ Object
The date and time when the call was recorded in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
60 61 62 |
# File 'lib/gong_api/models/call_basic_data.rb', line 60 def started @started end |
#system ⇒ Object
The system with which the call was carried out (e.g., WebEx, ShoreTel, etc.).
63 64 65 |
# File 'lib/gong_api/models/call_basic_data.rb', line 63 def system @system end |
#title ⇒ Object
The title of the call.
66 67 68 |
# File 'lib/gong_api/models/call_basic_data.rb', line 66 def title @title end |
#url ⇒ Object
The URL to the page in the Gong web application where the call is available.
69 70 71 |
# File 'lib/gong_api/models/call_basic_data.rb', line 69 def url @url end |
#workspace_id ⇒ Object
Gong’s unique numeric identifier for the call’s workspace (up to 20 digits).
72 73 74 |
# File 'lib/gong_api/models/call_basic_data.rb', line 72 def workspace_id @workspace_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/gong_api/models/call_basic_data.rb', line 97 def self.attribute_map { :'client_unique_id' => :'clientUniqueId', :'custom_data' => :'customData', :'direction' => :'direction', :'duration' => :'duration', :'id' => :'id', :'is_private' => :'isPrivate', :'language' => :'language', :'media' => :'media', :'meeting_url' => :'meetingUrl', :'primary_user_id' => :'primaryUserId', :'purpose' => :'purpose', :'scheduled' => :'scheduled', :'scope' => :'scope', :'sdr_disposition' => :'sdrDisposition', :'started' => :'started', :'system' => :'system', :'title' => :'title', :'url' => :'url', :'workspace_id' => :'workspaceId' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
334 335 336 |
# File 'lib/gong_api/models/call_basic_data.rb', line 334 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
147 148 149 150 |
# File 'lib/gong_api/models/call_basic_data.rb', line 147 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/gong_api/models/call_basic_data.rb', line 122 def self.openapi_types { :'client_unique_id' => :'Object', :'custom_data' => :'Object', :'direction' => :'Object', :'duration' => :'Object', :'id' => :'Object', :'is_private' => :'Object', :'language' => :'Object', :'media' => :'Object', :'meeting_url' => :'Object', :'primary_user_id' => :'Object', :'purpose' => :'Object', :'scheduled' => :'Object', :'scope' => :'Object', :'sdr_disposition' => :'Object', :'started' => :'Object', :'system' => :'Object', :'title' => :'Object', :'url' => :'Object', :'workspace_id' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/gong_api/models/call_basic_data.rb', line 295 def ==(o) return true if self.equal?(o) self.class == o.class && client_unique_id == o.client_unique_id && custom_data == o.custom_data && direction == o.direction && duration == o.duration && id == o.id && is_private == o.is_private && language == o.language && media == o.media && meeting_url == o.meeting_url && primary_user_id == o.primary_user_id && purpose == o.purpose && scheduled == o.scheduled && scope == o.scope && sdr_disposition == o.sdr_disposition && started == o.started && system == o.system && title == o.title && url == o.url && workspace_id == o.workspace_id end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/gong_api/models/call_basic_data.rb', line 364 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model GongAPI.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/gong_api/models/call_basic_data.rb', line 433 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/gong_api/models/call_basic_data.rb', line 341 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
321 322 323 |
# File 'lib/gong_api/models/call_basic_data.rb', line 321 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
327 328 329 |
# File 'lib/gong_api/models/call_basic_data.rb', line 327 def hash [client_unique_id, custom_data, direction, duration, id, is_private, language, media, meeting_url, primary_user_id, purpose, scheduled, scope, sdr_disposition, started, system, title, url, workspace_id].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
246 247 248 249 |
# File 'lib/gong_api/models/call_basic_data.rb', line 246 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
409 410 411 |
# File 'lib/gong_api/models/call_basic_data.rb', line 409 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/gong_api/models/call_basic_data.rb', line 415 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
403 404 405 |
# File 'lib/gong_api/models/call_basic_data.rb', line 403 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
253 254 255 256 257 258 259 260 261 |
# File 'lib/gong_api/models/call_basic_data.rb', line 253 def valid? direction_validator = EnumAttributeValidator.new('Object', ['Conference', 'Inbound', 'Outbound', 'Unknown']) return false unless direction_validator.valid?(@direction) media_validator = EnumAttributeValidator.new('Object', ['Audio', 'Video']) return false unless media_validator.valid?(@media) scope_validator = EnumAttributeValidator.new('Object', ['External', 'Internal', 'Unknown']) return false unless scope_validator.valid?(@scope) true end |