Class: GongAPI::NewCallAddingRequest
- Inherits:
-
Object
- Object
- GongAPI::NewCallAddingRequest
- Defined in:
- lib/gong_api/models/new_call_adding_request.rb
Overview
New call metadata
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#actual_start ⇒ Object
The actual date and time when the call started 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);.
-
#call_provider_code ⇒ Object
The code identifies the provider conferencing or telephony system.
-
#client_unique_id ⇒ Object
A call’s unique identifier in the PBX or the recording system.
-
#context ⇒ Object
A list of references to external systems such as CRM, Telephony System, Case Management, etc.
-
#custom_data ⇒ Object
Optional metadata associated with the call (represented as text).
-
#direction ⇒ Object
Whether the call is inbound (someone called the company), outbound (a rep dialed someone outside the company), or a conference call.
-
#disposition ⇒ Object
The disposition of the call.
-
#download_media_url ⇒ Object
The URL from which Gong can download the media file.
-
#duration ⇒ Object
The actual call duration in seconds.
-
#language_code ⇒ Object
The language code the call should be transcribed to.
-
#meeting_url ⇒ Object
The URL of the conference call by which users join the meeting.
-
#parties ⇒ Object
A list of the call’s participants.
-
#primary_user ⇒ Object
The Gong internal user ID of the team member who hosted the call.
-
#purpose ⇒ Object
The purpose of the call.
-
#scheduled_end ⇒ Object
The date and time the call was scheduled to end 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);.
-
#scheduled_start ⇒ Object
The date and time the call was scheduled to begin 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);.
-
#speakers_timeline ⇒ Object
Returns the value of attribute speakers_timeline.
-
#title ⇒ Object
The title of the call.
-
#workspace_id ⇒ Object
Optional workspace identifier.
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 = {}) ⇒ NewCallAddingRequest
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 = {}) ⇒ NewCallAddingRequest
Initializes the object
153 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 243 244 245 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 153 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `GongAPI::NewCallAddingRequest` 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::NewCallAddingRequest`. 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?(:'actual_start') self.actual_start = attributes[:'actual_start'] end if attributes.key?(:'call_provider_code') self.call_provider_code = attributes[:'call_provider_code'] end if attributes.key?(:'client_unique_id') self.client_unique_id = attributes[:'client_unique_id'] end if attributes.key?(:'context') if (value = attributes[:'context']).is_a?(Array) self.context = value end 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?(:'disposition') self.disposition = attributes[:'disposition'] end if attributes.key?(:'download_media_url') self.download_media_url = attributes[:'download_media_url'] end if attributes.key?(:'duration') self.duration = attributes[:'duration'] end if attributes.key?(:'language_code') self.language_code = attributes[:'language_code'] end if attributes.key?(:'meeting_url') self.meeting_url = attributes[:'meeting_url'] end if attributes.key?(:'parties') if (value = attributes[:'parties']).is_a?(Array) self.parties = value end end if attributes.key?(:'primary_user') self.primary_user = attributes[:'primary_user'] end if attributes.key?(:'purpose') self.purpose = attributes[:'purpose'] end if attributes.key?(:'scheduled_end') self.scheduled_end = attributes[:'scheduled_end'] end if attributes.key?(:'scheduled_start') self.scheduled_start = attributes[:'scheduled_start'] end if attributes.key?(:'speakers_timeline') self.speakers_timeline = attributes[:'speakers_timeline'] end if attributes.key?(:'title') self.title = attributes[:'title'] end if attributes.key?(:'workspace_id') self.workspace_id = attributes[:'workspace_id'] end end |
Instance Attribute Details
#actual_start ⇒ Object
The actual date and time when the call started 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);
18 19 20 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 18 def actual_start @actual_start end |
#call_provider_code ⇒ Object
The code identifies the provider conferencing or telephony system. For example: zoom, clearslide, gotomeeting, ringcentral, outreach, insidesales, etc. These values are predefined by Gong, please contact [email protected] to find the proper value for your system.
21 22 23 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 21 def call_provider_code @call_provider_code end |
#client_unique_id ⇒ Object
A call’s unique identifier in the PBX or the recording system. Gong uses this identifier to prevent repeated attempts to upload the same recording.
24 25 26 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 24 def client_unique_id @client_unique_id end |
#context ⇒ Object
A list of references to external systems such as CRM, Telephony System, Case Management, etc.
27 28 29 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 27 def context @context end |
#custom_data ⇒ Object
Optional metadata associated with the call (represented as text). Gong stores this metadata and it can be used for troubleshooting.
30 31 32 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 30 def custom_data @custom_data end |
#direction ⇒ Object
Whether the call is inbound (someone called the company), outbound (a rep dialed someone outside the company), or a conference call.
33 34 35 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 33 def direction @direction end |
#disposition ⇒ Object
The disposition of the call. The disposition is free text of up to 255 characters.
36 37 38 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 36 def disposition @disposition end |
#download_media_url ⇒ Object
The URL from which Gong can download the media file. The URL must be unique, the audio or video file must be a maximum of 1.5GB. If you provide this URL, you should not perform the ‘Add call media’ step.
39 40 41 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 39 def download_media_url @download_media_url end |
#duration ⇒ Object
The actual call duration in seconds.
42 43 44 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 42 def duration @duration end |
#language_code ⇒ Object
The language code the call should be transcribed to. This field is optional as Gong automatically detects the language spoken in the call and transcribes it accordingly. Set this field only if you are sure of the language the call is in. Valid values are: af-ZA, am-ET, ar-AE, ar-BH, ar-DZ, ar-EG, ar-IL, ar-IQ, ar-JO, ar-KW, ar-LB, ar-MA, ar-MR, ar-OM, ar-PS, ar-QA, ar-SA, ar-TN, ar-YE, az-AZ, bg-BG, bn-BD, bn-IN, bs-BA, ca-ES, cs-CZ, da-DK, de-AT, de-CH, de-DE, el-GR, en-AB, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ, en-PH, en-SG, en-US, en-WL, en-ZA, es-AR, es-BO, es-CL, es-CO, es-CR, es-DO, es-EC, es-ES, es-GT, es-HN, es-MX, es-NI, es-PA, es-PE, es-PR, es-PY, es-SV, es-US, es-UY, et-EE, eu-ES, fa-IR, fi-FI, fil-PH, fr-BE, fr-CA, fr-CH, fr-FR, gl-ES, gu-IN, he-IL, hi-IN, hr-HR, hu-HU, hy-AM, id-ID, is-IS, it-CH, it-IT, ja-JP, jv-ID, ka-GE, kk-KZ, km-KH, kn-IN, ko-KR, lo-LA, lt-LT, lv-LV, mk-MK, ml-IN, mn-MN, mr-IN, ms-MY, my-MM, ne-NP, nl-BE, nl-NL, no-NO, pa-Guru-IN, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, si-LK, sk-SK, sl-SI, sq-AL, sr-RS, su-ID, sv-SE, sw-KE, sw-TZ, ta-IN, ta-LK, ta-MY, ta-SG, te-IN, th-TH, tr-TR, uk-UA, ur-IN, ur-PK, uz-UZ, vi-VN, yue-Hant-HK, zh-CN, zh-TW, zu-ZA
45 46 47 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 45 def language_code @language_code end |
#meeting_url ⇒ Object
The URL of the conference call by which users join the meeting
48 49 50 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 48 def meeting_url @meeting_url end |
#parties ⇒ Object
A list of the call’s participants. A party must be provided for the primaryUser.
51 52 53 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 51 def parties @parties end |
#primary_user ⇒ Object
The Gong internal user ID of the team member who hosted the call.
54 55 56 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 54 def primary_user @primary_user end |
#purpose ⇒ Object
The purpose of the call. This optional field is a free text of up to 255 characters.
57 58 59 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 57 def purpose @purpose end |
#scheduled_end ⇒ Object
The date and time the call was scheduled to end 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/new_call_adding_request.rb', line 60 def scheduled_end @scheduled_end end |
#scheduled_start ⇒ Object
The date and time the call was scheduled to begin 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);
63 64 65 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 63 def scheduled_start @scheduled_start end |
#speakers_timeline ⇒ Object
Returns the value of attribute speakers_timeline.
65 66 67 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 65 def speakers_timeline @speakers_timeline end |
#title ⇒ Object
The title of the call. This title is available in the Gong system for indexing and search.
68 69 70 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 68 def title @title end |
#workspace_id ⇒ Object
Optional workspace identifier. If specified, the call will be placed into this workspace, otherwise, the default algorithm for workspace placement will be applied.
71 72 73 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 71 def workspace_id @workspace_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 96 def self.attribute_map { :'actual_start' => :'actualStart', :'call_provider_code' => :'callProviderCode', :'client_unique_id' => :'clientUniqueId', :'context' => :'context', :'custom_data' => :'customData', :'direction' => :'direction', :'disposition' => :'disposition', :'download_media_url' => :'downloadMediaUrl', :'duration' => :'duration', :'language_code' => :'languageCode', :'meeting_url' => :'meetingUrl', :'parties' => :'parties', :'primary_user' => :'primaryUser', :'purpose' => :'purpose', :'scheduled_end' => :'scheduledEnd', :'scheduled_start' => :'scheduledStart', :'speakers_timeline' => :'speakersTimeline', :'title' => :'title', :'workspace_id' => :'workspaceId' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
338 339 340 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 338 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
146 147 148 149 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 146 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 121 def self.openapi_types { :'actual_start' => :'Object', :'call_provider_code' => :'Object', :'client_unique_id' => :'Object', :'context' => :'Object', :'custom_data' => :'Object', :'direction' => :'Object', :'disposition' => :'Object', :'download_media_url' => :'Object', :'duration' => :'Object', :'language_code' => :'Object', :'meeting_url' => :'Object', :'parties' => :'Object', :'primary_user' => :'Object', :'purpose' => :'Object', :'scheduled_end' => :'Object', :'scheduled_start' => :'Object', :'speakers_timeline' => :'Object', :'title' => :'Object', :'workspace_id' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 299 def ==(o) return true if self.equal?(o) self.class == o.class && actual_start == o.actual_start && call_provider_code == o.call_provider_code && client_unique_id == o.client_unique_id && context == o.context && custom_data == o.custom_data && direction == o.direction && disposition == o.disposition && download_media_url == o.download_media_url && duration == o.duration && language_code == o.language_code && meeting_url == o.meeting_url && parties == o.parties && primary_user == o.primary_user && purpose == o.purpose && scheduled_end == o.scheduled_end && scheduled_start == o.scheduled_start && speakers_timeline == o.speakers_timeline && title == o.title && workspace_id == o.workspace_id end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 400 401 402 403 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 368 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
437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 437 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
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 345 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
325 326 327 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 325 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
331 332 333 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 331 def hash [actual_start, call_provider_code, client_unique_id, context, custom_data, direction, disposition, download_media_url, duration, language_code, meeting_url, parties, primary_user, purpose, scheduled_end, scheduled_start, speakers_timeline, title, workspace_id].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 249 def list_invalid_properties invalid_properties = Array.new if @actual_start.nil? invalid_properties.push('invalid value for "actual_start", actual_start cannot be nil.') end if @client_unique_id.nil? invalid_properties.push('invalid value for "client_unique_id", client_unique_id cannot be nil.') end if @direction.nil? invalid_properties.push('invalid value for "direction", direction cannot be nil.') end if @parties.nil? invalid_properties.push('invalid value for "parties", parties cannot be nil.') end if @primary_user.nil? invalid_properties.push('invalid value for "primary_user", primary_user cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
413 414 415 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 413 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 419 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
407 408 409 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 407 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
276 277 278 279 280 281 282 283 284 285 |
# File 'lib/gong_api/models/new_call_adding_request.rb', line 276 def valid? return false if @actual_start.nil? return false if @client_unique_id.nil? return false if @direction.nil? direction_validator = EnumAttributeValidator.new('Object', ['Conference', 'Inbound', 'Outbound', 'Unknown']) return false unless direction_validator.valid?(@direction) return false if @parties.nil? return false if @primary_user.nil? true end |