Class: Buildium::VendorsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/buildium-ruby/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/buildium-ruby/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/buildium-ruby/api/vendors_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_vendor(vendor_post_message, opts = {}) ⇒ VendorMessage

Create a vendor Creates a vendor. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/buildium-ruby/api/vendors_api.rb', line 27

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

#create_vendor_category(vendor_category_save_message, opts = {}) ⇒ VendorCategoryMessage

Create a vendor category Creates a vendor category. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` `Edit`

Parameters:

Returns:



95
96
97
98
# File 'lib/buildium-ruby/api/vendors_api.rb', line 95

def create_vendor_category(vendor_category_save_message, opts = {})
  data, _status_code, _headers = create_vendor_category_with_http_info(vendor_category_save_message, opts)
  data
end

#create_vendor_category_with_http_info(vendor_category_save_message, opts = {}) ⇒ Array<(VendorCategoryMessage, Integer, Hash)>

Create a vendor category Creates a vendor category. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

    VendorCategoryMessage 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/buildium-ruby/api/vendors_api.rb', line 105

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

  # 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(vendor_category_save_message)

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

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

  new_options = opts.merge(
    :operation => :"VendorsApi.create_vendor_category",
    :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_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_vendor_credit(vendor_id, vendor_credit_post_message, opts = {}) ⇒ VendorCreditMessage

Create a credit Creates a credit. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - ‘View` `Edit`

