Class: Telnyx::Resources::Reports::CdrUsageReports
- Inherits:
-
Object
- Object
- Telnyx::Resources::Reports::CdrUsageReports
- Defined in:
- lib/telnyx/resources/reports/cdr_usage_reports.rb
Overview
Voice usage reports
Instance Method Summary collapse
-
#fetch_sync(aggregation_type:, product_breakdown:, connections: nil, end_date: nil, start_date: nil, request_options: {}) ⇒ Telnyx::Models::Reports::CdrUsageReportFetchSyncResponse
Generate and fetch voice usage report synchronously.
-
#initialize(client:) ⇒ CdrUsageReports
constructor
private
A new instance of CdrUsageReports.
Constructor Details
#initialize(client:) ⇒ CdrUsageReports
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 CdrUsageReports.
39 40 41 |
# File 'lib/telnyx/resources/reports/cdr_usage_reports.rb', line 39 def initialize(client:) @client = client end |
Instance Method Details
#fetch_sync(aggregation_type:, product_breakdown:, connections: nil, end_date: nil, start_date: nil, request_options: {}) ⇒ Telnyx::Models::Reports::CdrUsageReportFetchSyncResponse
Generate and fetch voice usage report synchronously. This endpoint will both generate and fetch the voice report over a specified time period. No polling is necessary but the response may take up to a couple of minutes.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/telnyx/resources/reports/cdr_usage_reports.rb', line 24 def fetch_sync(params) parsed, = Telnyx::Reports::CdrUsageReportFetchSyncParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "reports/cdr_usage_reports/sync", query: query, model: Telnyx::Models::Reports::CdrUsageReportFetchSyncResponse, options: ) end |