Class: Zavudev::Models::CallListResponse

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

Overview

See Also:

  • Zavudev::Resources::Calls#list

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::CallListResponse for more details.

Parameters:

  • id (String)
  • created_at (Time)
  • direction (Symbol, Zavudev::Models::CallListResponse::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::CallListResponse::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::CallListResponse::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_list_response.rb', line 109

Instance Attribute Details

#answered_at ⇒ Time?

When the call was answered.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


56
# File 'lib/zavudev/models/call_list_response.rb', line 56

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)


63
# File 'lib/zavudev/models/call_list_response.rb', line 63

optional :cost, Float, nil?: true

#created_at ⇒ Time

Parameters:

  • value (Time)

Returns:

  • (Time)


15
# File 'lib/zavudev/models/call_list_response.rb', line 15

required :created_at, Time, api_name: :createdAt

#direction ⇒ Symbol, Zavudev::Models::CallListResponse::Direction

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

Parameters:

  • value (Zavudev::Models::CallListResponse::direction)

Returns:



22
# File 'lib/zavudev/models/call_list_response.rb', line 22

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

#duration_seconds ⇒ Integer?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


69
# File 'lib/zavudev/models/call_list_response.rb', line 69

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)


82
# File 'lib/zavudev/models/call_list_response.rb', line 82

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

#ended_at ⇒ Time?

When the call ended.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


75
# File 'lib/zavudev/models/call_list_response.rb', line 75

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)


29
# File 'lib/zavudev/models/call_list_response.rb', line 29

required :from, String

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/zavudev/models/call_list_response.rb', line 10

required :id, String

#metadata ⇒ Hash{Symbol=>String}?

Arbitrary metadata you attached when creating the call.

Parameters:

  • (::Hash[Symbol, String])

Returns:

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


88
# File 'lib/zavudev/models/call_list_response.rb', line 88

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

#status ⇒ Symbol, Zavudev::Models::CallListResponse::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::CallListResponse::status)

Returns:



44
# File 'lib/zavudev/models/call_list_response.rb', line 44

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

#to ⇒ String

Callee phone number in E.164 format.

Parameters:

  • value (String)

Returns:

  • (String)


50
# File 'lib/zavudev/models/call_list_response.rb', line 50

required :to, String

#transcript ⇒ Array<Zavudev::Models::CallListResponse::Transcript>?

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



95
96
# File 'lib/zavudev/models/call_list_response.rb', line 95

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

#turn_count ⇒ Integer?

Number of conversation turns exchanged during the call.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


102
# File 'lib/zavudev/models/call_list_response.rb', line 102

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

#updated_at ⇒ Time?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


107
# File 'lib/zavudev/models/call_list_response.rb', line 107

optional :updated_at, Time, api_name: :updatedAt

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/zavudev/models/call_list_response.rb', line 153

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


79
# File 'sig/zavudev/models/call_list_response.rbs', line 79

def to_hash: -> {