Class: DocuSign_Rooms::RegionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_rooms/api/regions_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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 Creates a new region for a company

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    The information required to create a new region for the caller’s company (optional parameter)

Returns:



44
45
46
47
# File 'lib/docusign_rooms/api/regions_api.rb', line 44

def create_region(, body)
  data, _status_code, _headers = create_region_with_http_info(,  body)
  return data
end

#create_region_with_http_info(account_id, body) ⇒ Array<(Region, Fixnum, Hash)>

Creates a new region for a company Creates a new region for a company

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    The information required to create a new region for the caller’s company (optional parameter)

Returns:

  • (Array<(Region, Fixnum, Hash)>)

    Region data, response status code and response headers



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(, 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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/regions".sub('{format}','json').sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])

  # 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. Delete a region.

Parameters:

  • region_id

    Id of the desired region

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (nil)


97
98
99
100
# File 'lib/docusign_rooms/api/regions_api.rb', line 97

def delete_region(region_id, )
  delete_region_with_http_info(region_id, )
  return nil
end

#delete_region_with_http_info(region_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>

Delete a region. Delete a region.

Parameters:

  • region_id

    Id of the desired region

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
143
144
# File 'lib/docusign_rooms/api/regions_api.rb', line 107

def delete_region_with_http_info(region_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/regions/{regionId}".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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 Get information about the region with the given regionId

Parameters:

  • region_id

    Id of the desired region

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:



151
152
153
154
# File 'lib/docusign_rooms/api/regions_api.rb', line 151

def get_region(region_id, )
  data, _status_code, _headers = get_region_with_http_info(region_id, )
  return data
end

#get_region_reference_counts(region_id, account_id) ⇒ RegionReferenceCountList

Get region reference counts. This method returns a list of each type of object and the number of objects of that type referencing the specified region.

Parameters:

  • region_id

    Id of the desired region

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:



206
207
208
209
# File 'lib/docusign_rooms/api/regions_api.rb', line 206

def get_region_reference_counts(region_id, )
  data, _status_code, _headers = get_region_reference_counts_with_http_info(region_id, )
  return data
end

#get_region_reference_counts_with_http_info(region_id, account_id) ⇒ Array<(RegionReferenceCountList, Fixnum, Hash)>

Get region reference counts. This method returns a list of each type of object and the number of objects of that type referencing the specified region.

Parameters:

  • region_id

    Id of the desired region

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (Array<(RegionReferenceCountList, Fixnum, Hash)>)

    RegionReferenceCountList data, response status code and response headers



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
249
250
251
252
253
254
# File 'lib/docusign_rooms/api/regions_api.rb', line 216

def get_region_reference_counts_with_http_info(region_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/regions/{regionId}/reference_counts".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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 Get information about the region with the given regionId

Parameters:

  • region_id

    Id of the desired region

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (Array<(Region, Fixnum, Hash)>)

    Region data, response status code and response headers



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
196
197
198
199
# File 'lib/docusign_rooms/api/regions_api.rb', line 161

def get_region_with_http_info(region_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/regions/{regionId}".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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 regions. Returns a list of regions that are associated with a Rooms account.

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • DocuSign_Rooms::GetRegionsOptions

    Options for modifying the behavior of the function.

Returns:



261
262
263
264
# File 'lib/docusign_rooms/api/regions_api.rb', line 261

def get_regions(, options = DocuSign_Rooms::GetRegionsOptions.default)
  data, _status_code, _headers = get_regions_with_http_info(, options)
  return data
end

#get_regions_with_http_info(account_id, options = DocuSign_Rooms::GetRegionsOptions.default) ⇒ Array<(RegionSummaryList, Fixnum, Hash)>

Get account regions. Returns a list of regions that are associated with a Rooms account.

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • DocuSign_Rooms::GetRegionsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(RegionSummaryList, Fixnum, Hash)>)

    RegionSummaryList data, response status code and response headers



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
303
304
305
306
307
308
309
310
# File 'lib/docusign_rooms/api/regions_api.rb', line 271

def get_regions_with_http_info(, options = 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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/regions".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'startPosition'] = options.start_position if !options.start_position.nil?
  query_params[:'managedOnly'] = options.managed_only if !options.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', 'application/xml', 'text/xml'])
  # 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 = 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