Class: MicrosoftKiotaAbstractions::BaseRequestBuilder
- Inherits:
-
Object
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- Defined in:
- lib/microsoft_kiota_abstractions/base_request_builder.rb
Overview
Base class for request builders. Performs basic validation and defines common properties.
Instance Method Summary collapse
-
#initialize(path_parameters, request_adapter, url_template) ⇒ Object
constructor
A void.
Constructor Details
#initialize(path_parameters, request_adapter, url_template) ⇒ Object
Returns a void.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/microsoft_kiota_abstractions/base_request_builder.rb', line 21 def initialize(path_parameters, request_adapter, url_template) raise StandardError, 'request_adapter cannot be null' if request_adapter.nil? raise StandardError, 'url_template cannot be null' if url_template.nil? || url_template.empty? @request_adapter = request_adapter unless path_parameters.nil? then if path_parameters.is_a? Hash then @path_parameters = path_parameters.clone elsif path_parameters.is_a? String then @path_parameters = { "request-raw-url" => path_parameters } end end @path_parameters = Hash.new if path_parameters.nil? @url_template = url_template end |