Class: Telnyx::Resources::Portouts::Reports
- Inherits:
-
Object
- Object
- Telnyx::Resources::Portouts::Reports
- Defined in:
- lib/telnyx/resources/portouts/reports.rb
Overview
Number portout operations
Instance Method Summary collapse
-
#create(params:, report_type:, request_options: {}) ⇒ Telnyx::Models::Portouts::ReportCreateResponse
Generate reports about port-out operations.
-
#initialize(client:) ⇒ Reports
constructor
private
A new instance of Reports.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Portouts::PortoutReport>
Some parameter documentations has been truncated, see Models::Portouts::ReportListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Portouts::ReportRetrieveResponse
Retrieve a specific report generated.
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.
86 87 88 |
# File 'lib/telnyx/resources/portouts/reports.rb', line 86 def initialize(client:) @client = client end |
Instance Method Details
#create(params:, report_type:, request_options: {}) ⇒ Telnyx::Models::Portouts::ReportCreateResponse
Generate reports about port-out operations.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/telnyx/resources/portouts/reports.rb', line 21 def create(params) parsed, = Telnyx::Portouts::ReportCreateParams.dump_request(params) @client.request( method: :post, path: "portouts/reports", body: parsed, model: Telnyx::Models::Portouts::ReportCreateResponse, options: ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Portouts::PortoutReport>
Some parameter documentations has been truncated, see Models::Portouts::ReportListParams for more details.
List the reports generated about port-out operations.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/telnyx/resources/portouts/reports.rb', line 70 def list(params = {}) parsed, = Telnyx::Portouts::ReportListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "portouts/reports", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Portouts::PortoutReport, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Portouts::ReportRetrieveResponse
Retrieve a specific report generated.
43 44 45 46 47 48 49 50 |
# File 'lib/telnyx/resources/portouts/reports.rb', line 43 def retrieve(id, params = {}) @client.request( method: :get, path: ["portouts/reports/%1$s", id], model: Telnyx::Models::Portouts::ReportRetrieveResponse, options: params[:request_options] ) end |