Class: Pinnacle::Internal::Http::BaseRequest Private
- Inherits:
-
Object
- Object
- Pinnacle::Internal::Http::BaseRequest
- Defined in:
- lib/pinnacle/internal/http/base_request.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Attribute Summary collapse
- #base_url ⇒ Object readonly private
- #headers ⇒ Object readonly private
- #method ⇒ Object readonly private
- #path ⇒ Object readonly private
- #query ⇒ Object readonly private
- #request_options ⇒ Object readonly private
Instance Method Summary collapse
-
#encode_query ⇒ Hash
private
The query parameters merged with additional query parameters from request options.
-
#initialize(base_url:, path:, method:, headers: {}, query: {}, request_options: {}) ⇒ BaseRequest
constructor
private
A new instance of BaseRequest.
Constructor Details
#initialize(base_url:, path:, method:, headers: {}, query: {}, request_options: {}) ⇒ BaseRequest
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 BaseRequest.
16 17 18 19 20 21 22 23 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 16 def initialize(base_url:, path:, method:, headers: {}, query: {}, request_options: {}) @base_url = base_url @path = path @method = method @headers = headers @query = query = end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 8 def base_url @base_url end |
#headers ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 8 def headers @headers end |
#method ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 8 def method @method end |
#path ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 8 def path @path end |
#query ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 8 def query @query end |
#request_options ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 8 def end |
Instance Method Details
#encode_query ⇒ Hash
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 The query parameters merged with additional query parameters from request options.
26 27 28 29 |
# File 'lib/pinnacle/internal/http/base_request.rb', line 26 def encode_query additional_query = &.dig(:additional_query_parameters) || &.dig("additional_query_parameters") || {} @query.merge(additional_query) end |