Class: Pangea::Models::PangeaResponse
- Inherits:
-
Object
- Object
- Pangea::Models::PangeaResponse
- Defined in:
- lib/pangea/models/pangea_response.rb
Instance Attribute Summary collapse
-
#request_id ⇒ String
A unique identifier assigned to each request made to the API.
-
#request_time ⇒ String
The timestamp indicates the exact moment when a request is made to the API.
-
#response_time ⇒ String
Duration it takes for the API to process a request and generate a response.
- #result ⇒ generic<Result> | nil
-
#status ⇒ String
It represents the status or outcome of the API request made for IP information.
-
#summary ⇒ String
Provides a concise and brief overview of the purpose or primary objective of the API endpoint.
Instance Method Summary collapse
-
#initialize(response_data:, model:) ⇒ PangeaResponse
constructor
private
A new instance of PangeaResponse.
Constructor Details
#initialize(response_data:, model:) ⇒ PangeaResponse
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 PangeaResponse.
57 58 59 60 61 62 63 64 |
# File 'lib/pangea/models/pangea_response.rb', line 57 def initialize(response_data:, model:) @request_id = response_data[:request_id] @request_time = response_data[:request_time] @response_time = response_data[:response_time] @status = response_data[:status] @summary = response_data[:summary] @result = Pangea::Internal::Type::Converter.coerce(model, response_data[:result]) end |
Instance Attribute Details
#request_id ⇒ String
A unique identifier assigned to each request made to the API. It is used
to track and identify a specific request and its associated data. The
request_id can be helpful for troubleshooting, auditing, and tracing
the flow of requests within the system. It allows users to reference and
retrieve information related to a particular request, such as the
response, parameters, and raw data associated with that specific
request.
16 17 18 |
# File 'lib/pangea/models/pangea_response.rb', line 16 def request_id @request_id end |
#request_time ⇒ String
The timestamp indicates the exact moment when a request is made to the
API. It represents the date and time at which the request was initiated
by the client. The request_time is useful for tracking and analyzing
the timing of requests, measuring response times, and monitoring
performance metrics. It allows users to determine the duration between
the request initiation and the corresponding response, aiding in the
assessment of API performance and latency.
27 28 29 |
# File 'lib/pangea/models/pangea_response.rb', line 27 def request_time @request_time end |
#response_time ⇒ String
Duration it takes for the API to process a request and generate a response. It represents the elapsed time from when the request is received by the API to when the corresponding response is returned to the client.
35 36 37 |
# File 'lib/pangea/models/pangea_response.rb', line 35 def response_time @response_time end |
#result ⇒ generic<Result> | nil
52 53 54 |
# File 'lib/pangea/models/pangea_response.rb', line 52 def result @result end |
#status ⇒ String
It represents the status or outcome of the API request made for IP information. It indicates the current state or condition of the request and provides information on the success or failure of the request.
42 43 44 |
# File 'lib/pangea/models/pangea_response.rb', line 42 def status @status end |
#summary ⇒ String
Provides a concise and brief overview of the purpose or primary objective of the API endpoint. It serves as a high-level summary or description of the functionality or feature offered by the endpoint.
49 50 51 |
# File 'lib/pangea/models/pangea_response.rb', line 49 def summary @summary end |