Class: Telnyx::Resources::Legacy::Reporting::BatchDetailRecords::SpeechToText

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.rb

Overview

Speech to text batch detail records

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SpeechToText

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SpeechToText.

Parameters:



94
95
96
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.rb', line 94

def initialize(client:)
  @client = client
end

Instance Method Details

#create(end_date:, start_date:, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextCreateResponse

Creates a new Speech to Text batch report request with the specified filters

Parameters:

  • end_date (Time)

    End date in ISO format with timezone (date range must be up to one month)

  • start_date (Time)

    Start date in ISO format with timezone

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.rb', line 23

def create(params)
  parsed, options =
    Telnyx::Legacy::Reporting::BatchDetailRecords::SpeechToTextCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "legacy/reporting/batch_detail_records/speech_to_text",
    body: parsed,
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextCreateResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextDeleteResponse

Deletes a specific Speech to Text batch report request by ID



82
83
84
85
86
87
88
89
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.rb', line 82

def delete(id, params = {})
  @client.request(
    method: :delete,
    path: ["legacy/reporting/batch_detail_records/speech_to_text/%1$s", id],
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextDeleteResponse,
    options: params[:request_options]
  )
end

#list(request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextListResponse

Retrieves all Speech to Text batch report requests for the authenticated user



63
64
65
66
67
68
69
70
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.rb', line 63

def list(params = {})
  @client.request(
    method: :get,
    path: "legacy/reporting/batch_detail_records/speech_to_text",
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextListResponse,
    options: params[:request_options]
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextRetrieveResponse

Retrieves a specific Speech to Text batch report request by ID



45
46
47
48
49
50
51
52
# File 'lib/telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.rb', line 45

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["legacy/reporting/batch_detail_records/speech_to_text/%1$s", id],
    model: Telnyx::Models::Legacy::Reporting::BatchDetailRecords::SpeechToTextRetrieveResponse,
    options: params[:request_options]
  )
end