Class: Telnyx::Resources::Reports::CdrUsageReports

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/reports/cdr_usage_reports.rb

Overview

Voice usage reports

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

Returns:

See Also:



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, options = 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: options
  )
end