Class: Zavudev::Models::CallRetrieveResponse::Call

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/call_retrieve_response.rb,
sig/zavudev/models/call_retrieve_response.rbs

Overview

See Also:

  • Zavudev::Models::CallRetrieveResponse#call

Defined Under Namespace

Modules: Direction, Status Classes: Transcript

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, direction:, from:, status:, to:, answered_at: nil, cost: nil, duration_seconds: nil, ended_at: nil, end_reason: nil, metadata: nil, transcript: nil, turn_count: nil, updated_at: nil) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::CallRetrieveResponse::Call for more details.

Parameters:

  • id (String)
  • created_at (Time)
  • direction (Symbol, Zavudev::Models::CallRetrieveResponse::Call::Direction) —

    Whether the call was placed by Zavu (outbound) or received from a caller (inboun

  • from (String) —

    Caller phone number in E.164 format. Your sender's number for outbound calls; th

  • status (Symbol, Zavudev::Models::CallRetrieveResponse::Call::Status) —

    Lifecycle status of a voice call.

  • to (String) —

    Callee phone number in E.164 format.

  • answered_at (Time, nil) (defaults to: nil) —

    When the call was answered.

  • cost (Float, nil) (defaults to: nil) —

    Total cost of the call in USD, combining the managed voice pipeline per-minute c

  • duration_seconds (Integer, nil) (defaults to: nil) —

    Billable talk time in seconds, measured from answer to hangup.

  • ended_at (Time, nil) (defaults to: nil) —

    When the call ended.

  • end_reason (String, nil) (defaults to: nil) —

    Why the call ended (e.g. agent_ended, max_duration, transfer, hangup). P

  • metadata (Hash{Symbol=>String}) (defaults to: nil) —

    Arbitrary metadata you attached when creating the call.

  • transcript (Array<Zavudev::Models::CallRetrieveResponse::Call::Transcript>) (defaults to: nil) —

    Ordered transcript of the call. Included when retrieving a single call; omitted

  • turn_count (Integer, nil) (defaults to: nil) —

    Number of conversation turns exchanged during the call.

  • updated_at (Time) (defaults to: nil)


# File 'lib/zavudev/models/call_retrieve_response.rb', line 119

Instance Attribute Details

#answered_at ⇒ Time?

When the call was answered.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


66
# File 'lib/zavudev/models/call_retrieve_response.rb', line 66

optional :answered_at, Time, api_name: :answeredAt, nil?: true

#cost ⇒ Float?

Total cost of the call in USD, combining the managed voice pipeline per-minute charge and telephony. Available once the call has ended.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


73
# File 'lib/zavudev/models/call_retrieve_response.rb', line 73

optional :cost, Float, nil?: true

#created_at ⇒ Time

Parameters:

  • value (Time)

Returns:

  • (Time)


25
# File 'lib/zavudev/models/call_retrieve_response.rb', line 25

required :created_at, Time, api_name: :createdAt

#direction ⇒ Symbol, Zavudev::Models::CallRetrieveResponse::Call::Direction

Whether the call was placed by Zavu (outbound) or received from a caller (inbound).

Parameters:

  • value (Zavudev::Models::CallRetrieveResponse::Call::direction)

Returns:



32
# File 'lib/zavudev/models/call_retrieve_response.rb', line 32

required :direction, enum: -> { Zavudev::Models::CallRetrieveResponse::Call::Direction }

#duration_seconds ⇒ Integer?

Billable talk time in seconds, measured from answer to hangup.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


79
# File 'lib/zavudev/models/call_retrieve_response.rb', line 79

optional :duration_seconds, Integer, api_name: :durationSeconds, nil?: true

#end_reason ⇒ String?

Why the call ended (e.g. agent_ended, max_duration, transfer, hangup). Present once the call is no longer active.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


92
# File 'lib/zavudev/models/call_retrieve_response.rb', line 92

optional :end_reason, String, api_name: :endReason, nil?: true

#ended_at ⇒ Time?

When the call ended.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


85
# File 'lib/zavudev/models/call_retrieve_response.rb', line 85

optional :ended_at, Time, api_name: :endedAt, nil?: true

#from ⇒ String

Caller phone number in E.164 format. Your sender's number for outbound calls; the caller's number for inbound calls.

Parameters:

  • value (String)

Returns:

  • (String)


39
# File 'lib/zavudev/models/call_retrieve_response.rb', line 39

required :from, String

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/zavudev/models/call_retrieve_response.rb', line 20

required :id, String

#metadata ⇒ Hash{Symbol=>String}?

Arbitrary metadata you attached when creating the call.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


98
# File 'lib/zavudev/models/call_retrieve_response.rb', line 98

optional :metadata, Zavudev::Internal::Type::HashOf[String]

#status ⇒ Symbol, Zavudev::Models::CallRetrieveResponse::Call::Status

Lifecycle status of a voice call.

  • queued: outbound call created, not yet dialing.
  • ringing: dialing (outbound) or received and ringing (inbound).
  • in_progress: answered, the agent is connected.
  • completed: ended after a conversation.
  • failed: could not be completed.
  • busy: the line was busy.
  • no_answer: rang but was not answered.
  • canceled: canceled before it was answered.

Parameters:

  • value (Zavudev::Models::CallRetrieveResponse::Call::status)

Returns:



54
# File 'lib/zavudev/models/call_retrieve_response.rb', line 54

required :status, enum: -> { Zavudev::Models::CallRetrieveResponse::Call::Status }

#to ⇒ String

Callee phone number in E.164 format.

Parameters:

  • value (String)

Returns:

  • (String)


60
# File 'lib/zavudev/models/call_retrieve_response.rb', line 60

required :to, String

#transcript ⇒ Array<Zavudev::Models::CallRetrieveResponse::Call::Transcript>?

Ordered transcript of the call. Included when retrieving a single call; omitted from list responses.



105
106
# File 'lib/zavudev/models/call_retrieve_response.rb', line 105

optional :transcript,
-> { Zavudev::Internal::Type::ArrayOf[Zavudev::Models::CallRetrieveResponse::Call::Transcript] }

#turn_count ⇒ Integer?

Number of conversation turns exchanged during the call.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


112
# File 'lib/zavudev/models/call_retrieve_response.rb', line 112

optional :turn_count, Integer, api_name: :turnCount, nil?: true

#updated_at ⇒ Time?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


117
# File 'lib/zavudev/models/call_retrieve_response.rb', line 117

optional :updated_at, Time, api_name: :updatedAt

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/zavudev/models/call_retrieve_response.rb', line 163

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


91
# File 'sig/zavudev/models/call_retrieve_response.rbs', line 91

def to_hash: -> {