Class: Telnyx::Resources::Legacy::Reporting::UsageReports::Voice
- Inherits:
-
Object
- Object
- Telnyx::Resources::Legacy::Reporting::UsageReports::Voice
- Defined in:
- lib/telnyx/resources/legacy/reporting/usage_reports/voice.rb
Overview
Voice usage reports
Instance Method Summary collapse
-
#create(end_time:, start_time:, aggregation_type: nil, connections: nil, managed_accounts: nil, product_breakdown: nil, select_all_managed_accounts: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::VoiceCreateResponse
Some parameter documentations has been truncated, see Models::Legacy::Reporting::UsageReports::VoiceCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::VoiceDeleteResponse
Deletes a specific V2 legacy usage CDR report request by ID.
-
#initialize(client:) ⇒ Voice
constructor
private
A new instance of Voice.
-
#list(page: nil, per_page: nil, request_options: {}) ⇒ Telnyx::Internal::PerPagePagination<Telnyx::Models::Legacy::Reporting::UsageReports::CdrUsageReportResponseLegacy>
Fetch all previous requests for cdr usage reports.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::VoiceRetrieveResponse
Fetch single cdr usage report by id.
Constructor Details
#initialize(client:) ⇒ Voice
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 Voice.
116 117 118 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/voice.rb', line 116 def initialize(client:) @client = client end |
Instance Method Details
#create(end_time:, start_time:, aggregation_type: nil, connections: nil, managed_accounts: nil, product_breakdown: nil, select_all_managed_accounts: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::VoiceCreateResponse
Some parameter documentations has been truncated, see Models::Legacy::Reporting::UsageReports::VoiceCreateParams for more details.
Creates a new legacy usage V2 CDR report request with the specified filters
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/voice.rb', line 37 def create(params) parsed, = Telnyx::Legacy::Reporting::UsageReports::VoiceCreateParams.dump_request(params) @client.request( method: :post, path: "legacy/reporting/usage_reports/voice", headers: {"content-type" => "*/*"}, body: parsed, model: Telnyx::Models::Legacy::Reporting::UsageReports::VoiceCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::VoiceDeleteResponse
Deletes a specific V2 legacy usage CDR report request by ID
104 105 106 107 108 109 110 111 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/voice.rb', line 104 def delete(id, params = {}) @client.request( method: :delete, path: ["legacy/reporting/usage_reports/voice/%1$s", id], model: Telnyx::Models::Legacy::Reporting::UsageReports::VoiceDeleteResponse, options: params[:request_options] ) end |
#list(page: nil, per_page: nil, request_options: {}) ⇒ Telnyx::Internal::PerPagePagination<Telnyx::Models::Legacy::Reporting::UsageReports::CdrUsageReportResponseLegacy>
Fetch all previous requests for cdr usage reports.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/voice.rb', line 81 def list(params = {}) parsed, = Telnyx::Legacy::Reporting::UsageReports::VoiceListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "legacy/reporting/usage_reports/voice", query: query, page: Telnyx::Internal::PerPagePagination, model: Telnyx::Legacy::Reporting::UsageReports::CdrUsageReportResponseLegacy, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::VoiceRetrieveResponse
Fetch single cdr usage report by id.
59 60 61 62 63 64 65 66 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/voice.rb', line 59 def retrieve(id, params = {}) @client.request( method: :get, path: ["legacy/reporting/usage_reports/voice/%1$s", id], model: Telnyx::Models::Legacy::Reporting::UsageReports::VoiceRetrieveResponse, options: params[:request_options] ) end |