Class: Propertyware::VendorsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/propertyware/api/vendors_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VendorsApi

Returns a new instance of VendorsApi.



19
20
21
# File 'lib/propertyware/api/vendors_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/propertyware/api/vendors_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_vendor(save_vendor, opts = {}) ⇒ Vendor

Create a vendor (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program. Please reach out to support if you’d like to be included.</p> Creates a vendor.<br/><br/>Required permission:<br/><span class="permissionBlock">VENDORS</span> - Write

Parameters:

  • save_vendor (SaveVendor)

    saveVendor

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/propertyware/api/vendors_api.rb', line 27

def create_vendor(save_vendor, opts = {})
  data, _status_code, _headers = create_vendor_with_http_info(save_vendor, opts)
  data
end

#create_vendor_with_http_info(save_vendor, opts = {}) ⇒ Array<(Vendor, Integer, Hash)>

Create a vendor (BETA) &lt;p class&#x3D;&quot;betaError&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a vendor.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;VENDORS&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;

Parameters:

  • save_vendor (SaveVendor)

    saveVendor

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Vendor, Integer, Hash)>)

    Vendor data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
# File 'lib/propertyware/api/vendors_api.rb', line 37

def create_vendor_with_http_info(save_vendor, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.create_vendor ...'
  end
  # verify the required parameter 'save_vendor' is set
  if @api_client.config.client_side_validation && save_vendor.nil?
    fail ArgumentError, "Missing the required parameter 'save_vendor' when calling VendorsApi.create_vendor"
  end
  # resource path
  local_var_path = '/vendors'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(save_vendor)

  # return_type
  return_type = opts[:debug_return_type] || 'Vendor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"VendorsApi.create_vendor",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#create_vendor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_vendors(save_vendor, opts = {}) ⇒ Array<RESTAPIBulkSuccessResponse>

Create Vendors in bulk (BETA) <p class="betaError">Note: Write access is only available to customers who have opted in to our beta program. Please reach out to support if you’d like to be included.</p> Creates Vendors in bulk.<br/><br/>Required permission:<br/><span class="permissionBlock">VENDORS</span> - Write

Parameters:

  • save_vendor (Array<SaveVendor>)

    saveVendor

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



95
96
97
98
# File 'lib/propertyware/api/vendors_api.rb', line 95

def create_vendors(save_vendor, opts = {})
  data, _status_code, _headers = create_vendors_with_http_info(save_vendor, opts)
  data
end

#create_vendors_with_http_info(save_vendor, opts = {}) ⇒ Array<(Array<RESTAPIBulkSuccessResponse>, Integer, Hash)>

Create Vendors in bulk (BETA) &lt;p class&#x3D;&quot;betaError&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates Vendors in bulk.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;VENDORS&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;

Parameters:

  • save_vendor (Array<SaveVendor>)

    saveVendor

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<RESTAPIBulkSuccessResponse>, Integer, Hash)>)

    Array<RESTAPIBulkSuccessResponse> data, response status code and response headers



105
106
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
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/propertyware/api/vendors_api.rb', line 105

