Class: Telnyx::Resources::Legacy::Reporting::UsageReports
- Inherits:
-
Object
- Object
- Telnyx::Resources::Legacy::Reporting::UsageReports
- 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
Overview
Speech to text usage reports
Defined Under Namespace
Classes: Messaging, NumberLookup, Voice
Instance Attribute Summary collapse
-
#messaging ⇒ Telnyx::Resources::Legacy::Reporting::UsageReports::Messaging
readonly
Messaging usage reports.
-
#number_lookup ⇒ Telnyx::Resources::Legacy::Reporting::UsageReports::NumberLookup
readonly
Number lookup usage reports.
-
#voice ⇒ Telnyx::Resources::Legacy::Reporting::UsageReports::Voice
readonly
Voice usage reports.
Instance Method Summary collapse
-
#initialize(client:) ⇒ UsageReports
constructor
private
A new instance of UsageReports.
-
#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.
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.
48 49 50 51 52 53 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 48 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
#messaging ⇒ Telnyx::Resources::Legacy::Reporting::UsageReports::Messaging (readonly)
Messaging usage reports
11 12 13 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 11 def messaging @messaging end |
#number_lookup ⇒ Telnyx::Resources::Legacy::Reporting::UsageReports::NumberLookup (readonly)
Number lookup usage reports
15 16 17 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 15 def number_lookup @number_lookup end |
#voice ⇒ Telnyx::Resources::Legacy::Reporting::UsageReports::Voice (readonly)
Voice usage reports
19 20 21 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 19 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.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports.rb', line 33 def retrieve_speech_to_text(params = {}) parsed, = Telnyx::Legacy::Reporting::UsageReportRetrieveSpeechToTextParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "legacy/reporting/usage_reports/speech_to_text", query: query, model: Telnyx::Models::Legacy::Reporting::UsageReportRetrieveSpeechToTextResponse, options: ) end |