Class: Telnyx::Resources::Legacy::Reporting::UsageReports

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/legacy/reporting/usage_reports.rb,
lib/telnyx/resources/legacy/reporting/usage_reports/voice.rb,
lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb,
lib/telnyx/resources/legacy/reporting/usage_reports/number_lookup.rb

Defined Under Namespace

Classes: Messaging, NumberLookup, Voice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ UsageReports

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 UsageReports.

Parameters:



43
44
45
46
47
48
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 43

def initialize(client:)
  @client = client
  @messaging = Telnyx::Resources::Legacy::Reporting::UsageReports::Messaging.new(client: client)
  @number_lookup = Telnyx::Resources::Legacy::Reporting::UsageReports::NumberLookup.new(client: client)
  @voice = Telnyx::Resources::Legacy::Reporting::UsageReports::Voice.new(client: client)
end

Instance Attribute Details

#messagingTelnyx::Resources::Legacy::Reporting::UsageReports::Messaging (readonly)



9
10
11
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 9

def messaging
  @messaging
end

#number_lookupTelnyx::Resources::Legacy::Reporting::UsageReports::NumberLookup (readonly)



12
13
14
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 12

def number_lookup
  @number_lookup
end

#voiceTelnyx::Resources::Legacy::Reporting::UsageReports::Voice (readonly)



15
16
17
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 15

def voice
  @voice
end

Instance Method Details

#retrieve_speech_to_text(end_date: nil, start_date: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReportRetrieveSpeechToTextResponse

Generate and fetch speech to text usage report synchronously. This endpoint will both generate and fetch the speech to text report over a specified time period.

Parameters:

Returns:

See Also:



29
30
31
32
33
34
35
36
37
38
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 29

def retrieve_speech_to_text(params = {})
  parsed, options = Telnyx::Legacy::Reporting::UsageReportRetrieveSpeechToTextParams.dump_request(params)
  @client.request(
    method: :get,
    path: "legacy/reporting/usage_reports/speech_to_text",
    query: parsed,
    model: Telnyx::Models::Legacy::Reporting::UsageReportRetrieveSpeechToTextResponse,
    options: options
  )
end