Class: OpenFga::ApiExecutorRequest
- Inherits:
-
Object
- Object
- OpenFga::ApiExecutorRequest
- Defined in:
- lib/openfga/client/models/api_executor_request.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#method ⇒ Object
Returns the value of attribute method.
-
#path ⇒ Object
Returns the value of attribute path.
-
#path_params ⇒ Object
Returns the value of attribute path_params.
-
#query_params ⇒ Object
Returns the value of attribute query_params.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(method:, path:, path_params: {}, query_params: {}, body: nil, headers: {}) ⇒ ApiExecutorRequest
constructor
A new instance of ApiExecutorRequest.
- #validate! ⇒ Object
Constructor Details
#initialize(method:, path:, path_params: {}, query_params: {}, body: nil, headers: {}) ⇒ ApiExecutorRequest
Returns a new instance of ApiExecutorRequest.
7 8 9 10 11 12 13 14 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 7 def initialize(method:, path:, path_params: {}, query_params: {}, body: nil, headers: {}) @method = method @path = path @path_params = path_params || {} @query_params = query_params || {} @body = body @headers = headers || {} end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 5 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 5 def headers @headers end |
#method ⇒ Object
Returns the value of attribute method.
5 6 7 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 5 def method @method end |
#path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 5 def path @path end |
#path_params ⇒ Object
Returns the value of attribute path_params.
5 6 7 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 5 def path_params @path_params end |
#query_params ⇒ Object
Returns the value of attribute query_params.
5 6 7 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 5 def query_params @query_params end |
Class Method Details
.build {|req| ... } ⇒ Object
16 17 18 19 20 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 16 def self.build req = new(method: nil, path: nil) yield req req end |
Instance Method Details
#validate! ⇒ Object
22 23 24 25 |
# File 'lib/openfga/client/models/api_executor_request.rb', line 22 def validate! raise ArgumentError, 'ApiExecutorRequest#method is required' if @method.nil? raise ArgumentError, 'ApiExecutorRequest#path is required' if @path.nil? || @path.empty? end |