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
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
Fetch single MDR usage report by id.
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.
110 111 112 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 110 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
98 99 100 101 102 103 104 105 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 98 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.
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 75 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
Fetch single MDR usage report by id.
53 54 55 56 57 58 59 60 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 53 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 |