Class: Twilio::REST::Voice::V3::TranscriptionList::VoiceV3TranscriptionTranscriptionStatusCallback

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/voice/v3/transcription.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ VoiceV3TranscriptionTranscriptionStatusCallback

Returns a new instance of VoiceV3TranscriptionTranscriptionStatusCallback.



71
72
73
74
75
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 71

def initialize(payload)
        @url = payload["url"]
        @method = payload["method"]
        @events = payload["events"]
end

Instance Attribute Details

#events ⇒ Object

Parameters:

  • : (url) —

    [String] The URL to call when transcription status changes

  • : (method) —

    [String] The HTTP method to use for the callback, currently only POST is supported

  • : (events) —

    [Array] The transcription events that will trigger the callback



70
71
72
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 70

def events
  @events
end

#method ⇒ Object

Parameters:

  • : (url) —

    [String] The URL to call when transcription status changes

  • : (method) —

    [String] The HTTP method to use for the callback, currently only POST is supported

  • : (events) —

    [Array] The transcription events that will trigger the callback



70
71
72
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 70

def method
  @method
end

#url ⇒ Object

Parameters:

  • : (url) —

    [String] The URL to call when transcription status changes

  • : (method) —

    [String] The HTTP method to use for the callback, currently only POST is supported

  • : (events) —

    [Array] The transcription events that will trigger the callback



70
71
72
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 70

def url
  @url
end

Instance Method Details

#to_json(options = {}) ⇒ Object



76
77
78
79
80
81
82
# File 'lib/twilio-ruby/rest/voice/v3/transcription.rb', line 76

def to_json(options = {})
{
        "url": @url,
        "method": @method,
        "events": @events,
}.to_json(options)
end