Class: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call

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

Overview

See Also:

  • SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data#call

Defined Under Namespace

Modules: Status

Instance Attribute 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:, contact:, duration:, initiated_at:, status:, from: nil, phone_number_id: nil, to: nil) ⇒ Object

The call that resulted in this voicemail

Parameters:

  • id (String)

    The unique identifier for the call

  • contact (SurgeAPI::Models::Contact)

    A contact who has consented to receive messages

  • duration (Integer)

    The duration of the call in seconds

  • initiated_at (Time)

    When the call was initiated

  • status (Symbol, SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::Status)

    The status of the call

  • from (String, nil) (defaults to: nil)

    The E.164 phone number of the caller

  • phone_number_id (String, nil) (defaults to: nil)

    The Surge phone number ID (e.g. pn_...)

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

    The E.164 phone number of the callee



# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 126

Instance Attribute Details

#contactSurgeAPI::Models::Contact

A contact who has consented to receive messages

Parameters:

Returns:



88
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 88

required :contact, -> { SurgeAPI::Contact }

#durationInteger

The duration of the call in seconds

Parameters:

  • value (Integer)

Returns:

  • (Integer)


94
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 94

required :duration, Integer

#fromString?

The E.164 phone number of the caller

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


112
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 112

optional :from, String, nil?: true

#idString

The unique identifier for the call

Parameters:

  • value (String)

Returns:

  • (String)


82
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 82

required :id, String

#initiated_atTime

When the call was initiated

Parameters:

  • value (Time)

Returns:

  • (Time)


100
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 100

required :initiated_at, Time

#phone_number_idString?

The Surge phone number ID (e.g. pn_...)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


118
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 118

optional :phone_number_id, String, nil?: true

#statusSymbol, SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::Status

The status of the call

Parameters:

  • value (SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status)

Returns:



106
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 106

required :status, enum: -> { SurgeAPI::VoicemailReceivedWebhookEvent::Data::Call::Status }

#toString?

The E.164 phone number of the callee

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


124
# File 'lib/surge_api/models/voicemail_received_webhook_event.rb', line 124

optional :to, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


105
# File 'sig/surge_api/models/voicemail_received_webhook_event.rbs', line 105

def to_hash: -> {