Class: DocuSign_Rooms::OfficesApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = OfficesApi.default) ⇒ OfficesApi

Returns a new instance of OfficesApi.



38
39
40
# File 'lib/docusign_rooms/api/offices_api.rb', line 38

def initialize(api_client = OfficesApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



36
37
38
# File 'lib/docusign_rooms/api/offices_api.rb', line 36

def api_client
  @api_client
end

Instance Method Details

#create_office(account_id, body) ⇒ Office

Create an office.

Parameters:

  • account_id
  • body (optional parameter)

Returns:



47
48
49
50
# File 'lib/docusign_rooms/api/offices_api.rb', line 47

def create_office(, body)
  data, _status_code, _headers = create_office_with_http_info(,  body)
  return data
end

#create_office_with_http_info(account_id, body) ⇒ Array<(Office, Fixnum, Hash)>

Create an office.

Parameters:

  • account_id
  • body (optional parameter)

Returns:

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

    Office data, response status code and response headers



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
91
92
93
# File 'lib/docusign_rooms/api/offices_api.rb', line 57

def create_office_with_http_info(, body)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OfficesApi.create_office ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.create_office" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/offices".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'])
  # 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 => 'Office')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OfficesApi#create_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_office(office_id, account_id) ⇒ nil

Delete an office.

Parameters:

  • office_id
  • account_id

Returns:

  • (nil)


100
101
102
103
# File 'lib/docusign_rooms/api/offices_api.rb', line 100

def delete_office(office_id, )
  delete_office_with_http_info(office_id, )
  return nil
end

#delete_office_with_http_info(office_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>

Delete an office.

Parameters:

  • office_id
  • account_id

Returns:

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

    nil, response status code and response headers



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
145
# File 'lib/docusign_rooms/api/offices_api.rb', line 110

def delete_office_with_http_info(office_id, )
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OfficesApi.delete_office ..."
  end
  # verify the required parameter 'office_id' is set
  fail ArgumentError, "Missing the required parameter 'office_id' when calling OfficesApi.delete_office" if office_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.delete_office" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/offices/{officeId}".sub('{format}','json').sub('{' + 'officeId' + '}', office_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'])

  # 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: OfficesApi#delete_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_office(office_id, account_id) ⇒ Office

Get information about the office with the given officeId.

Parameters:

  • office_id
  • account_id

Returns:



152
153
154
155
# File 'lib/docusign_rooms/api/offices_api.rb', line 152

def get_office(office_id, )
  data, _status_code, _headers = get_office_with_http_info(office_id, )
  return data
end

#get_office_with_http_info(office_id, account_id) ⇒ Array<(Office, Fixnum, Hash)>

Get information about the office with the given officeId.

Parameters:

  • office_id
  • account_id

Returns:

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

    Office data, response status code and response headers



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
# File 'lib/docusign_rooms/api/offices_api.rb', line 162

def get_office_with_http_info(office_id, )
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OfficesApi.get_office ..."
  end
  # verify the required parameter 'office_id' is set
  fail ArgumentError, "Missing the required parameter 'office_id' when calling OfficesApi.get_office" if office_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.get_office" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/offices/{officeId}".sub('{format}','json').sub('{' + 'officeId' + '}', office_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'])

  # 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 => 'Office')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OfficesApi#get_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_offices(account_id, options = DocuSign_Rooms::GetOfficesOptions.default) ⇒ OfficeSummaryList

Get all

Parameters:

  • account_id
  • DocuSign_Rooms::GetOfficesOptions

    Options for modifying the behavior of the function.

Returns:



205
206
207
208
# File 'lib/docusign_rooms/api/offices_api.rb', line 205

def get_offices(, options = DocuSign_Rooms::GetOfficesOptions.default)
  data, _status_code, _headers = get_offices_with_http_info(, options)
  return data
end

#get_offices_with_http_info(account_id, options = DocuSign_Rooms::GetOfficesOptions.default) ⇒ Array<(OfficeSummaryList, Fixnum, Hash)>

Get all

Parameters:

  • account_id
  • DocuSign_Rooms::GetOfficesOptions

    Options for modifying the behavior of the function.

Returns:

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

    OfficeSummaryList data, response status code and response headers



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

def get_offices_with_http_info(, options = DocuSign_Rooms::GetOfficesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OfficesApi.get_offices ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.get_offices" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/offices".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[:'onlyAccessible'] = options.only_accessible if !options.only_accessible.nil?
  query_params[:'search'] = options.search if !options.search.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 => 'OfficeSummaryList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OfficesApi#get_offices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_reference_counts(office_id, account_id) ⇒ OfficeReferenceCountList

Lists the number of objects of each type that reference the office.

Parameters:

  • office_id
  • account_id

Returns:



260
261
262
263
# File 'lib/docusign_rooms/api/offices_api.rb', line 260

def get_reference_counts(office_id, )
  data, _status_code, _headers = get_reference_counts_with_http_info(office_id, )
  return data
end

#get_reference_counts_with_http_info(office_id, account_id) ⇒ Array<(OfficeReferenceCountList, Fixnum, Hash)>

Lists the number of objects of each type that reference the office.

Parameters:

  • office_id
  • account_id

Returns:

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

    OfficeReferenceCountList data, response status code and response headers



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
303
304
305
306
# File 'lib/docusign_rooms/api/offices_api.rb', line 270

def get_reference_counts_with_http_info(office_id, )
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OfficesApi.get_reference_counts ..."
  end
  # verify the required parameter 'office_id' is set
  fail ArgumentError, "Missing the required parameter 'office_id' when calling OfficesApi.get_reference_counts" if office_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.get_reference_counts" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/offices/{officeId}/reference_counts".sub('{format}','json').sub('{' + 'officeId' + '}', office_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'])

  # 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 => 'OfficeReferenceCountList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OfficesApi#get_reference_counts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end