Class: TrophyApiClient::RequestOptions
- Inherits:
-
Object
- Object
- TrophyApiClient::RequestOptions
- Defined in:
- lib/requests.rb
Overview
Additional options for request-specific configuration when calling APIs via the
SDK.
Instance Attribute Summary collapse
- #additional_body_parameters ⇒ Hash{String => Object} readonly
- #additional_headers ⇒ Hash{String => Object} readonly
- #additional_query_parameters ⇒ Hash{String => Object} readonly
- #api_key ⇒ String readonly
- #base_url ⇒ String readonly
-
#tenant_id ⇒ String
readonly
The tenant identifier for multi-tenant organisations.
- #timeout_in_seconds ⇒ Long readonly
Instance Method Summary collapse
Constructor Details
#initialize(base_url: nil, api_key: nil, tenant_id: nil, additional_headers: nil, additional_query_parameters: nil, additional_body_parameters: nil, timeout_in_seconds: nil) ⇒ TrophyApiClient::RequestOptions
136 137 138 139 140 141 142 143 144 145 |
# File 'lib/requests.rb', line 136 def initialize(base_url: nil, api_key: nil, tenant_id: nil, additional_headers: nil, additional_query_parameters: nil, additional_body_parameters: nil, timeout_in_seconds: nil) @base_url = base_url @api_key = api_key @tenant_id = tenant_id @additional_headers = additional_headers @additional_query_parameters = additional_query_parameters @additional_body_parameters = additional_body_parameters @timeout_in_seconds = timeout_in_seconds end |
Instance Attribute Details
#additional_body_parameters ⇒ Hash{String => Object} (readonly)
122 123 124 |
# File 'lib/requests.rb', line 122 def additional_body_parameters @additional_body_parameters end |
#additional_headers ⇒ Hash{String => Object} (readonly)
118 119 120 |
# File 'lib/requests.rb', line 118 def additional_headers @additional_headers end |
#additional_query_parameters ⇒ Hash{String => Object} (readonly)
120 121 122 |
# File 'lib/requests.rb', line 120 def additional_query_parameters @additional_query_parameters end |
#api_key ⇒ String (readonly)
112 113 114 |
# File 'lib/requests.rb', line 112 def api_key @api_key end |
#base_url ⇒ String (readonly)
110 111 112 |
# File 'lib/requests.rb', line 110 def base_url @base_url end |
#tenant_id ⇒ String (readonly)
Returns The tenant identifier for multi-tenant organisations. Required when the organisation has multi-tenancy enabled. The value should be your internal ID for the tenant. Ignored for single-tenant organisations.
116 117 118 |
# File 'lib/requests.rb', line 116 def tenant_id @tenant_id end |
#timeout_in_seconds ⇒ Long (readonly)
124 125 126 |
# File 'lib/requests.rb', line 124 def timeout_in_seconds @timeout_in_seconds end |