Class: Telnyx::Resources::Reports
- Inherits:
-
Object
- Object
- Telnyx::Resources::Reports
- Defined in:
- lib/telnyx/resources/reports.rb,
lib/telnyx/resources/reports/cdr_usage_reports.rb,
lib/telnyx/resources/reports/mdr_usage_reports.rb,
sig/telnyx/resources/reports.rbs,
sig/telnyx/resources/reports/cdr_usage_reports.rbs,
sig/telnyx/resources/reports/mdr_usage_reports.rbs
Defined Under Namespace
Classes: CdrUsageReports, MdrUsageReports
Instance Attribute Summary collapse
-
#cdr_usage_reports ⇒ Telnyx::Resources::Reports::CdrUsageReports
readonly
Voice usage reports.
-
#mdr_usage_reports ⇒ Telnyx::Resources::Reports::MdrUsageReports
readonly
Messaging usage reports.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Reports
constructor
private
A new instance of Reports.
-
#list_mdrs(id: nil, cld: nil, cli: nil, direction: nil, end_date: nil, message_type: nil, profile: nil, start_date: nil, status: nil, request_options: {}) ⇒ Telnyx::Models::ReportListMdrsResponse
Returns message detail records (MDRs) matching the provided criteria, such as date range, direction, status, and message type.
-
#list_wdrs(id: nil, end_date: nil, imsi: nil, mcc: nil, mnc: nil, page_number: nil, page_size: nil, phone_number: nil, sim_card_id: nil, sim_group_id: nil, sim_group_name: nil, sort: nil, start_date: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ReportListWdrsResponse>
Returns wireless detail records (WDRs) matching the provided criteria, such as date range, SIM card, IMSI, or phone number, with pagination and sorting.
Constructor Details
#initialize(client:) ⇒ Reports
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 Reports.
106 107 108 109 110 |
# File 'lib/telnyx/resources/reports.rb', line 106 def initialize(client:) @client = client @cdr_usage_reports = Telnyx::Resources::Reports::CdrUsageReports.new(client: client) @mdr_usage_reports = Telnyx::Resources::Reports::MdrUsageReports.new(client: client) end |
Instance Attribute Details
#cdr_usage_reports ⇒ Telnyx::Resources::Reports::CdrUsageReports (readonly)
Voice usage reports
8 9 10 |
# File 'lib/telnyx/resources/reports.rb', line 8 def cdr_usage_reports @cdr_usage_reports end |
#mdr_usage_reports ⇒ Telnyx::Resources::Reports::MdrUsageReports (readonly)
Messaging usage reports
12 13 14 |
# File 'lib/telnyx/resources/reports.rb', line 12 def mdr_usage_reports @mdr_usage_reports end |
Instance Method Details
#list_mdrs(id: nil, cld: nil, cli: nil, direction: nil, end_date: nil, message_type: nil, profile: nil, start_date: nil, status: nil, request_options: {}) ⇒ Telnyx::Models::ReportListMdrsResponse
Returns message detail records (MDRs) matching the provided criteria, such as date range, direction, status, and message type.
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/telnyx/resources/reports.rb', line 42 def list_mdrs(params = {}) parsed, = Telnyx::ReportListMdrsParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "reports/mdrs", query: query, model: Telnyx::Models::ReportListMdrsResponse, options: ) end |
#list_wdrs(id: nil, end_date: nil, imsi: nil, mcc: nil, mnc: nil, page_number: nil, page_size: nil, phone_number: nil, sim_card_id: nil, sim_group_id: nil, sim_group_name: nil, sort: nil, start_date: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ReportListWdrsResponse>
Returns wireless detail records (WDRs) matching the provided criteria, such as date range, SIM card, IMSI, or phone number, with pagination and sorting.
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/telnyx/resources/reports.rb', line 90 def list_wdrs(params = {}) parsed, = Telnyx::ReportListWdrsParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "reports/wdrs", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Models::ReportListWdrsResponse, options: ) end |