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
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
Fetch all Mdr records.
-
#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>
Some parameter documentations has been truncated, see Models::ReportListWdrsParams for more details.
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.
107 108 109 110 111 |
# File 'lib/telnyx/resources/reports.rb', line 107 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
Fetch all Mdr records
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/telnyx/resources/reports.rb', line 41 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>
Some parameter documentations has been truncated, see Models::ReportListWdrsParams for more details.
Fetch all Wdr records
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/telnyx/resources/reports.rb', line 91 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 |