Class: Buildium::AccountingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/buildium-ruby/api/accounting_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AccountingApi

Returns a new instance of AccountingApi.



19
20
21
# File 'lib/buildium-ruby/api/accounting_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/accounting_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_bill(bill_post_message, opts = {}) ⇒ BillMessage

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

Parameters:

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

    the optional parameters

Returns:



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

def create_bill(bill_post_message, opts = {})
  data, _status_code, _headers = create_bill_with_http_info(bill_post_message, opts)
  data
end

#create_bill_payment(bill_id, bill_payment_post_message, opts = {}) ⇒ BillPaymentMessage

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

Parameters:

  • bill_id (Integer)
  • bill_payment_post_message (BillPaymentPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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

def create_bill_payment(bill_id, bill_payment_post_message, opts = {})
  data, _status_code, _headers = create_bill_payment_with_http_info(bill_id, bill_payment_post_message, opts)
  data
end

#create_bill_payment_with_http_info(bill_id, bill_payment_post_message, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>

Create a bill payment Creates a bill payment. &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; &lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; Bank Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • bill_id (Integer)
  • bill_payment_post_message (BillPaymentPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BillPaymentMessage data, response status code and response headers



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/buildium-ruby/api/accounting_api.rb', line 107

def create_bill_payment_with_http_info(bill_id, bill_payment_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.create_bill_payment ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.create_bill_payment"
  end
  # verify the required parameter 'bill_payment_post_message' is set
  if @api_client.config.client_side_validation && bill_payment_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'bill_payment_post_message' when calling AccountingApi.create_bill_payment"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/payments'.sub('{' + 'billId' + '}', CGI.escape(bill_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(bill_payment_post_message)

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

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

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

#create_bill_with_http_info(bill_post_message, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>

Create a bill Creates a bill. &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:

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

    the optional parameters

Returns:

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

    BillMessage 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/accounting_api.rb', line 37

def create_bill_with_http_info(bill_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.create_bill ...'
  end
  # verify the required parameter 'bill_post_message' is set
  if @api_client.config.client_side_validation && bill_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'bill_post_message' when calling AccountingApi.create_bill"
  end
  # resource path
  local_var_path = '/v1/bills'

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

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

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

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

#create_budget(budget_post_message, opts = {}) ⇒ BudgetMessage

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

Parameters:

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

    the optional parameters

Returns:



169
170
171
172
# File 'lib/buildium-ruby/api/accounting_api.rb', line 169

def create_budget(budget_post_message, opts = {})
  data, _status_code, _headers = create_budget_with_http_info(budget_post_message, opts)
  data
end

#create_budget_with_http_info(budget_post_message, opts = {}) ⇒ Array<(BudgetMessage, Integer, Hash)>

Create a budget Creates a budget. &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; Budgets&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    BudgetMessage data, response status code and response headers



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/accounting_api.rb', line 179

def create_budget_with_http_info(budget_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.create_budget ...'
  end
  # verify the required parameter 'budget_post_message' is set
  if @api_client.config.client_side_validation && budget_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'budget_post_message' when calling AccountingApi.create_budget"
  end
  # resource path
  local_var_path = '/v1/budgets'

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

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

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

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

#create_general_journal_entry(general_journal_entry_post_message, opts = {}) ⇒ GeneralLedgerTransactionMessage

Create a general journal entry Creates a general journal entry. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View` `Edit`

Parameters:

Returns:



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

def create_general_journal_entry(general_journal_entry_post_message, opts = {})
  data, _status_code, _headers = create_general_journal_entry_with_http_info(general_journal_entry_post_message, opts)
  data
end

#create_general_journal_entry_with_http_info(general_journal_entry_post_message, opts = {}) ⇒ Array<(GeneralLedgerTransactionMessage, Integer, Hash)>

Create a general journal entry Creates a general journal entry. &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; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:



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
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/buildium-ruby/api/accounting_api.rb', line 247

def create_general_journal_entry_with_http_info(general_journal_entry_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.create_general_journal_entry ...'
  end
  # verify the required parameter 'general_journal_entry_post_message' is set
  if @api_client.config.client_side_validation && general_journal_entry_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'general_journal_entry_post_message' when calling AccountingApi.create_general_journal_entry"
  end
  # resource path
  local_var_path = '/v1/generalledger/journalentries'

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

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

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

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

#create_general_ledger_account(gl_account_post_message, opts = {}) ⇒ GLAccountMessage

Create a general ledger account Creates a general ledger account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



305
306
307
308
# File 'lib/buildium-ruby/api/accounting_api.rb', line 305

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

#create_general_ledger_account_with_http_info(gl_account_post_message, opts = {}) ⇒ Array<(GLAccountMessage, Integer, Hash)>

Create a general ledger account Creates a general ledger account. &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; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    GLAccountMessage data, response status code and response headers



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
355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/buildium-ruby/api/accounting_api.rb', line 315

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

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

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

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

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

#create_upload_file_request(bill_id, file_name_post_message, opts = {}) ⇒ FileUploadTicketMessage

Upload a bill file Uploads a file and associates it to the specified bill record. <br /><br />Uploading a file requires making two API requests. Each step is outlined below. <br /><br /><strong>Step 1 - Save file metadata</strong><br /> The first step in the file upload process is to submit the file metadata to ‘/v1/bills/billId:int/files/uploadrequests`. The response of this call will contain a URL and a collection of form data that will be used in step 2 to generate the request for the file binary upload. <br /><br /><strong>NOTE:</strong> The response data will expire after 5 minutes. The file metadata will not be saved in the Buildium system if step 2 of this process is not completed successfully. <br /><br /><strong>Step 2 - Upload the file binary</strong><br /> Uploading the file binary will require using the response from step 1 to form a POST request to the Buildium file provider. Follow these steps to create the request: <br /> 1. Form a POST request using the value of the `BucketUrl` property as the URL. <br /><br /> 2. Set the `Content-Type` header to `multipart/form-data`. <br /><br /> 3. Copy the fields from the `FormData` property to this request as form-data key/value pairs. <br /><strong>NOTE:</strong> These values must added to the request form-data in the order they were received in the response. <br /><br /> 4. Lastly create a form-data key named `file` and set the value to the file binary. <br /><strong>NOTE:</strong> This must be the last field in the form-data list. <br /><br />This image shows what the POST request should look like if you’re using Postman: <img src="file-upload-example.png" /><br /><br /> 5. Send the POST request! A successful request will return with a ‘204 - NO CONTENT` HTTP response code. For any failure responses, please refer to <a target="_blank" href="docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses">AWS documentation</a> on REST error responses. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View` `Edit`

Parameters:

  • bill_id (Integer)
  • file_name_post_message (FileNamePostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



374
375
376
377
# File 'lib/buildium-ruby/api/accounting_api.rb', line 374

def create_upload_file_request(bill_id, file_name_post_message, opts = {})
  data, _status_code, _headers = create_upload_file_request_with_http_info(bill_id, file_name_post_message, opts)
  data
end

#create_upload_file_request_with_http_info(bill_id, file_name_post_message, opts = {}) ⇒ Array<(FileUploadTicketMessage, Integer, Hash)>

Upload a bill file Uploads a file and associates it to the specified bill record. &lt;br /&gt;&lt;br /&gt;Uploading a file requires making two API requests. Each step is outlined below. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1 - Save file metadata&lt;/strong&gt;&lt;br /&gt; The first step in the file upload process is to submit the file metadata to &#x60;/v1/bills/billId:int/files/uploadrequests&#x60;. The response of this call will contain a URL and a collection of form data that will be used in step 2 to generate the request for the file binary upload. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The response data will expire after 5 minutes. The file metadata will not be saved in the Buildium system if step 2 of this process is not completed successfully. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2 - Upload the file binary&lt;/strong&gt;&lt;br /&gt; Uploading the file binary will require using the response from step 1 to form a POST request to the Buildium file provider. Follow these steps to create the request: &lt;br /&gt; 1. Form a POST request using the value of the &#x60;BucketUrl&#x60; property as the URL. &lt;br /&gt;&lt;br /&gt; 2. Set the &#x60;Content-Type&#x60; header to &#x60;multipart/form-data&#x60;. &lt;br /&gt;&lt;br /&gt; 3. Copy the fields from the &#x60;FormData&#x60; property to this request as form-data key/value pairs. &lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; These values must added to the request form-data in the order they were received in the response. &lt;br /&gt;&lt;br /&gt; 4. Lastly create a form-data key named &#x60;file&#x60; and set the value to the file binary. &lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This must be the last field in the form-data list. &lt;br /&gt;&lt;br /&gt;This image shows what the POST request should look like if you&#39;re using Postman: &lt;img src&#x3D;&quot;file-upload-example.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt; 5. Send the POST request! A successful request will return with a &#x60;204 - NO CONTENT&#x60; HTTP response code. For any failure responses, please refer to &lt;a target&#x3D;&quot;_blank&quot; href&#x3D;&quot;docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses&quot;&gt;AWS documentation&lt;/a&gt; on REST error responses. &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:

  • bill_id (Integer)
  • file_name_post_message (FileNamePostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    FileUploadTicketMessage data, response status code and response headers



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
440
# File 'lib/buildium-ruby/api/accounting_api.rb', line 385

def create_upload_file_request_with_http_info(bill_id, file_name_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.create_upload_file_request ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.create_upload_file_request"
  end
  # verify the required parameter 'file_name_post_message' is set
  if @api_client.config.client_side_validation && file_name_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'file_name_post_message' when calling AccountingApi.create_upload_file_request"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/files/uploadrequests'.sub('{' + 'billId' + '}', CGI.escape(bill_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(file_name_post_message)

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

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

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

#delete_bill_file(bill_id, file_id, opts = {}) ⇒ nil

Delete a bill file Deletes the specified file from a bill. The file will be permanently deleted from the Buildium platform and can not be recovered. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - ‘View` `Edit` `Delete`

Parameters:

  • bill_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


448
449
450
451
# File 'lib/buildium-ruby/api/accounting_api.rb', line 448

def delete_bill_file(bill_id, file_id, opts = {})
  delete_bill_file_with_http_info(bill_id, file_id, opts)
  nil
end

#delete_bill_file_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a bill file Deletes the specified file from a bill. The file will be permanently deleted from the Buildium platform and can not be recovered. &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; &#x60;Delete&#x60;

Parameters:

  • bill_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



459
460
461
462
463
464
465
466
467
468
469
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
# File 'lib/buildium-ruby/api/accounting_api.rb', line 459

def delete_bill_file_with_http_info(bill_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.delete_bill_file ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.delete_bill_file"
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling AccountingApi.delete_bill_file"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/files/{fileId}'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_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]

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

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

#download_bill_file(bill_id, file_id, opts = {}) ⇒ FileDownloadMessage

Download a bill file Downloads a specific file associated to the bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - ‘View`

Parameters:

  • bill_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



517
518
519
520
# File 'lib/buildium-ruby/api/accounting_api.rb', line 517

def download_bill_file(bill_id, file_id, opts = {})
  data, _status_code, _headers = download_bill_file_with_http_info(bill_id, file_id, opts)
  data
end

#download_bill_file_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(FileDownloadMessage, Integer, Hash)>

Download a bill file Downloads a specific file associated to the bill. &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:

  • bill_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    FileDownloadMessage data, response status code and response headers



528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/buildium-ruby/api/accounting_api.rb', line 528

def download_bill_file_with_http_info(bill_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.download_bill_file ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.download_bill_file"
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling AccountingApi.download_bill_file"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/files/{fileId}/downloadrequest'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_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] || 'FileDownloadMessage'

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

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

#get_all_files_for_bill(bill_id, opts = {}) ⇒ Array<BillFileMessage>

Retrieve all files for a bill Retrieves the metadata for all files associated to the specified bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - ‘View`

Parameters:

  • bill_id (Integer)
  • 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:



588
589
590
591
# File 'lib/buildium-ruby/api/accounting_api.rb', line 588

def get_all_files_for_bill(bill_id, opts = {})
  data, _status_code, _headers = get_all_files_for_bill_with_http_info(bill_id, opts)
  data
end

#get_all_files_for_bill_with_http_info(bill_id, opts = {}) ⇒ Array<(Array<BillFileMessage>, Integer, Hash)>

Retrieve all files for a bill Retrieves the metadata for all files associated to the specified bill. &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:

  • bill_id (Integer)
  • 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<BillFileMessage>, Integer, Hash)>)

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



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
642
643
644
645
646
647
648
649
650
# File 'lib/buildium-ruby/api/accounting_api.rb', line 601

def get_all_files_for_bill_with_http_info(bill_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_all_files_for_bill ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.get_all_files_for_bill"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/files'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s))

  # 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<BillFileMessage>'

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

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

#get_all_gl_accounts(opts = {}) ⇒ Array<GLAccountMessage>

Retrieve all general ledger accounts Retrieves a list of general ledger accounts.<br /><br />General ledger accounts are used to categorize transactions for accounting purposes. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :accounttypes (Array<String>)

    Filters results by the specified general ledger account types.

  • :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:



660
661
662
663
# File 'lib/buildium-ruby/api/accounting_api.rb', line 660

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

#get_all_gl_accounts_with_http_info(opts = {}) ⇒ Array<(Array<GLAccountMessage>, Integer, Hash)>

Retrieve all general ledger accounts Retrieves a list of general ledger accounts.&lt;br /&gt;&lt;br /&gt;General ledger accounts are used to categorize transactions for accounting purposes. &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; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :accounttypes (Array<String>)

    Filters results by the specified general ledger account types.

  • :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<GLAccountMessage>, Integer, Hash)>)

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



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
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
# File 'lib/buildium-ruby/api/accounting_api.rb', line 673

def get_all_gl_accounts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_all_gl_accounts ...'
  end
  allowable_values = ["Asset", "Liability", "Equity", "Income", "Expense"]
  if @api_client.config.client_side_validation && opts[:'accounttypes'] && !opts[:'accounttypes'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"accounttypes\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/glaccounts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accounttypes'] = @api_client.build_collection_param(opts[:'accounttypes'], :multi) if !opts[:'accounttypes'].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<GLAccountMessage>'

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

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

#get_all_transactions(startdate, enddate, glaccountids, opts = {}) ⇒ Array<GeneralLedgerTransactionMessage>

Retrieve all general ledger transactions Retrieves a list of general ledger transactions. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View`

Parameters:

  • startdate (Date)

    Filters results to any transaction whose date is greater than or equal to the specified value.

  • enddate (Date)

    Filters results to any transaction whose date is less than or equal to the specified value.

  • glaccountids (Array<Integer>)

    Filters results to transactions whose general ledger account belongs to the specified set of general ledger account ids.

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

    the optional parameters

Options Hash (opts):

  • :selectionentityid (Integer)

    Filters results to any transaction containing journal lines for an entity associated with the specified entity id value. The id must be of the type specified in SelectionEntityType.

  • :selectionentitytype (String)

    Specifies the type of entity that SelectionEntityId refers to.

  • :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:



737
738
739
740
# File 'lib/buildium-ruby/api/accounting_api.rb', line 737

def get_all_transactions(startdate, enddate, glaccountids, opts = {})
  data, _status_code, _headers = get_all_transactions_with_http_info(startdate, enddate, glaccountids, opts)
  data
end

#get_all_transactions_with_http_info(startdate, enddate, glaccountids, opts = {}) ⇒ Array<(Array<GeneralLedgerTransactionMessage>, Integer, Hash)>

Retrieve all general ledger transactions Retrieves a list of general ledger transactions. &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; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • startdate (Date)

    Filters results to any transaction whose date is greater than or equal to the specified value.

  • enddate (Date)

    Filters results to any transaction whose date is less than or equal to the specified value.

  • glaccountids (Array<Integer>)

    Filters results to transactions whose general ledger account belongs to the specified set of general ledger account ids.

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

    the optional parameters

Options Hash (opts):

  • :selectionentityid (Integer)

    Filters results to any transaction containing journal lines for an entity associated with the specified entity id value. The id must be of the type specified in SelectionEntityType.

  • :selectionentitytype (String)

    Specifies the type of entity that SelectionEntityId refers to.

  • :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<GeneralLedgerTransactionMessage>, Integer, Hash)>)

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



754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
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
# File 'lib/buildium-ruby/api/accounting_api.rb', line 754

def get_all_transactions_with_http_info(startdate, enddate, glaccountids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_all_transactions ...'
  end
  # verify the required parameter 'startdate' is set
  if @api_client.config.client_side_validation && startdate.nil?
    fail ArgumentError, "Missing the required parameter 'startdate' when calling AccountingApi.get_all_transactions"
  end
  # verify the required parameter 'enddate' is set
  if @api_client.config.client_side_validation && enddate.nil?
    fail ArgumentError, "Missing the required parameter 'enddate' when calling AccountingApi.get_all_transactions"
  end
  # verify the required parameter 'glaccountids' is set
  if @api_client.config.client_side_validation && glaccountids.nil?
    fail ArgumentError, "Missing the required parameter 'glaccountids' when calling AccountingApi.get_all_transactions"
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'selectionentitytype'] && !allowable_values.include?(opts[:'selectionentitytype'])
    fail ArgumentError, "invalid value for \"selectionentitytype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/generalledger/transactions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'startdate'] = startdate
  query_params[:'enddate'] = enddate
  query_params[:'glaccountids'] = @api_client.build_collection_param(glaccountids, :multi)
  query_params[:'selectionentityid'] = opts[:'selectionentityid'] if !opts[:'selectionentityid'].nil?
  query_params[:'selectionentitytype'] = opts[:'selectionentitytype'] if !opts[:'selectionentitytype'].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<GeneralLedgerTransactionMessage>'

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

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

#get_bill_by_id(bill_id, opts = {}) ⇒ BillMessage

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

Parameters:

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

    the optional parameters

Returns:



827
828
829
830
# File 'lib/buildium-ruby/api/accounting_api.rb', line 827

def get_bill_by_id(bill_id, opts = {})
  data, _status_code, _headers = get_bill_by_id_with_http_info(bill_id, opts)
  data
end

#get_bill_by_id_with_http_info(bill_id, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>

Retrieve a bill Retrieves a single bill. &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:

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

    the optional parameters

Returns:

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

    BillMessage data, response status code and response headers



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
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
# File 'lib/buildium-ruby/api/accounting_api.rb', line 837

def get_bill_by_id_with_http_info(bill_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_bill_by_id ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.get_bill_by_id"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}'.sub('{' + 'billId' + '}', CGI.escape(bill_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] || 'BillMessage'

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

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

#get_bill_file_by_id(bill_id, file_id, opts = {}) ⇒ BillFileMessage

Retrieve a file for a bill Retrieves the metadata for a specific file associated with the specified bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - ‘View`

Parameters:

  • bill_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



891
892
893
894
# File 'lib/buildium-ruby/api/accounting_api.rb', line 891

def get_bill_file_by_id(bill_id, file_id, opts = {})
  data, _status_code, _headers = get_bill_file_by_id_with_http_info(bill_id, file_id, opts)
  data
end

#get_bill_file_by_id_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(BillFileMessage, Integer, Hash)>

Retrieve a file for a bill Retrieves the metadata for a specific file associated with the specified bill. &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:

  • bill_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BillFileMessage data, response status code and response headers



902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
# File 'lib/buildium-ruby/api/accounting_api.rb', line 902

def get_bill_file_by_id_with_http_info(bill_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_bill_file_by_id ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.get_bill_file_by_id"
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling AccountingApi.get_bill_file_by_id"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/files/{fileId}'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_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] || 'BillFileMessage'

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

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

#get_bill_payment_by_id(bill_id, payment_id, opts = {}) ⇒ BillPaymentMessage

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

Parameters:

  • bill_id (Integer)
  • payment_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



960
961
962
963
# File 'lib/buildium-ruby/api/accounting_api.rb', line 960

def get_bill_payment_by_id(bill_id, payment_id, opts = {})
  data, _status_code, _headers = get_bill_payment_by_id_with_http_info(bill_id, payment_id, opts)
  data
end

#get_bill_payment_by_id_with_http_info(bill_id, payment_id, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>

Retrieve a bill payment Retrieves specific bill payment. &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:

  • bill_id (Integer)
  • payment_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BillPaymentMessage data, response status code and response headers



971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
# File 'lib/buildium-ruby/api/accounting_api.rb', line 971

def get_bill_payment_by_id_with_http_info(bill_id, payment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_bill_payment_by_id ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.get_bill_payment_by_id"
  end
  # verify the required parameter 'payment_id' is set
  if @api_client.config.client_side_validation && payment_id.nil?
    fail ArgumentError, "Missing the required parameter 'payment_id' when calling AccountingApi.get_bill_payment_by_id"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/payments/{paymentId}'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'paymentId' + '}', CGI.escape(payment_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] || 'BillPaymentMessage'

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

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

#get_bill_payments(bill_id, opts = {}) ⇒ Array<BillPaymentMessage>

Retrieve all bill payments Retrieves a list of bill payments for a specific bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - ‘View`

Parameters:

  • bill_id (Integer)
  • 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:



1031
1032
1033
1034
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1031

def get_bill_payments(bill_id, opts = {})
  data, _status_code, _headers = get_bill_payments_with_http_info(bill_id, opts)
  data
end

#get_bill_payments_with_http_info(bill_id, opts = {}) ⇒ Array<(Array<BillPaymentMessage>, Integer, Hash)>

Retrieve all bill payments Retrieves a list of bill payments for a specific bill. &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:

  • bill_id (Integer)
  • 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<BillPaymentMessage>, Integer, Hash)>)

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



1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1044

def get_bill_payments_with_http_info(bill_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_bill_payments ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.get_bill_payments"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}/payments'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s))

  # 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<BillPaymentMessage>'

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

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

#get_bills_async(opts = {}) ⇒ Array<BillMessage>

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

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :entityid (Integer)

    Filters results to any bill containing line items associated with the specified entity identifier. This filter is used in conjunction with the &#x60;EntityType&#x60; field which must be set to the type of entity this identifier references.

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; refers to. This field is required if &#x60;EntityId&#x60; is specified.

  • :vendorid (Integer)

    Filters results to bills associated with a specific vendor.

  • :referencenumber (String)

    Filters results to bills whose reference number contains the specified value.

  • :paidstatus (String)

    Filters results by the bill&#39;s paid status. If no status is specified, bills with any status will be returned.

  • :frompaiddate (Date)

    Filters results to any bill whose paid date is greater than or equal to the specified value.

  • :topaiddate (Date)

    Filters results to any bill whose paid date is less than or equal to the specified value.

  • :approvalstatuses (Array<String>)

    Filters the results to bills matching the specified approval statuses. If no approval status is specified, bills with any status will be returned.

  • :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:



1110
1111
1112
1113
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1110

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

#get_bills_async_with_http_info(opts = {}) ⇒ Array<(Array<BillMessage>, Integer, Hash)>

Retrieve all bills Retrieves a list of bills. &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:

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

    the optional parameters

Options Hash (opts):

  • :entityid (Integer)

    Filters results to any bill containing line items associated with the specified entity identifier. This filter is used in conjunction with the &#x60;EntityType&#x60; field which must be set to the type of entity this identifier references.

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; refers to. This field is required if &#x60;EntityId&#x60; is specified.

  • :vendorid (Integer)

    Filters results to bills associated with a specific vendor.

  • :referencenumber (String)

    Filters results to bills whose reference number contains the specified value.

  • :paidstatus (String)

    Filters results by the bill&#39;s paid status. If no status is specified, bills with any status will be returned.

  • :frompaiddate (Date)

    Filters results to any bill whose paid date is greater than or equal to the specified value.

  • :topaiddate (Date)

    Filters results to any bill whose paid date is less than or equal to the specified value.

  • :approvalstatuses (Array<String>)

    Filters the results to bills matching the specified approval statuses. If no approval status is specified, bills with any status will be returned.

  • :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<BillMessage>, Integer, Hash)>)

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



1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
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
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1130

def get_bills_async_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_bills_async ...'
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  allowable_values = ["Paid", "Unpaid", "UncollectedMarkups"]
  if @api_client.config.client_side_validation && opts[:'paidstatus'] && !allowable_values.include?(opts[:'paidstatus'])
    fail ArgumentError, "invalid value for \"paidstatus\", must be one of #{allowable_values}"
  end
  allowable_values = ["NotNeeded", "ApprovalRequired", "Approved", "Pending", "Rejected"]
  if @api_client.config.client_side_validation && opts[:'approvalstatuses'] && !opts[:'approvalstatuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"approvalstatuses\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/bills'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'vendorid'] = opts[:'vendorid'] if !opts[:'vendorid'].nil?
  query_params[:'referencenumber'] = opts[:'referencenumber'] if !opts[:'referencenumber'].nil?
  query_params[:'paidstatus'] = opts[:'paidstatus'] if !opts[:'paidstatus'].nil?
  query_params[:'frompaiddate'] = opts[:'frompaiddate'] if !opts[:'frompaiddate'].nil?
  query_params[:'topaiddate'] = opts[:'topaiddate'] if !opts[:'topaiddate'].nil?
  query_params[:'approvalstatuses'] = @api_client.build_collection_param(opts[:'approvalstatuses'], :multi) if !opts[:'approvalstatuses'].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<BillMessage>'

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

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

#get_budget_by_id(budget_id, opts = {}) ⇒ BudgetMessage

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

Parameters:

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

    the optional parameters

Returns:



1202
1203
1204
1205
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1202

def get_budget_by_id(budget_id, opts = {})
  data, _status_code, _headers = get_budget_by_id_with_http_info(budget_id, opts)
  data
end

#get_budget_by_id_with_http_info(budget_id, opts = {}) ⇒ Array<(BudgetMessage, Integer, Hash)>

Retrieve a budget Retrieves a budget. &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; Budgets&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    BudgetMessage data, response status code and response headers



1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
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
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1212

def get_budget_by_id_with_http_info(budget_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_budget_by_id ...'
  end
  # verify the required parameter 'budget_id' is set
  if @api_client.config.client_side_validation && budget_id.nil?
    fail ArgumentError, "Missing the required parameter 'budget_id' when calling AccountingApi.get_budget_by_id"
  end
  # resource path
  local_var_path = '/v1/budgets/{budgetId}'.sub('{' + 'budgetId' + '}', CGI.escape(budget_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] || 'BudgetMessage'

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

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

#get_budgets(opts = {}) ⇒ Array<BudgetMessage>

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

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to any budget associated to any of the specified set of property ids.

  • :fiscalyear (Integer)

    Filters results to any budgets that end in the given fiscal year. FiscalYear must be a positive number.

  • :name (String)

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

  • :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:



1270
1271
1272
1273
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1270

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

#get_budgets_with_http_info(opts = {}) ⇒ Array<(Array<BudgetMessage>, Integer, Hash)>

Retrieve all budgets Retrieves all budgets. &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; Budgets&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to any budget associated to any of the specified set of property ids.

  • :fiscalyear (Integer)

    Filters results to any budgets that end in the given fiscal year. FiscalYear must be a positive number.

  • :name (String)

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

  • :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<BudgetMessage>, Integer, Hash)>)

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



1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1285

def get_budgets_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_budgets ...'
  end
  # resource path
  local_var_path = '/v1/budgets'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'propertyids'] = @api_client.build_collection_param(opts[:'propertyids'], :multi) if !opts[:'propertyids'].nil?
  query_params[:'fiscalyear'] = opts[:'fiscalyear'] if !opts[:'fiscalyear'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].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<BudgetMessage>'

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

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

#get_gl_account_balances(accountingbasis, asofdate, opts = {}) ⇒ Array<GLAccountBalanceMessage>

Retrieve all general ledger account balances Retrieves all general ledger account balances as of a given date. The response includes the total balance of each account along with the subtotals for any accounting entities (company, associations or rental properties) that have transactions assigned to the account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View`

Parameters:

  • accountingbasis (String)

    The methodology in which revenues and expenses are recognized when calculating the balances. Specifying &#x60;Cash&#x60; calculates balances based on when money changes hands. Specifying &#x60;Accrual&#x60; calculates balances based on the period in which the transaction originally happened.

  • asofdate (Date)

    Indicates the end date through which the balances will be calculated. This will include all transactions in your account until this specified date.

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; field refers to.

  • :entityid (Integer)

    Filters transactions used in calculating the general ledger account balances to only those containing journal lines for with the specified entity id value. The entity id specified must be of the type specified in &#x60;EntityType&#x60;.

  • :glaccountids (Array<Integer>)

    Filters results to the specified set of general ledger account identifiers.

  • :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:



1347
1348
1349
1350
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1347

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

#get_gl_account_balances_with_http_info(accountingbasis, asofdate, opts = {}) ⇒ Array<(Array<GLAccountBalanceMessage>, Integer, Hash)>

Retrieve all general ledger account balances Retrieves all general ledger account balances as of a given date. The response includes the total balance of each account along with the subtotals for any accounting entities (company, associations or rental properties) that have transactions assigned to the account. &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; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • accountingbasis (String)

    The methodology in which revenues and expenses are recognized when calculating the balances. Specifying &#x60;Cash&#x60; calculates balances based on when money changes hands. Specifying &#x60;Accrual&#x60; calculates balances based on the period in which the transaction originally happened.

  • asofdate (Date)

    Indicates the end date through which the balances will be calculated. This will include all transactions in your account until this specified date.

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; field refers to.

  • :entityid (Integer)

    Filters transactions used in calculating the general ledger account balances to only those containing journal lines for with the specified entity id value. The entity id specified must be of the type specified in &#x60;EntityType&#x60;.

  • :glaccountids (Array<Integer>)

    Filters results to the specified set of general ledger account identifiers.

  • :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<GLAccountBalanceMessage>, Integer, Hash)>)

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



1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1364

def (accountingbasis, asofdate, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_gl_account_balances ...'
  end
  # verify the required parameter 'accountingbasis' is set
  if @api_client.config.client_side_validation && accountingbasis.nil?
    fail ArgumentError, "Missing the required parameter 'accountingbasis' when calling AccountingApi.get_gl_account_balances"
  end
  # verify enum value
  allowable_values = ["Accrual", "Cash"]
  if @api_client.config.client_side_validation && !allowable_values.include?(accountingbasis)
    fail ArgumentError, "invalid value for \"accountingbasis\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'asofdate' is set
  if @api_client.config.client_side_validation && asofdate.nil?
    fail ArgumentError, "Missing the required parameter 'asofdate' when calling AccountingApi.get_gl_account_balances"
  end
  allowable_values = ["Association", "Rental", "RentalOwner"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/glaccounts/balances'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountingbasis'] = accountingbasis
  query_params[:'asofdate'] = asofdate
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'glaccountids'] = @api_client.build_collection_param(opts[:'glaccountids'], :multi) if !opts[:'glaccountids'].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<GLAccountBalanceMessage>'

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

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

#get_gl_account_by_id(gl_account_id, opts = {}) ⇒ GLAccountMessage

Retrieve a general ledger account Retrieves a specific general ledger account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View`

Parameters:

  • gl_account_id (Integer)

    The general ledger account identifier.

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

    the optional parameters

Returns:



1438
1439
1440
1441
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1438

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

#get_gl_account_by_id_with_http_info(gl_account_id, opts = {}) ⇒ Array<(GLAccountMessage, Integer, Hash)>

Retrieve a general ledger account Retrieves a specific general ledger account. &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; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • gl_account_id (Integer)

    The general ledger account identifier.

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

    the optional parameters

Returns:

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

    GLAccountMessage data, response status code and response headers



1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1448

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_gl_account_by_id ...'
  end
  # verify the required parameter 'gl_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account_id' when calling AccountingApi.get_gl_account_by_id"
  end
  # resource path
  local_var_path = '/v1/glaccounts/{glAccountId}'.sub('{' + 'glAccountId' + '}', CGI.escape(.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] || 'GLAccountMessage'

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

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

#get_transaction_by_id(transaction_id, opts = {}) ⇒ GeneralLedgerTransactionMessage

Retrieve a general ledger transaction Retrieves a specific general ledger transaction. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View`

Parameters:

  • transaction_id (Integer)

    The general ledger transaction identifier.

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

    the optional parameters

Returns:



1501
1502
1503
1504
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1501

def get_transaction_by_id(transaction_id, opts = {})
  data, _status_code, _headers = get_transaction_by_id_with_http_info(transaction_id, opts)
  data
end

#get_transaction_by_id_with_http_info(transaction_id, opts = {}) ⇒ Array<(GeneralLedgerTransactionMessage, Integer, Hash)>

Retrieve a general ledger transaction Retrieves a specific general ledger transaction. &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; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • transaction_id (Integer)

    The general ledger transaction identifier.

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

    the optional parameters

Returns:



1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1511

def get_transaction_by_id_with_http_info(transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_transaction_by_id ...'
  end
  # verify the required parameter 'transaction_id' is set
  if @api_client.config.client_side_validation && transaction_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_id' when calling AccountingApi.get_transaction_by_id"
  end
  # resource path
  local_var_path = '/v1/generalledger/transactions/{transactionId}'.sub('{' + 'transactionId' + '}', CGI.escape(transaction_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] || 'GeneralLedgerTransactionMessage'

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

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

#update_bill(bill_id, bill_put_message, opts = {}) ⇒ BillMessage

Update a bill Use this operation to update any of the writable fields of an existing bill resource. When updating this resource keep the following in mind: <br /><ul><li>Writable fields omitted from the request or that do not have a value in the request message are set to ‘NULL`. If you do not want to update the field, submit the original field value.</li><li>When a bill has an existing payment any edits to the line items that change the total bill amount must result in the new total bill amount being equal to or greater than the amount paid.</li><li>When adding a new line item leave the `LineItem.Id` field empty.</li></ul><br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View` `Edit`

Parameters:

  • bill_id (Integer)
  • bill_put_message (BillPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1565
1566
1567
1568
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1565

def update_bill(bill_id, bill_put_message, opts = {})
  data, _status_code, _headers = update_bill_with_http_info(bill_id, bill_put_message, opts)
  data
end

#update_bill_with_http_info(bill_id, bill_put_message, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>

Update a bill Use this operation to update any of the writable fields of an existing bill resource. When updating this resource keep the following in mind: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Writable fields omitted from the request or that do not have a value in the request message are set to &#x60;NULL&#x60;. If you do not want to update the field, submit the original field value.&lt;/li&gt;&lt;li&gt;When a bill has an existing payment any edits to the line items that change the total bill amount must result in the new total bill amount being equal to or greater than the amount paid.&lt;/li&gt;&lt;li&gt;When adding a new line item leave the &#x60;LineItem.Id&#x60; field empty.&lt;/li&gt;&lt;/ul&gt;&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:

  • bill_id (Integer)
  • bill_put_message (BillPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BillMessage data, response status code and response headers



1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1576

def update_bill_with_http_info(bill_id, bill_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.update_bill ...'
  end
  # verify the required parameter 'bill_id' is set
  if @api_client.config.client_side_validation && bill_id.nil?
    fail ArgumentError, "Missing the required parameter 'bill_id' when calling AccountingApi.update_bill"
  end
  # verify the required parameter 'bill_put_message' is set
  if @api_client.config.client_side_validation && bill_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'bill_put_message' when calling AccountingApi.update_bill"
  end
  # resource path
  local_var_path = '/v1/bills/{billId}'.sub('{' + 'billId' + '}', CGI.escape(bill_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(bill_put_message)

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

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

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

#update_budget(budget_id, budget_put_message, opts = {}) ⇒ BudgetMessage

Update a budget Updates a budget. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Budgets</span> - ‘View` `Edit`

Parameters:

  • budget_id (Integer)
  • budget_put_message (BudgetPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1639
1640
1641
1642
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1639

def update_budget(budget_id, budget_put_message, opts = {})
  data, _status_code, _headers = update_budget_with_http_info(budget_id, budget_put_message, opts)
  data
end

#update_budget_with_http_info(budget_id, budget_put_message, opts = {}) ⇒ Array<(BudgetMessage, Integer, Hash)>

Update a budget Updates a budget. &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; Budgets&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • budget_id (Integer)
  • budget_put_message (BudgetPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    BudgetMessage data, response status code and response headers



1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1650

def update_budget_with_http_info(budget_id, budget_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.update_budget ...'
  end
  # verify the required parameter 'budget_id' is set
  if @api_client.config.client_side_validation && budget_id.nil?
    fail ArgumentError, "Missing the required parameter 'budget_id' when calling AccountingApi.update_budget"
  end
  # verify the required parameter 'budget_put_message' is set
  if @api_client.config.client_side_validation && budget_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'budget_put_message' when calling AccountingApi.update_budget"
  end
  # resource path
  local_var_path = '/v1/budgets/{budgetId}'.sub('{' + 'budgetId' + '}', CGI.escape(budget_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(budget_put_message)

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

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

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

#update_general_journal_entry(journal_entry_id, general_journal_entry_put_message, opts = {}) ⇒ GeneralLedgerTransactionMessage

Update a general journal entry Updates a general journal entry. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View` `Edit`

Parameters:

  • journal_entry_id (Integer)
  • general_journal_entry_put_message (GeneralJournalEntryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1713
1714
1715
1716
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1713

def update_general_journal_entry(journal_entry_id, general_journal_entry_put_message, opts = {})
  data, _status_code, _headers = update_general_journal_entry_with_http_info(journal_entry_id, general_journal_entry_put_message, opts)
  data
end

#update_general_journal_entry_with_http_info(journal_entry_id, general_journal_entry_put_message, opts = {}) ⇒ Array<(GeneralLedgerTransactionMessage, Integer, Hash)>

Update a general journal entry Updates a general journal entry. &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; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • journal_entry_id (Integer)
  • general_journal_entry_put_message (GeneralJournalEntryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1724

def update_general_journal_entry_with_http_info(journal_entry_id, general_journal_entry_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.update_general_journal_entry ...'
  end
  # verify the required parameter 'journal_entry_id' is set
  if @api_client.config.client_side_validation && journal_entry_id.nil?
    fail ArgumentError, "Missing the required parameter 'journal_entry_id' when calling AccountingApi.update_general_journal_entry"
  end
  # verify the required parameter 'general_journal_entry_put_message' is set
  if @api_client.config.client_side_validation && general_journal_entry_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'general_journal_entry_put_message' when calling AccountingApi.update_general_journal_entry"
  end
  # resource path
  local_var_path = '/v1/generalledger/journalentries/{journalEntryId}'.sub('{' + 'journalEntryId' + '}', CGI.escape(journal_entry_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(general_journal_entry_put_message)

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

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

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

#update_gl_account(gl_account_id, gl_account_put_message, opts = {}) ⇒ GLAccountMessage

Update a general ledger account Updates a general ledger account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View` `Edit`

Parameters:

  • gl_account_id (Integer)
  • gl_account_put_message (GLAccountPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1787
1788
1789
1790
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1787

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

#update_gl_account_with_http_info(gl_account_id, gl_account_put_message, opts = {}) ⇒ Array<(GLAccountMessage, Integer, Hash)>

Update a general ledger account Updates a general ledger account. &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; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • gl_account_id (Integer)
  • gl_account_put_message (GLAccountPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    GLAccountMessage data, response status code and response headers



1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
# File 'lib/buildium-ruby/api/accounting_api.rb', line 1798

def (, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.update_gl_account ...'
  end
  # verify the required parameter 'gl_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account_id' when calling AccountingApi.update_gl_account"
  end
  # verify the required parameter 'gl_account_put_message' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account_put_message' when calling AccountingApi.update_gl_account"
  end
  # resource path
  local_var_path = '/v1/glaccounts/{glAccountId}'.sub('{' + 'glAccountId' + '}', CGI.escape(.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()

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

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

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