Class: Bandwidth::Bxml::StartTranscription

Inherits:
NestableVerb show all
Defined in:
lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb

Instance Method Summary collapse

Methods inherited from NestableVerb

#generate_xml

Methods inherited from Verb

#generate_xml, #set_attributes, #to_bxml

Constructor Details

#initialize(custom_params = [], attributes = {}) ⇒ StartTranscription

Initializer

Parameters:

  • custom_params (Array) (defaults to: [])

    XML element children. Defaults to an empty array. Valid nested custom params are: CustomParam. You may specify up to 12 <CustomParam/> elements nested within a <StartTranscription> tag.

  • attributes (Hash) (defaults to: {})

    The attributes to add to the element. Defaults to an empty hash.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb', line 7

def initialize(custom_params = [], attributes = {})
  super('StartTranscription', nil, custom_params, attributes)
  
  @attribute_map = {
    name: 'name',                                           # Optional [String]: A name to refer to this transcription by. Used when sending <StopTranscription>. If not provided, it will default to the generated transcription id as sent in the Real-Time Transcription Started webhook.
    tracks: 'tracks',                                       # Optional [String]: The part of the call to send a transcription from. inbound, outbound or both. Default is inbound.
    transcription_event_url: 'transcriptionEventUrl',       # Optional [String]: URL to send the associated Webhook events to during this real-time transcription's lifetime. Does not accept BXML. May be a relative URL.
    transcription_event_method: 'transcriptionEventMethod', # Optional [String]: The HTTP method to use for the request to transcriptionEventUrl. GET or POST. Default value is POST.
    username: 'username',                                   # Optional [String]: The username to send in the HTTP request to transcriptionEventUrl. If specified, the transcriptionEventUrl must be TLS-encrypted (i.e., https).
    password: 'password',                                   # Optional [String]: The password to send in the HTTP request to transcriptionEventUrl. If specified, the transcriptionEventUrl must be TLS-encrypted (i.e., https).
    destination: 'destination',                             # Optional [String]: A websocket URI to send the transcription to. A transcription of the specified tracks will be sent via websocket to this URL as a series of JSON messages. See below for more details on the websocket packet format.
    stabilized: 'stabilized',                               # Optional [Boolean]: Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true.
  }
end

Instance Method Details

#add_custom_param(custom_params) ⇒ Object

Add custom param/s to the nested verbs array

Parameters:

  • custom_params (CustomParam)

    or [Array<CustomParam>] Verb or verbs to add to the array.



24
25
26
# File 'lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb', line 24

def add_custom_param(custom_params)
  @nested_verbs.push(*custom_params)
end