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
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.
108 109 110 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 108 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
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 30 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
96 97 98 99 100 101 102 103 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 96 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.
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 74 def list(params = {}) parsed, = Telnyx::Legacy::Reporting::UsageReports::MessagingListParams.dump_request(params) @client.request( method: :get, path: "legacy/reporting/usage_reports/messaging", query: parsed, 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.
52 53 54 55 56 57 58 59 |
# File 'lib/telnyx/resources/legacy/reporting/usage_reports/messaging.rb', line 52 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 |