Class: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call

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

Overview

See Also:

  • SurgeAPI::Models::RecordingCompletedWebhookEvent::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 produced this recording

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::RecordingCompletedWebhookEvent::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/recording_completed_webhook_event.rb', line 118

Instance Attribute Details

#contactSurgeAPI::Models::Contact

A contact who has consented to receive messages

Parameters:

Returns:



80
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 80

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

#durationInteger

The duration of the call in seconds

Parameters:

  • value (Integer)

Returns:

  • (Integer)


86
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 86

required :duration, Integer

#fromString?

The E.164 phone number of the caller

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


104
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 104

optional :from, String, nil?: true

#idString

The unique identifier for the call

Parameters:

  • value (String)

Returns:

  • (String)


74
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 74

required :id, String

#initiated_atTime

When the call was initiated

Parameters:

  • value (Time)

Returns:

  • (Time)


92
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 92

required :initiated_at, Time

#phone_number_idString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


110
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 110

optional :phone_number_id, String, nil?: true

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

The status of the call

Parameters:

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

Returns:



98
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 98

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

#toString?

The E.164 phone number of the callee

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


116
# File 'lib/surge_api/models/recording_completed_webhook_event.rb', line 116

optional :to, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


100
# File 'sig/surge_api/models/recording_completed_webhook_event.rbs', line 100

def to_hash: -> {