Class: DocuSign_Rooms::RegionsApi
- Inherits:
-
Object
- Object
- DocuSign_Rooms::RegionsApi
- Defined in:
- lib/docusign_rooms/api/regions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_region(account_id, body) ⇒ Region
Creates a new region for a company.
-
#create_region_with_http_info(account_id, body) ⇒ Array<(Region, Fixnum, Hash)>
Creates a new region for a company.
-
#delete_region(region_id, account_id) ⇒ nil
Delete a region.
-
#delete_region_with_http_info(region_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>
Delete a region.
-
#get_region(region_id, account_id) ⇒ Region
Get information about the region with the given regionId.
-
#get_region_reference_counts(region_id, account_id) ⇒ RegionReferenceCountList
Get region reference counts.
-
#get_region_reference_counts_with_http_info(region_id, account_id) ⇒ Array<(RegionReferenceCountList, Fixnum, Hash)>
Get region reference counts.
-
#get_region_with_http_info(region_id, account_id) ⇒ Array<(Region, Fixnum, Hash)>
Get information about the region with the given regionId.
-
#get_regions(account_id, options = DocuSign_Rooms::GetRegionsOptions.default) ⇒ RegionSummaryList
Get account.
-
#get_regions_with_http_info(account_id, options = DocuSign_Rooms::GetRegionsOptions.default) ⇒ Array<(RegionSummaryList, Fixnum, Hash)>
Get account.
-
#initialize(api_client = RegionsApi.default) ⇒ RegionsApi
constructor
A new instance of RegionsApi.
Constructor Details
#initialize(api_client = RegionsApi.default) ⇒ RegionsApi
Returns a new instance of RegionsApi.
35 36 37 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 35 def initialize(api_client = RegionsApi.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
33 34 35 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 33 def api_client @api_client end |
Instance Method Details
#create_region(account_id, body) ⇒ Region
Creates a new region for a company
44 45 46 47 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 44 def create_region(account_id, body) data, _status_code, _headers = create_region_with_http_info(account_id, body) return data end |
#create_region_with_http_info(account_id, body) ⇒ Array<(Region, Fixnum, Hash)>
Creates a new region for a company
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 54 def create_region_with_http_info(account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RegionsApi.create_region ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.create_region" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/regions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Region') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#create_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_region(region_id, account_id) ⇒ nil
Delete a region.
97 98 99 100 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 97 def delete_region(region_id, account_id) delete_region_with_http_info(region_id, account_id) return nil end |
#delete_region_with_http_info(region_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>
Delete a region.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 107 def delete_region_with_http_info(region_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RegionsApi.delete_region ..." end # verify the required parameter 'region_id' is set fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionsApi.delete_region" if region_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.delete_region" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/regions/{regionId}".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#delete_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_region(region_id, account_id) ⇒ Region
Get information about the region with the given regionId
149 150 151 152 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 149 def get_region(region_id, account_id) data, _status_code, _headers = get_region_with_http_info(region_id, account_id) return data end |
#get_region_reference_counts(region_id, account_id) ⇒ RegionReferenceCountList
Get region reference counts.
202 203 204 205 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 202 def get_region_reference_counts(region_id, account_id) data, _status_code, _headers = get_region_reference_counts_with_http_info(region_id, account_id) return data end |
#get_region_reference_counts_with_http_info(region_id, account_id) ⇒ Array<(RegionReferenceCountList, Fixnum, Hash)>
Get region reference counts.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 212 def get_region_reference_counts_with_http_info(region_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RegionsApi.get_region_reference_counts ..." end # verify the required parameter 'region_id' is set fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionsApi.get_region_reference_counts" if region_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.get_region_reference_counts" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/regions/{regionId}/reference_counts".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RegionReferenceCountList') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#get_region_reference_counts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_region_with_http_info(region_id, account_id) ⇒ Array<(Region, Fixnum, Hash)>
Get information about the region with the given regionId
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 159 def get_region_with_http_info(region_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RegionsApi.get_region ..." end # verify the required parameter 'region_id' is set fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionsApi.get_region" if region_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.get_region" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/regions/{regionId}".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Region') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#get_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_regions(account_id, options = DocuSign_Rooms::GetRegionsOptions.default) ⇒ RegionSummaryList
Get account
255 256 257 258 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 255 def get_regions(account_id, = DocuSign_Rooms::GetRegionsOptions.default) data, _status_code, _headers = get_regions_with_http_info(account_id, ) return data end |
#get_regions_with_http_info(account_id, options = DocuSign_Rooms::GetRegionsOptions.default) ⇒ Array<(RegionSummaryList, Fixnum, Hash)>
Get account
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/docusign_rooms/api/regions_api.rb', line 265 def get_regions_with_http_info(account_id, = DocuSign_Rooms::GetRegionsOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RegionsApi.get_regions ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.get_regions" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/regions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'count'] = .count if !.count.nil? query_params[:'startPosition'] = .start_position if !.start_position.nil? query_params[:'managedOnly'] = .managed_only if !.managed_only.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RegionSummaryList') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegionsApi#get_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |