Class: Telnyx::Resources::Legacy::Reporting::UsageReports::Messaging
- Inherits:
-
Object
- Object
- Telnyx::Resources::Legacy::Reporting::UsageReports::Messaging
- Defined in:
- lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb,
sig/telnyx/resources/legacy/reporting/usage_reports/messaging.rbs
Overview
Messaging usage reports
Instance Method Summary collapse
-
#create(aggregation_type:, end_time: nil, managed_accounts: nil, profiles: nil, select_all_managed_accounts: nil, start_time: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::MessagingCreateResponse
Creates a new legacy usage V2 MDR report request with the specified filters.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::MessagingDeleteResponse
Deletes a specific V2 legacy usage MDR report request by ID.
-
#initialize(client:) ⇒ Messaging
constructor
private
A new instance of Messaging.
-
#list(page: nil, per_page: nil, request_options: {}) ⇒ Telnyx::Internal::PerPagePagination<Telnyx::Models::Legacy::Reporting::UsageReports::MdrUsageReportResponseLegacy>
Fetch all previous requests for MDR usage reports.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::MessagingRetrieveResponse
Returns a single MDR (Message Detail Record) usage report by its identifier, including its parameters and current status.
Constructor Details
#initialize(client:) ⇒ Messaging
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 Messaging.
113 114 115 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 113 def initialize(client:) @client = client end |
Instance Method Details
#create(aggregation_type:, end_time: nil, managed_accounts: nil, profiles: nil, select_all_managed_accounts: nil, start_time: nil, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::MessagingCreateResponse
Creates a new legacy usage V2 MDR report request with the specified filters
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 31 def create(params) parsed, = Telnyx::Legacy::Reporting::UsageReports::MessagingCreateParams.dump_request(params) @client.request( method: :post, path: "legacy/reporting/usage_reports/messaging", headers: {"content-type" => "*/*"}, body: parsed, model: Telnyx::Models::Legacy::Reporting::UsageReports::MessagingCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::MessagingDeleteResponse
Deletes a specific V2 legacy usage MDR report request by ID
101 102 103 104 105 106 107 108 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 101 def delete(id, params = {}) @client.request( method: :delete, path: ["legacy/reporting/usage_reports/messaging/%1$s", id], model: Telnyx::Models::Legacy::Reporting::UsageReports::MessagingDeleteResponse, options: params[:request_options] ) end |
#list(page: nil, per_page: nil, request_options: {}) ⇒ Telnyx::Internal::PerPagePagination<Telnyx::Models::Legacy::Reporting::UsageReports::MdrUsageReportResponseLegacy>
Fetch all previous requests for MDR usage reports.
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 77 def list(params = {}) parsed, = Telnyx::Legacy::Reporting::UsageReports::MessagingListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "legacy/reporting/usage_reports/messaging", query: query, page: Telnyx::Internal::PerPagePagination, model: Telnyx::Legacy::Reporting::UsageReports::MdrUsageReportResponseLegacy, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Legacy::Reporting::UsageReports::MessagingRetrieveResponse
Returns a single MDR (Message Detail Record) usage report by its identifier, including its parameters and current status.
55 56 57 58 59 60 61 62 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 55 def retrieve(id, params = {}) @client.request( method: :get, path: ["legacy/reporting/usage_reports/messaging/%1$s", id], model: Telnyx::Models::Legacy::Reporting::UsageReports::MessagingRetrieveResponse, options: params[:request_options] ) end |