Parameters:

  • vendor_id (Integer)
  • vendor_credit_post_message (VendorCreditPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



164
165
166
167
# File 'lib/buildium-ruby/api/vendors_api.rb', line 164

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

#create_vendor_credit_with_http_info(vendor_id, vendor_credit_post_message, opts = {}) ⇒ Array<(VendorCreditMessage, Integer, Hash)>

Create a credit Creates a credit. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; Bills&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • vendor_id (Integer)
  • vendor_credit_post_message (VendorCreditPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    VendorCreditMessage 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
223
224
225
226
227
228
229
230
# File 'lib/buildium-ruby/api/vendors_api.rb', line 175

def create_vendor_credit_with_http_info(vendor_id, vendor_credit_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.create_vendor_credit ...'
  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.create_vendor_credit"
  end
  # verify the required parameter 'vendor_credit_post_message' is set
  if @api_client.config.client_side_validation && vendor_credit_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_credit_post_message' when calling VendorsApi.create_vendor_credit"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/credits'.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'])
  # 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(vendor_credit_post_message)

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

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

  new_options = opts.merge(
    :operation => :"VendorsApi.create_vendor_credit",
    :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_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_vendor_note(vendor_id, note_post_message, opts = {}) ⇒ NoteMessage

Create a note Creates a vendor note. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` `Edit`

Parameters:

  • vendor_id (Integer)
  • note_post_message (NotePostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



238
239
240
241
# File 'lib/buildium-ruby/api/vendors_api.rb', line 238

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

#create_vendor_note_with_http_info(vendor_id, note_post_message, opts = {}) ⇒ Array<(NoteMessage, Integer, Hash)>

Create a note Creates a vendor note. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • vendor_id (Integer)
  • note_post_message (NotePostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    NoteMessage data, response status code and response headers



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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/buildium-ruby/api/vendors_api.rb', line 249

def create_vendor_note_with_http_info(vendor_id, note_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.create_vendor_note ...'
  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.create_vendor_note"
  end
  # verify the required parameter 'note_post_message' is set
  if @api_client.config.client_side_validation && note_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'note_post_message' when calling VendorsApi.create_vendor_note"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/notes'.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'])
  # 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(note_post_message)

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

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

  new_options = opts.merge(
    :operation => :"VendorsApi.create_vendor_note",
    :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_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_vendor_refund(vendor_id, vendor_refund_post_message, opts = {}) ⇒ VendorRefundMessage

Create a refund Creates a refund. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` `Edit` <span class="permissionBlock">Accounting &gt; Bank Accounts</span> - `View`

Parameters:

  • vendor_id (Integer)
  • vendor_refund_post_message (VendorRefundPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



312
313
314
315
# File 'lib/buildium-ruby/api/vendors_api.rb', line 312

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

#create_vendor_refund_with_http_info(vendor_id, vendor_refund_post_message, opts = {}) ⇒ Array<(VendorRefundMessage, Integer, Hash)>

Create a refund Creates a refund. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; Bank Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • vendor_id (Integer)
  • vendor_refund_post_message (VendorRefundPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    VendorRefundMessage data, response status code and response headers



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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'lib/buildium-ruby/api/vendors_api.rb', line 323

def create_vendor_refund_with_http_info(vendor_id, vendor_refund_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.create_vendor_refund ...'
  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.create_vendor_refund"
  end
  # verify the required parameter 'vendor_refund_post_message' is set
  if @api_client.config.client_side_validation && vendor_refund_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_refund_post_message' when calling VendorsApi.create_vendor_refund"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/refunds'.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'])
  # 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(vendor_refund_post_message)

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

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

  new_options = opts.merge(
    :operation => :"VendorsApi.create_vendor_refund",
    :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_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_vendor_with_http_info(vendor_post_message, opts = {}) ⇒ Array<(VendorMessage, Integer, Hash)>

Create a vendor Creates a vendor. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    VendorMessage 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/buildium-ruby/api/vendors_api.rb', line 37

def create_vendor_with_http_info(vendor_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.create_vendor ...'
  end
  # verify the required parameter 'vendor_post_message' is set
  if @api_client.config.client_side_validation && vendor_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_post_message' when calling VendorsApi.create_vendor"
  end
  # resource path
  local_var_path = '/v1/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(vendor_post_message)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['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

#get_all_vendor_categories(opts = {}) ⇒ Array<VendorCategoryMessage>

Retrieve all vendor categories Retrieves a list of vendor categories. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



387
388
389
390
# File 'lib/buildium-ruby/api/vendors_api.rb', line 387

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

#get_all_vendor_categories_with_http_info(opts = {}) ⇒ Array<(Array<VendorCategoryMessage>, Integer, Hash)>

Retrieve all vendor categories Retrieves a list of vendor categories. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



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
440
441
442
443
444
# File 'lib/buildium-ruby/api/vendors_api.rb', line 399

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

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<VendorCategoryMessage>'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_all_vendor_categories",
    :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_all_vendor_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_vendor_transactions(vendor_id, transactiondatefrom, transactiondateto, opts = {}) ⇒ Array<VendorTransactionMessage>

Retrieve all transactions Retrieves all transactions for a given vendor. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` <br /><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - `View`

Parameters:

  • vendor_id (Integer)
  • transactiondatefrom (Date)

    Filters results to any vendor transaction whose entry date that is greater than or equal to the specified value. The maximum date range is 365 days.

  • transactiondateto (Date)

    Filters results to any vendor transaction whose entry date is less than or equal to the specified value. The maximum date range is 365 days.

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

    the optional parameters

Options Hash (opts):

  • :transactiontypes (Array<String>)

    Filters results to any vendor transaction whose vendor transaction type matches the specified status. If no type is specified, vendor transactions with any type will be returned.

  • :referencenumber (String)

    Filters results to vendor transaction whose reference number contains the specified value. The reference number cannot exceed 40 characters.

  • :memo (String)

    Filters results to vendor transaction whose memo contains the specified value. The memo cannot exceed 40 characters.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



459
460
461
462
# File 'lib/buildium-ruby/api/vendors_api.rb', line 459

def get_all_vendor_transactions(vendor_id, transactiondatefrom, transactiondateto, opts = {})
  data, _status_code, _headers = get_all_vendor_transactions_with_http_info(vendor_id, transactiondatefrom, transactiondateto, opts)
  data
end

#get_all_vendor_transactions_with_http_info(vendor_id, transactiondatefrom, transactiondateto, opts = {}) ⇒ Array<(Array<VendorTransactionMessage>, Integer, Hash)>

Retrieve all transactions Retrieves all transactions for a given vendor. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • vendor_id (Integer)
  • transactiondatefrom (Date)

    Filters results to any vendor transaction whose entry date that is greater than or equal to the specified value. The maximum date range is 365 days.

  • transactiondateto (Date)

    Filters results to any vendor transaction whose entry date is less than or equal to the specified value. The maximum date range is 365 days.

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

    the optional parameters

Options Hash (opts):

  • :transactiontypes (Array<String>)

    Filters results to any vendor transaction whose vendor transaction type matches the specified status. If no type is specified, vendor transactions with any type will be returned.

  • :referencenumber (String)

    Filters results to vendor transaction whose reference number contains the specified value. The reference number cannot exceed 40 characters.

  • :memo (String)

    Filters results to vendor transaction whose memo contains the specified value. The memo cannot exceed 40 characters.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'lib/buildium-ruby/api/vendors_api.rb', line 477

def get_all_vendor_transactions_with_http_info(vendor_id, transactiondatefrom, transactiondateto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_all_vendor_transactions ...'
  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_all_vendor_transactions"
  end
  # verify the required parameter 'transactiondatefrom' is set
  if @api_client.config.client_side_validation && transactiondatefrom.nil?
    fail ArgumentError, "Missing the required parameter 'transactiondatefrom' when calling VendorsApi.get_all_vendor_transactions"
  end
  # verify the required parameter 'transactiondateto' is set
  if @api_client.config.client_side_validation && transactiondateto.nil?
    fail ArgumentError, "Missing the required parameter 'transactiondateto' when calling VendorsApi.get_all_vendor_transactions"
  end
  allowable_values = ["Bill", "Check", "Charge", "Payment", "Credit", "Refund", "ApplyDeposit", "ElectronicFundsTransfer", "Other", "Deposit", "GeneralJournalEntry", "OwnerContribution", "ReversePayment", "ReverseElectronicFundsTransfer", "VendorCredit", "RentalApplicationFeePayment", "ReverseRentalApplicationFeePayment", "ReverseOwnerContribution", "VendorRefund", "UnreversedPayment", "UnreversedElectronicFundsTransfer", "UnreversedOwnerContribution", "UnreversedRentalApplicationFeePayment"]
  if @api_client.config.client_side_validation && opts[:'transactiontypes'] && !opts[:'transactiontypes'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"transactiontypes\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/transactions'.sub('{' + 'vendorId' + '}', CGI.escape(vendor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'transactiondatefrom'] = transactiondatefrom
  query_params[:'transactiondateto'] = transactiondateto
  query_params[:'transactiontypes'] = @api_client.build_collection_param(opts[:'transactiontypes'], :multi) if !opts[:'transactiontypes'].nil?
  query_params[:'referencenumber'] = opts[:'referencenumber'] if !opts[:'referencenumber'].nil?
  query_params[:'memo'] = opts[:'memo'] if !opts[:'memo'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<VendorTransactionMessage>'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_all_vendor_transactions",
    :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_all_vendor_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_vendors(opts = {}) ⇒ Array<VendorMessage>

Retrieve all vendors Retrieves a list of vendors. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :status (String)

    Filters results by the status of the vendor. If no status is specified both &#x60;active&#x60; and &#x60;inactive&#x60; vendors will be returned.

  • :email (String)

    Filters results to any vendor whose email contains the specified value.

  • :website (String)

    Filters results to any vendor whose website contains the specified value.

  • :name (String)

    Filters results to any vendor whose name contains the specified value.

  • :insuranceexpiration (String)

    Filters results to any vendor whose insurance will expire in the specified date range.

  • :phone (String)

    Filters results to any vendor who has a phone number that contains the specified value.

  • :lastupdatedfrom (Time)

    Filters results to any vendors that were updated on or after the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :lastupdatedto (Time)

    Filters results to any vendors that were updated on or before the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



560
561
562
563
# File 'lib/buildium-ruby/api/vendors_api.rb', line 560

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

#get_all_vendors_with_http_info(opts = {}) ⇒ Array<(Array<VendorMessage>, Integer, Hash)>

Retrieve all vendors Retrieves a list of vendors. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :status (String)

    Filters results by the status of the vendor. If no status is specified both &#x60;active&#x60; and &#x60;inactive&#x60; vendors will be returned.

  • :email (String)

    Filters results to any vendor whose email contains the specified value.

  • :website (String)

    Filters results to any vendor whose website contains the specified value.

  • :name (String)

    Filters results to any vendor whose name contains the specified value.

  • :insuranceexpiration (String)

    Filters results to any vendor whose insurance will expire in the specified date range.

  • :phone (String)

    Filters results to any vendor who has a phone number that contains the specified value.

  • :lastupdatedfrom (Time)

    Filters results to any vendors that were updated on or after the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :lastupdatedto (Time)

    Filters results to any vendors that were updated on or before the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
# File 'lib/buildium-ruby/api/vendors_api.rb', line 580

def get_all_vendors_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_all_vendors ...'
  end
  allowable_values = ["Inactive", "Active"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  allowable_values = ["None", "Any", "Expired", "ThirtyDaysOrLess", "SixtyDaysOrLess", "NinetyDaysOrLess"]
  if @api_client.config.client_side_validation && opts[:'insuranceexpiration'] && !allowable_values.include?(opts[:'insuranceexpiration'])
    fail ArgumentError, "invalid value for \"insuranceexpiration\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/vendors'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
  query_params[:'website'] = opts[:'website'] if !opts[:'website'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'insuranceexpiration'] = opts[:'insuranceexpiration'] if !opts[:'insuranceexpiration'].nil?
  query_params[:'phone'] = opts[:'phone'] if !opts[:'phone'].nil?
  query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil?
  query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<VendorMessage>'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_all_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_all_vendors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_by_id(vendor_id, opts = {}) ⇒ VendorMessage

Retrieve a vendor Retrieve a specific vendor. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View`

Parameters:

  • vendor_id (Integer)

    The vendor identifier.

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

    the optional parameters

Returns:



648
649
650
651
# File 'lib/buildium-ruby/api/vendors_api.rb', line 648

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

#get_vendor_by_id_with_http_info(vendor_id, opts = {}) ⇒ Array<(VendorMessage, Integer, Hash)>

Retrieve a vendor Retrieve a specific vendor. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • vendor_id (Integer)

    The vendor identifier.

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

    the optional parameters

Returns:

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

    VendorMessage data, response status code and response headers



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
# File 'lib/buildium-ruby/api/vendors_api.rb', line 658

def get_vendor_by_id_with_http_info(vendor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_by_id ...'
  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_by_id"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}'.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] || 'VendorMessage'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_by_id",
    :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_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_category_by_id(vendor_category_id, opts = {}) ⇒ VendorCategoryMessage

Retrieve a vendor category Retrieves a specific vendor category. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View`

Parameters:

  • vendor_category_id (Integer)

    The vendor category identifier.

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

    the optional parameters

Returns:



711
712
713
714
# File 'lib/buildium-ruby/api/vendors_api.rb', line 711

def get_vendor_category_by_id(vendor_category_id, opts = {})
  data, _status_code, _headers = get_vendor_category_by_id_with_http_info(vendor_category_id, opts)
  data
end

#get_vendor_category_by_id_with_http_info(vendor_category_id, opts = {}) ⇒ Array<(VendorCategoryMessage, Integer, Hash)>

Retrieve a vendor category Retrieves a specific vendor category. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • vendor_category_id (Integer)

    The vendor category identifier.

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

    the optional parameters

Returns:

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

    VendorCategoryMessage data, response status code and response headers



721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
# File 'lib/buildium-ruby/api/vendors_api.rb', line 721

def get_vendor_category_by_id_with_http_info(vendor_category_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_category_by_id ...'
  end
  # verify the required parameter 'vendor_category_id' is set
  if @api_client.config.client_side_validation && vendor_category_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_category_id' when calling VendorsApi.get_vendor_category_by_id"
  end
  # resource path
  local_var_path = '/v1/vendors/categories/{vendorCategoryId}'.sub('{' + 'vendorCategoryId' + '}', CGI.escape(vendor_category_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] || 'VendorCategoryMessage'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_category_by_id",
    :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_category_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_credit(vendor_id, vendor_credit_id, opts = {}) ⇒ VendorCreditMessage

Retrieve a credit Retrieves a credit. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - ‘View`

Parameters:

  • vendor_id (Integer)
  • vendor_credit_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



775
776
777
778
# File 'lib/buildium-ruby/api/vendors_api.rb', line 775

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

#get_vendor_credit_with_http_info(vendor_id, vendor_credit_id, opts = {}) ⇒ Array<(VendorCreditMessage, Integer, Hash)>

Retrieve a credit Retrieves a credit. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; Bills&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • vendor_id (Integer)
  • vendor_credit_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    VendorCreditMessage data, response status code and response headers



786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
# File 'lib/buildium-ruby/api/vendors_api.rb', line 786

def get_vendor_credit_with_http_info(vendor_id, vendor_credit_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_credit ...'
  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_credit"
  end
  # verify the required parameter 'vendor_credit_id' is set
  if @api_client.config.client_side_validation && vendor_credit_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_credit_id' when calling VendorsApi.get_vendor_credit"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/credits/{vendorCreditId}'.sub('{' + 'vendorId' + '}', CGI.escape(vendor_id.to_s)).sub('{' + 'vendorCreditId' + '}', CGI.escape(vendor_credit_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] || 'VendorCreditMessage'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_credit",
    :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_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_note_by_note_id(vendor_id, note_id, opts = {}) ⇒ NoteMessage

Retrieve a note Retrieves a vendor note. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View`

Parameters:

  • vendor_id (Integer)
  • note_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



844
845
846
847
# File 'lib/buildium-ruby/api/vendors_api.rb', line 844

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

#get_vendor_note_by_note_id_with_http_info(vendor_id, note_id, opts = {}) ⇒ Array<(NoteMessage, Integer, Hash)>

Retrieve a note Retrieves a vendor note. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • vendor_id (Integer)
  • note_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    NoteMessage data, response status code and response headers



855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
# File 'lib/buildium-ruby/api/vendors_api.rb', line 855

def get_vendor_note_by_note_id_with_http_info(vendor_id, note_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_note_by_note_id ...'
  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_note_by_note_id"
  end
  # verify the required parameter 'note_id' is set
  if @api_client.config.client_side_validation && note_id.nil?
    fail ArgumentError, "Missing the required parameter 'note_id' when calling VendorsApi.get_vendor_note_by_note_id"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/notes/{noteId}'.sub('{' + 'vendorId' + '}', CGI.escape(vendor_id.to_s)).sub('{' + 'noteId' + '}', CGI.escape(note_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] || 'NoteMessage'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_note_by_note_id",
    :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_note_by_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_notes(vendor_id, opts = {}) ⇒ Array<NoteMessage>

Retrieve all notes Retrieves all vendor notes. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :updateddatetimefrom (Time)

    Filters results to any note whose updated date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :updateddatetimeto (Time)

    Filters results to any note whose updated date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :lastupdatedbyuserid (Integer)

    Filters results to only notes that were last updated by the specified user identifier.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



918
919
920
921
# File 'lib/buildium-ruby/api/vendors_api.rb', line 918

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

#get_vendor_notes_with_http_info(vendor_id, opts = {}) ⇒ Array<(Array<NoteMessage>, Integer, Hash)>

Retrieve all notes Retrieves all vendor notes. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :updateddatetimefrom (Time)

    Filters results to any note whose updated date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :updateddatetimeto (Time)

    Filters results to any note whose updated date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :lastupdatedbyuserid (Integer)

    Filters results to only notes that were last updated by the specified user identifier.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
# File 'lib/buildium-ruby/api/vendors_api.rb', line 934

def get_vendor_notes_with_http_info(vendor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_notes ...'
  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_notes"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/notes'.sub('{' + 'vendorId' + '}', CGI.escape(vendor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'updateddatetimefrom'] = opts[:'updateddatetimefrom'] if !opts[:'updateddatetimefrom'].nil?
  query_params[:'updateddatetimeto'] = opts[:'updateddatetimeto'] if !opts[:'updateddatetimeto'].nil?
  query_params[:'lastupdatedbyuserid'] = opts[:'lastupdatedbyuserid'] if !opts[:'lastupdatedbyuserid'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<NoteMessage>'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_notes",
    :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_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_vendor_refund(vendor_id, vendor_refund_id, opts = {}) ⇒ VendorCreditMessage

Retrieve a refund Retrieves a refund. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View`

Parameters:

  • vendor_id (Integer)
  • vendor_refund_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



994
995
996
997
# File 'lib/buildium-ruby/api/vendors_api.rb', line 994

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

#get_vendor_refund_with_http_info(vendor_id, vendor_refund_id, opts = {}) ⇒ Array<(VendorCreditMessage, Integer, Hash)>

Retrieve a refund Retrieves a refund. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • vendor_id (Integer)
  • vendor_refund_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    VendorCreditMessage data, response status code and response headers



1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
# File 'lib/buildium-ruby/api/vendors_api.rb', line 1005

def get_vendor_refund_with_http_info(vendor_id, vendor_refund_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.get_vendor_refund ...'
  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_refund"
  end
  # verify the required parameter 'vendor_refund_id' is set
  if @api_client.config.client_side_validation && vendor_refund_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_refund_id' when calling VendorsApi.get_vendor_refund"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/refunds/{vendorRefundId}'.sub('{' + 'vendorId' + '}', CGI.escape(vendor_id.to_s)).sub('{' + 'vendorRefundId' + '}', CGI.escape(vendor_refund_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] || 'VendorCreditMessage'

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

  new_options = opts.merge(
    :operation => :"VendorsApi.get_vendor_refund",
    :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_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_vendor(vendor_id, vendor_put_message, opts = {}) ⇒ VendorMessage

Update a vendor Updates a vendor. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` `Edit`

Parameters:

  • vendor_id (Integer)
  • vendor_put_message (VendorPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1063
1064
1065
1066
# File 'lib/buildium-ruby/api/vendors_api.rb', line 1063

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

#update_vendor_category(vendor_category_id, vendor_category_save_message, opts = {}) ⇒ VendorCategoryMessage

Update a vendor category Updates a vendor category. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` `Edit`

Parameters:

  • vendor_category_id (Integer)
  • vendor_category_save_message (VendorCategorySaveMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1137
1138
1139
1140
# File 'lib/buildium-ruby/api/vendors_api.rb', line 1137

def update_vendor_category(vendor_category_id, vendor_category_save_message, opts = {})
  data, _status_code, _headers = update_vendor_category_with_http_info(vendor_category_id, vendor_category_save_message, opts)
  data
end

#update_vendor_category_with_http_info(vendor_category_id, vendor_category_save_message, opts = {}) ⇒ Array<(VendorCategoryMessage, Integer, Hash)>

Update a vendor category Updates a vendor category. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • vendor_category_id (Integer)
  • vendor_category_save_message (VendorCategorySaveMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    VendorCategoryMessage data, response status code and response headers



1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
# File 'lib/buildium-ruby/api/vendors_api.rb', line 1148

def update_vendor_category_with_http_info(vendor_category_id, vendor_category_save_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.update_vendor_category ...'
  end
  # verify the required parameter 'vendor_category_id' is set
  if @api_client.config.client_side_validation && vendor_category_id.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_category_id' when calling VendorsApi.update_vendor_category"
  end
  # verify the required parameter 'vendor_category_save_message' is set
  if @api_client.config.client_side_validation && vendor_category_save_message.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_category_save_message' when calling VendorsApi.update_vendor_category"
  end
  # resource path
  local_var_path = '/v1/vendors/categories/{vendorCategoryId}'.sub('{' + 'vendorCategoryId' + '}', CGI.escape(vendor_category_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'])
  # 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(vendor_category_save_message)

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

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

  new_options = opts.merge(
    :operation => :"VendorsApi.update_vendor_category",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#update_vendor_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_vendor_note(vendor_id, note_id, note_put_message, opts = {}) ⇒ NoteMessage

Update a note Updates a vendor note. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Maintenance &gt; Vendors</span> - ‘View` `Edit`

Parameters:

  • vendor_id (Integer)
  • note_id (Integer)
  • note_put_message (NotePutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1212
1213
1214
1215
# File 'lib/buildium-ruby/api/vendors_api.rb', line 1212

def update_vendor_note(vendor_id, note_id, note_put_message, opts = {})
  data, _status_code, _headers = update_vendor_note_with_http_info(vendor_id, note_id, note_put_message, opts)
  data
end

#update_vendor_note_with_http_info(vendor_id, note_id, note_put_message, opts = {}) ⇒ Array<(NoteMessage, Integer, Hash)>

Update a note Updates a vendor note. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • vendor_id (Integer)
  • note_id (Integer)
  • note_put_message (NotePutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    NoteMessage data, response status code and response headers



1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
# File 'lib/buildium-ruby/api/vendors_api.rb', line 1224

def update_vendor_note_with_http_info(vendor_id, note_id, note_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.update_vendor_note ...'
  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.update_vendor_note"
  end
  # verify the required parameter 'note_id' is set
  if @api_client.config.client_side_validation && note_id.nil?
    fail ArgumentError, "Missing the required parameter 'note_id' when calling VendorsApi.update_vendor_note"
  end
  # verify the required parameter 'note_put_message' is set
  if @api_client.config.client_side_validation && note_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'note_put_message' when calling VendorsApi.update_vendor_note"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}/notes/{noteId}'.sub('{' + 'vendorId' + '}', CGI.escape(vendor_id.to_s)).sub('{' + 'noteId' + '}', CGI.escape(note_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'])
  # 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(note_put_message)

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

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

  new_options = opts.merge(
    :operation => :"VendorsApi.update_vendor_note",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#update_vendor_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_vendor_with_http_info(vendor_id, vendor_put_message, opts = {}) ⇒ Array<(VendorMessage, Integer, Hash)>

Update a vendor Updates a vendor. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • vendor_id (Integer)
  • vendor_put_message (VendorPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    VendorMessage data, response status code and response headers



1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
# File 'lib/buildium-ruby/api/vendors_api.rb', line 1074

def update_vendor_with_http_info(vendor_id, vendor_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorsApi.update_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.update_vendor"
  end
  # verify the required parameter 'vendor_put_message' is set
  if @api_client.config.client_side_validation && vendor_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'vendor_put_message' when calling VendorsApi.update_vendor"
  end
  # resource path
  local_var_path = '/v1/vendors/{vendorId}'.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'])
  # 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(vendor_put_message)

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

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

  new_options = opts.merge(
    :operation => :"VendorsApi.update_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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorsApi#update_vendor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end