def create_vendors_with_http_info(save_vendor, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.create_vendors ...'
  end
  # verify the required parameter 'save_vendor' is set
  if @api_client.config.client_side_validation && save_vendor.nil?
    fail ArgumentError, "Missing the required parameter 'save_vendor' when calling VendorsApi.create_vendors"
  end
  # resource path
  local_var_path = '/vendors/bulk'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(save_vendor)

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RESTAPIBulkSuccessResponse>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"VendorsApi.create_vendors",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#create_vendors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor(vendor_id, opts = {}) ⇒ Vendor

Retrieve a vendor Retrieves a specific vendor.<br/><br/>Required permission:<br/><span class="permissionBlock">VENDORS</span> - Read

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_custom_fields (Boolean)

    includeCustomFields (default to true)

Returns:



164
165
166
167
# File 'lib/propertyware/api/vendors_api.rb', line 164

def get_vendor(vendor_id, opts = {})
  data, _status_code, _headers = get_vendor_with_http_info(vendor_id, opts)
  data
end

#get_vendor_account(vendor_id, opts = {}) ⇒ Account

Retrieve vendor GL account (BETA) <p class="betaWarning">Note: This operation is still in beta and might be subject to breaking changes. Production integrations should be avoided at this stage.</p> Retrieves the default general ledger account of a vendor.<br/><br/>Required permission:<br/><span class="permissionBlock">VENDORS</span> - Read

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



229
230
231
232
# File 'lib/propertyware/api/vendors_api.rb', line 229

def (vendor_id, opts = {})
  data, _status_code, _headers = (vendor_id, opts)
  data
end

#get_vendor_account_with_http_info(vendor_id, opts = {}) ⇒ Array<(Account, Integer, Hash)>

Retrieve vendor GL account (BETA) &lt;p class&#x3D;&quot;betaWarning&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;This operation is still in beta and might be subject to breaking changes. Production integrations should be avoided at this stage.&lt;/p&gt; Retrieves the default general ledger account of a vendor.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;VENDORS&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Account, Integer, Hash)>)

    Account data, response status code and response headers



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/propertyware/api/vendors_api.rb', line 239

def (vendor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_account ...'
  end
  # verify the required parameter 'vendor_id' is set
  if @api_client.config.client_side_validation && vendor_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_id' when calling VendorsApi.get_vendor_account"
  end
  # resource path
  local_var_path = '/vendors/{vendorID}/account'.sub('{' + 'vendorID' + '}', CGI.escape(vendor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Account'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_account",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#get_vendor_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_conversation(vendor_id, conversation_id, opts = {}) ⇒ Conversation

Retrieve a vendor conversation Retrieves a specific vendor conversation.<br/><br/>Required permission:<br/><span class="permissionBlock">VENDORS</span> - Read

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • conversation_id (Integer)

    Conversation ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



293
294
295
296
# File 'lib/propertyware/api/vendors_api.rb', line 293

def get_vendor_conversation(vendor_id, conversation_id, opts = {})
  data, _status_code, _headers = get_vendor_conversation_with_http_info(vendor_id, conversation_id, opts)
  data
end

#get_vendor_conversation_with_http_info(vendor_id, conversation_id, opts = {}) ⇒ Array<(Conversation, Integer, Hash)>

Retrieve a vendor conversation Retrieves a specific vendor conversation.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;VENDORS&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • conversation_id (Integer)

    Conversation ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Conversation, Integer, Hash)>)

    Conversation data, response status code and response headers



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/propertyware/api/vendors_api.rb', line 304

def get_vendor_conversation_with_http_info(vendor_id, conversation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_conversation ...'
  end
  # verify the required parameter 'vendor_id' is set
  if @api_client.config.client_side_validation && vendor_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_id' when calling VendorsApi.get_vendor_conversation"
  end
  # verify the required parameter 'conversation_id' is set
  if @api_client.config.client_side_validation && conversation_id.nil?
    fail ArgumentError, "Missing the required parameter 'conversation_id' when calling VendorsApi.get_vendor_conversation"
  end
  # resource path
  local_var_path = '/vendors/{vendorID}/conversations/{conversationID}'.sub('{' + 'vendorID' + '}', CGI.escape(vendor_id.to_s)).sub('{' + 'conversationID' + '}', CGI.escape(conversation_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Conversation'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_conversation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#get_vendor_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_conversations(vendor_id, opts = {}) ⇒ Array<Conversation>

Retrieve all vendor conversations Retrieves all the conversations of a vendor.<br/><br/>Required permission:<br/><span class="permissionBlock">VENDORS</span> - Read <br/><br/>Sortable by: createddate, lastmodifieddatetime, id

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)

  • :last_modified_date_time_start (Time)

    Filters results to any item modified on or after the date time specified.

  • :last_modified_date_time_end (Time)

    Filters results to any item modified on or prior to the date time specified.

  • :orderby (String)

    Indicates the field(s) and direction to sort the results in the response.

  • :type (String)

    Filters results by the conversation type.

Returns:



367
368
369
370
# File 'lib/propertyware/api/vendors_api.rb', line 367

def get_vendor_conversations(vendor_id, opts = {})
  data, _status_code, _headers = get_vendor_conversations_with_http_info(vendor_id, opts)
  data
end

#get_vendor_conversations_with_http_info(vendor_id, opts = {}) ⇒ Array<(Array<Conversation>, Integer, Hash)>

Retrieve all vendor conversations Retrieves all the conversations of a vendor.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;VENDORS&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)

  • :last_modified_date_time_start (Time)

    Filters results to any item modified on or after the date time specified.

  • :last_modified_date_time_end (Time)

    Filters results to any item modified on or prior to the date time specified.

  • :orderby (String)

    Indicates the field(s) and direction to sort the results in the response.

  • :type (String)

    Filters results by the conversation type.

Returns:

  • (Array<(Array<Conversation>, Integer, Hash)>)

    Array<Conversation> data, response status code and response headers



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/propertyware/api/vendors_api.rb', line 383

def get_vendor_conversations_with_http_info(vendor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_conversations ...'
  end
  # verify the required parameter 'vendor_id' is set
  if @api_client.config.client_side_validation && vendor_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_id' when calling VendorsApi.get_vendor_conversations"
  end
  allowable_values = ["MANAGEMENT_TEAM", "OWNER", "TENANT"]
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/vendors/{vendorID}/conversations'.sub('{' + 'vendorID' + '}', CGI.escape(vendor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
  query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Conversation>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_conversations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#get_vendor_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_with_http_info(vendor_id, opts = {}) ⇒ Array<(Vendor, Integer, Hash)>

Retrieve a vendor Retrieves a specific vendor.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;VENDORS&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;

Parameters:

  • vendor_id (Integer)

    Vendor ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_custom_fields (Boolean)

    includeCustomFields (default to true)

Returns:

  • (Array<(Vendor, Integer, Hash)>)

    Vendor data, response status code and response headers



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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/propertyware/api/vendors_api.rb', line 175

def get_vendor_with_http_info(vendor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor ...'
  end
  # verify the required parameter 'vendor_id' is set
  if @api_client.config.client_side_validation && vendor_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_id' when calling VendorsApi.get_vendor"
  end
  # resource path
  local_var_path = '/vendors/{vendorID}'.sub('{' + 'vendorID' + '}', CGI.escape(vendor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'includeCustomFields'] = opts[:'include_custom_fields'] if !opts[:'include_custom_fields'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Vendor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#get_vendor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendors(opts = {}) ⇒ Array<Vendor>

Retrieve all vendors Retrieves a list of vendors.<br/><br/>Required permission:<br/><span class="permissionBlock">VENDORS</span> - Read <br/><br/>Sortable by: createddate, vendortype, lastmodifieddatetime, id

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)

  • :last_modified_date_time_start (Time)

    Filters results to any item modified on or after the date time specified.

  • :last_modified_date_time_end (Time)

    Filters results to any item modified on or prior to the date time specified.

  • :orderby (String)

    Indicates the field(s) and direction to sort the results in the response.

  • :active (Boolean)

    Filters results by the vendor&#39;s status. If no value is specified, vendors with any status will be returned.

  • :type (String)

    Filters results to units with a specific type.

  • :include_custom_fields (Boolean)

    includeCustomFields (default to false)

Returns:



453
454
455
456
# File 'lib/propertyware/api/vendors_api.rb', line 453

def get_vendors(opts = {})
  data, _status_code, _headers = get_vendors_with_http_info(opts)
  data
end

#get_vendors_with_http_info(opts = {}) ⇒ Array<(Array<Vendor>, Integer, Hash)>

Retrieve all vendors Retrieves a list of vendors.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;VENDORS&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;vendortype&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)

  • :last_modified_date_time_start (Time)

    Filters results to any item modified on or after the date time specified.

  • :last_modified_date_time_end (Time)

    Filters results to any item modified on or prior to the date time specified.

  • :orderby (String)

    Indicates the field(s) and direction to sort the results in the response.

  • :active (Boolean)

    Filters results by the vendor&#39;s status. If no value is specified, vendors with any status will be returned.

  • :type (String)

    Filters results to units with a specific type.

  • :include_custom_fields (Boolean)

    includeCustomFields (default to false)

Returns:

  • (Array<(Array<Vendor>, Integer, Hash)>)

    Array<Vendor> data, response status code and response headers



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/propertyware/api/vendors_api.rb', line 470

def get_vendors_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendors ...'
  end
  # resource path
  local_var_path = '/vendors'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
  query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'includeCustomFields'] = opts[:'include_custom_fields'] if !opts[:'include_custom_fields'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Vendor>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendors",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#get_vendors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end