Class: Buildium::LeaseTransactionsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ LeaseTransactionsApi

Returns a new instance of LeaseTransactionsApi.



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

def api_client
  @api_client
end

Instance Method Details

#create_lease_auto_allocated_payment(lease_id, create_lease_auto_allocated_payment_request, opts = {}) ⇒ LeaseTransactionMessage

Create a payment (auto allocated) Creates a payment on the lease ledger. Note that the recorded payment will be automatically allocated to the general ledger accounts based on the payment allocation settings. These settings can be found under the Settings > Application Settings > Residents page in your account. If you’d like to specify the GL accounts the payment should apply to, please use the <a href="#operation/CreatePayment">Create a payment</a> endpoint. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit`

Parameters:

Returns:



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

def create_lease_auto_allocated_payment(lease_id, create_lease_auto_allocated_payment_request, opts = {})
  data, _status_code, _headers = create_lease_auto_allocated_payment_with_http_info(lease_id, create_lease_auto_allocated_payment_request, opts)
  data
end

#create_lease_auto_allocated_payment_with_http_info(lease_id, create_lease_auto_allocated_payment_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Create a payment (auto allocated) Creates a payment on the lease ledger. Note that the recorded payment will be automatically allocated to the general ledger accounts based on the payment allocation settings. These settings can be found under the Settings &gt; Application Settings &gt; Residents page in your account. If you&#39;d like to specify the GL accounts the payment should apply to, please use the &lt;a href&#x3D;&quot;#operation/CreatePayment&quot;&gt;Create a payment&lt;/a&gt; endpoint. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



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
89
90
91
92
93
94
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 39

def create_lease_auto_allocated_payment_with_http_info(lease_id, create_lease_auto_allocated_payment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_auto_allocated_payment ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_auto_allocated_payment"
  end
  # verify the required parameter 'create_lease_auto_allocated_payment_request' is set
  if @api_client.config.client_side_validation && create_lease_auto_allocated_payment_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_auto_allocated_payment_request' when calling LeaseTransactionsApi.create_lease_auto_allocated_payment"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/autoallocatedpayments'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_lease_auto_allocated_payment_request)

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

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

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

#create_lease_charge_recurring_transaction(lease_id, create_ownership_accounts_charge_recurring_transaction_request, opts = {}) ⇒ LeaseChargeRecurringTransactionMessage

Create a recurring charge Creates a recurring charge transaction that will post automatically on the specified lease ledger. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit`

Parameters:

Returns:



102
103
104
105
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 102

def create_lease_charge_recurring_transaction(lease_id, create_ownership_accounts_charge_recurring_transaction_request, opts = {})
  data, _status_code, _headers = create_lease_charge_recurring_transaction_with_http_info(lease_id, create_ownership_accounts_charge_recurring_transaction_request, opts)
  data
end

#create_lease_charge_recurring_transaction_with_http_info(lease_id, create_ownership_accounts_charge_recurring_transaction_request, opts = {}) ⇒ Array<(LeaseChargeRecurringTransactionMessage, Integer, Hash)>

Create a recurring charge Creates a recurring charge transaction that will post automatically on the specified lease ledger. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:



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
163
164
165
166
167
168
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 113

def create_lease_charge_recurring_transaction_with_http_info(lease_id, create_ownership_accounts_charge_recurring_transaction_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_charge_recurring_transaction ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_charge_recurring_transaction"
  end
  # verify the required parameter 'create_ownership_accounts_charge_recurring_transaction_request' is set
  if @api_client.config.client_side_validation && create_ownership_accounts_charge_recurring_transaction_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_ownership_accounts_charge_recurring_transaction_request' when calling LeaseTransactionsApi.create_lease_charge_recurring_transaction"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/recurringcharges'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_ownership_accounts_charge_recurring_transaction_request)

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

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

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

#create_lease_credit(lease_id, create_lease_credit_request, opts = {}) ⇒ LeaseTransactionMessage

Create a credit Creates a lease ledger credit. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

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

    the optional parameters

Returns:



176
177
178
179
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 176

def create_lease_credit(lease_id, create_lease_credit_request, opts = {})
  data, _status_code, _headers = create_lease_credit_with_http_info(lease_id, create_lease_credit_request, opts)
  data
end

#create_lease_credit_recurring_transaction(lease_id, create_ownership_account_credit_recurring_transaction_request, opts = {}) ⇒ LeaseRecurringCreditMessage

Create a recurring credit Creates a recurring credit transaction on the specified lease ledger. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit`

Parameters:

Returns:



250
251
252
253
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 250

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

#create_lease_credit_recurring_transaction_with_http_info(lease_id, create_ownership_account_credit_recurring_transaction_request, opts = {}) ⇒ Array<(LeaseRecurringCreditMessage, Integer, Hash)>

Create a recurring credit Creates a recurring credit transaction on the specified lease ledger. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

    LeaseRecurringCreditMessage data, response status code and response headers



261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 261

def create_lease_credit_recurring_transaction_with_http_info(lease_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_credit_recurring_transaction ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_credit_recurring_transaction"
  end
  # verify the required parameter 'create_ownership_account_credit_recurring_transaction_request' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'create_ownership_account_credit_recurring_transaction_request' when calling LeaseTransactionsApi.create_lease_credit_recurring_transaction"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/recurringcredits'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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()

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

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

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

#create_lease_credit_with_http_info(lease_id, create_lease_credit_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Create a credit Creates a lease ledger credit. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

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

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



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
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 187

def create_lease_credit_with_http_info(lease_id, create_lease_credit_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_credit ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_credit"
  end
  # verify the required parameter 'create_lease_credit_request' is set
  if @api_client.config.client_side_validation && create_lease_credit_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_credit_request' when calling LeaseTransactionsApi.create_lease_credit"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/credits'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_lease_credit_request)

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

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

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

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

#create_lease_ledger_charge(lease_id, create_lease_ledger_charge_request, opts = {}) ⇒ Array<LeaseTransactionMessage>

Create a charge Creates a charge transaction on a specific lease ledger. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit` <br /><span class="permissionBlock">Accounting > Bills</span> - `View` `Edit` In order to associate the charge to a bill using the BillId property, you must have this permission.

Parameters:

Returns:



324
325
326
327
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 324

def create_lease_ledger_charge(lease_id, create_lease_ledger_charge_request, opts = {})
  data, _status_code, _headers = create_lease_ledger_charge_with_http_info(lease_id, create_lease_ledger_charge_request, opts)
  data
end

#create_lease_ledger_charge_with_http_info(lease_id, create_lease_ledger_charge_request, opts = {}) ⇒ Array<(Array<LeaseTransactionMessage>, Integer, Hash)>

Create a charge Creates a charge transaction on a specific lease ledger. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &gt; Bills&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; In order to associate the charge to a bill using the BillId property, you must have this permission.

Parameters:

Returns:

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

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



335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 335

def create_lease_ledger_charge_with_http_info(lease_id, create_lease_ledger_charge_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_ledger_charge ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_ledger_charge"
  end
  # verify the required parameter 'create_lease_ledger_charge_request' is set
  if @api_client.config.client_side_validation && create_lease_ledger_charge_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_ledger_charge_request' when calling LeaseTransactionsApi.create_lease_ledger_charge"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/charges'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_lease_ledger_charge_request)

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

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

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

#create_lease_ledger_deposit_withholding(lease_id, create_lease_ledger_deposit_withholding_request, opts = {}) ⇒ LeaseTransactionMessage

Create a deposit withholding Withholds a resident deposit by reallocating the funds from a liability account to an income account to cover an expense(s). <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease Ledger</span> - ‘View` `Edit` <br /><span class="permissionBlock">Accounting > General Ledger Accounts</span> - `View`

Parameters:

Returns:



398
399
400
401
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 398

def create_lease_ledger_deposit_withholding(lease_id, create_lease_ledger_deposit_withholding_request, opts = {})
  data, _status_code, _headers = create_lease_ledger_deposit_withholding_with_http_info(lease_id, create_lease_ledger_deposit_withholding_request, opts)
  data
end

#create_lease_ledger_deposit_withholding_with_http_info(lease_id, create_lease_ledger_deposit_withholding_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Create a deposit withholding Withholds a resident deposit by reallocating the funds from a liability account to an income account to cover an expense(s). &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease Ledger&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &gt; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 409

def create_lease_ledger_deposit_withholding_with_http_info(lease_id, create_lease_ledger_deposit_withholding_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_ledger_deposit_withholding ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_ledger_deposit_withholding"
  end
  # verify the required parameter 'create_lease_ledger_deposit_withholding_request' is set
  if @api_client.config.client_side_validation && create_lease_ledger_deposit_withholding_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_ledger_deposit_withholding_request' when calling LeaseTransactionsApi.create_lease_ledger_deposit_withholding"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/applieddeposits'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_lease_ledger_deposit_withholding_request)

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

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

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

#create_lease_ledger_refund(lease_id, create_lease_ledger_refund_request, opts = {}) ⇒ LeaseLedgerRefundMessage

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

Parameters:

Returns:



472
473
474
475
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 472

def create_lease_ledger_refund(lease_id, create_lease_ledger_refund_request, opts = {})
  data, _status_code, _headers = create_lease_ledger_refund_with_http_info(lease_id, create_lease_ledger_refund_request, opts)
  data
end

#create_lease_ledger_refund_with_http_info(lease_id, create_lease_ledger_refund_request, opts = {}) ⇒ Array<(LeaseLedgerRefundMessage, Integer, Hash)>

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

Parameters:

Returns:

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

    LeaseLedgerRefundMessage data, response status code and response headers



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 483

def create_lease_ledger_refund_with_http_info(lease_id, create_lease_ledger_refund_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_ledger_refund ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_ledger_refund"
  end
  # verify the required parameter 'create_lease_ledger_refund_request' is set
  if @api_client.config.client_side_validation && create_lease_ledger_refund_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_ledger_refund_request' when calling LeaseTransactionsApi.create_lease_ledger_refund"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/refunds'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_lease_ledger_refund_request)

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

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

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

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

#create_lease_recurring_payment(lease_id, create_ownership_account_recurring_payment_request, opts = {}) ⇒ LeaseRecurringPaymentMessage

Create a recurring payment Creates a recurring payment that will post automatically on the specified lease ledger. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease Transactions</span> - ‘View` `Edit`

Parameters:

Returns:



546
547
548
549
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 546

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

#create_lease_recurring_payment_with_http_info(lease_id, create_ownership_account_recurring_payment_request, opts = {}) ⇒ Array<(LeaseRecurringPaymentMessage, Integer, Hash)>

Create a recurring payment Creates a recurring payment that will post automatically on the specified lease ledger. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 557

def create_lease_recurring_payment_with_http_info(lease_id, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_recurring_payment ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_recurring_payment"
  end
  # verify the required parameter 'create_ownership_account_recurring_payment_request' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'create_ownership_account_recurring_payment_request' when calling LeaseTransactionsApi.create_lease_recurring_payment"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/recurringpayments'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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()

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

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

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

#create_lease_reverse_payment(lease_id, create_lease_reverse_payment_request, opts = {}) ⇒ LeaseTransactionMessage

Create a payment reversal Reverses a lease ledger payment. Note, this action can only be taken on a payment that has been deposited. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit` <br /><span class="permissionBlock">Accounting > Bank Accounts</span> - `View` `Edit`

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

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

    the optional parameters

Returns:



620
621
622
623
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 620

def create_lease_reverse_payment(lease_id, create_lease_reverse_payment_request, opts = {})
  data, _status_code, _headers = create_lease_reverse_payment_with_http_info(lease_id, create_lease_reverse_payment_request, opts)
  data
end

#create_lease_reverse_payment_with_http_info(lease_id, create_lease_reverse_payment_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Create a payment reversal Reverses a lease ledger payment. Note, this action can only be taken on a payment that has been deposited. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &gt; Bank Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

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

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 631

def create_lease_reverse_payment_with_http_info(lease_id, create_lease_reverse_payment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_lease_reverse_payment ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_lease_reverse_payment"
  end
  # verify the required parameter 'create_lease_reverse_payment_request' is set
  if @api_client.config.client_side_validation && create_lease_reverse_payment_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_reverse_payment_request' when calling LeaseTransactionsApi.create_lease_reverse_payment"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/reversepayments'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_lease_reverse_payment_request)

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

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

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

#create_payment(lease_id, create_payment_request, opts = {}) ⇒ LeaseTransactionMessage

Create a payment Creates a lease ledger payment. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

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

    the optional parameters

Returns:



694
695
696
697
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 694

def create_payment(lease_id, create_payment_request, opts = {})
  data, _status_code, _headers = create_payment_with_http_info(lease_id, create_payment_request, opts)
  data
end

#create_payment_with_http_info(lease_id, create_payment_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Create a payment Creates a lease ledger payment. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

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

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 705

def create_payment_with_http_info(lease_id, create_payment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.create_payment ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.create_payment"
  end
  # verify the required parameter 'create_payment_request' is set
  if @api_client.config.client_side_validation && create_payment_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_payment_request' when calling LeaseTransactionsApi.create_payment"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/payments'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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(create_payment_request)

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

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

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

#get_all_charges(lease_id, opts = {}) ⇒ Array<LeaseChargeMessage>

Retrieve all charges Retrieves all the charges for a specific lease. <br /><br /><h4>Required permissions(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :transactiondatefrom (Date)

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

  • :transactiondateto (Date)

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

  • :billids (Array<Integer>)

    Filters results to any charge that has been associated to the indicated bill ids.

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



773
774
775
776
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 773

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

#get_all_charges_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<LeaseChargeMessage>, Integer, Hash)>

Retrieve all charges Retrieves all the charges for a specific lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permissions(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :transactiondatefrom (Date)

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

  • :transactiondateto (Date)

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

  • :billids (Array<Integer>)

    Filters results to any charge that has been associated to the indicated bill ids.

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

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



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

def get_all_charges_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_all_charges ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_all_charges"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/charges'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

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

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

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

#get_charge_by_id(lease_id, charge_id, opts = {}) ⇒ LeaseChargeMessage

Retrieve a charge Retrieves a specific lease charge. <br /><br /><h4>Required permissions(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • charge_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



849
850
851
852
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 849

def get_charge_by_id(lease_id, charge_id, opts = {})
  data, _status_code, _headers = get_charge_by_id_with_http_info(lease_id, charge_id, opts)
  data
end

#get_charge_by_id_with_http_info(lease_id, charge_id, opts = {}) ⇒ Array<(LeaseChargeMessage, Integer, Hash)>

Retrieve a charge Retrieves a specific lease charge. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permissions(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • charge_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LeaseChargeMessage data, response status code and response headers



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

def get_charge_by_id_with_http_info(lease_id, charge_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_charge_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_charge_by_id"
  end
  # verify the required parameter 'charge_id' is set
  if @api_client.config.client_side_validation && charge_id.nil?
    fail ArgumentError, "Missing the required parameter 'charge_id' when calling LeaseTransactionsApi.get_charge_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/charges/{chargeId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'chargeId' + '}', CGI.escape(charge_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] || 'LeaseChargeMessage'

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

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

#get_lease_charge_recurring_transaction_by_id(lease_id, transaction_id, opts = {}) ⇒ LeaseChargeRecurringTransactionMessage

Retrieve a recurring charge Retrieves a recurring charge. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • transaction_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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

def get_lease_charge_recurring_transaction_by_id(lease_id, transaction_id, opts = {})
  data, _status_code, _headers = get_lease_charge_recurring_transaction_by_id_with_http_info(lease_id, transaction_id, opts)
  data
end

#get_lease_charge_recurring_transaction_by_id_with_http_info(lease_id, transaction_id, opts = {}) ⇒ Array<(LeaseChargeRecurringTransactionMessage, Integer, Hash)>

Retrieve a recurring charge Retrieves a recurring charge. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • transaction_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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

def get_lease_charge_recurring_transaction_by_id_with_http_info(lease_id, transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_lease_charge_recurring_transaction_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_lease_charge_recurring_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 LeaseTransactionsApi.get_lease_charge_recurring_transaction_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/recurringcharges/{transactionId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).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] || 'LeaseChargeRecurringTransactionMessage'

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

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

#get_lease_ledger_refund_by_id(lease_id, refund_id, opts = {}) ⇒ LeaseLedgerRefundMessage

Retrieve a refund Retrieves a refund. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bank Accounts</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • refund_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



987
988
989
990
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 987

def get_lease_ledger_refund_by_id(lease_id, refund_id, opts = {})
  data, _status_code, _headers = get_lease_ledger_refund_by_id_with_http_info(lease_id, refund_id, opts)
  data
end

#get_lease_ledger_refund_by_id_with_http_info(lease_id, refund_id, opts = {}) ⇒ Array<(LeaseLedgerRefundMessage, Integer, Hash)>

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

Parameters:

  • lease_id (Integer)
  • refund_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LeaseLedgerRefundMessage data, response status code and response headers



998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 998

def get_lease_ledger_refund_by_id_with_http_info(lease_id, refund_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_lease_ledger_refund_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_lease_ledger_refund_by_id"
  end
  # verify the required parameter 'refund_id' is set
  if @api_client.config.client_side_validation && refund_id.nil?
    fail ArgumentError, "Missing the required parameter 'refund_id' when calling LeaseTransactionsApi.get_lease_ledger_refund_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/refunds/{refundId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'refundId' + '}', CGI.escape(refund_id.to_s))

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

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

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

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

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

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

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

#get_lease_ledger_transaction_by_id(lease_id, transaction_id, opts = {}) ⇒ LeaseTransactionMessage

Retrieve a lease transaction Retrieves a specific lease transaction. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease Transactions</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • transaction_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1056
1057
1058
1059
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1056

def get_lease_ledger_transaction_by_id(lease_id, transaction_id, opts = {})
  data, _status_code, _headers = get_lease_ledger_transaction_by_id_with_http_info(lease_id, transaction_id, opts)
  data
end

#get_lease_ledger_transaction_by_id_with_http_info(lease_id, transaction_id, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Retrieve a lease transaction Retrieves a specific lease transaction. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • transaction_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



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
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1067

def get_lease_ledger_transaction_by_id_with_http_info(lease_id, transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_lease_ledger_transaction_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_lease_ledger_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 LeaseTransactionsApi.get_lease_ledger_transaction_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/transactions/{transactionId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).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] || 'LeaseTransactionMessage'

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

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

#get_lease_ledgers(lease_id, opts = {}) ⇒ Array<LeaseTransactionMessage>

Retrieve all lease transactions Retrieves all the transactions for a specific lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :transactiondatefrom (Date)

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

  • :transactiondateto (Date)

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

  • :transactiontypes (Array<String>)

    Filters results to any lease transaction whose lease transaction type matches the specified status. If no type is specified, lease transactions with any type 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:



1130
1131
1132
1133
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1130

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

#get_lease_ledgers_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<LeaseTransactionMessage>, Integer, Hash)>

Retrieve all lease transactions Retrieves all the transactions for a specific lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :transactiondatefrom (Date)

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

  • :transactiondateto (Date)

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

  • :transactiontypes (Array<String>)

    Filters results to any lease transaction whose lease transaction type matches the specified status. If no type is specified, lease transactions with any type 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<LeaseTransactionMessage>, Integer, Hash)>)

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



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
1196
1197
1198
1199
1200
1201
1202
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1146

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

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

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

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

#get_lease_outstanding_balances(opts = {}) ⇒ Array<LeaseOutstandingBalanceMessage>

Retrieve all outstanding balances Retrieves a list of leases that have outstanding balances. Leases with a zero or credit balance will not be returned in the results. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Outstanding Balances</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)
  • :entityid (Integer)
  • :leasestatuses (Array<String>)
  • :leaseids (Array<Integer>)
  • :pastdueemail (String)
  • :balanceduration (String)
  • :evictionstatus (String)
  • :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:



1218
1219
1220
1221
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1218

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

#get_lease_outstanding_balances_with_http_info(opts = {}) ⇒ Array<(Array<LeaseOutstandingBalanceMessage>, Integer, Hash)>

Retrieve all outstanding balances Retrieves a list of leases that have outstanding balances. Leases with a zero or credit balance will not be returned in the results. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Outstanding Balances&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)
  • :entityid (Integer)
  • :leasestatuses (Array<String>)
  • :leaseids (Array<Integer>)
  • :pastdueemail (String)
  • :balanceduration (String)
  • :evictionstatus (String)
  • :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<LeaseOutstandingBalanceMessage>, Integer, Hash)>)

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



1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
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
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1237

def get_lease_outstanding_balances_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_lease_outstanding_balances ...'
  end
  allowable_values = ["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
  allowable_values = ["Active", "Past", "Future"]
  if @api_client.config.client_side_validation && opts[:'leasestatuses'] && !opts[:'leasestatuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"leasestatuses\", must include one of #{allowable_values}"
  end
  allowable_values = ["NoEmailAddress", "Sent"]
  if @api_client.config.client_side_validation && opts[:'pastdueemail'] && !allowable_values.include?(opts[:'pastdueemail'])
    fail ArgumentError, "invalid value for \"pastdueemail\", must be one of #{allowable_values}"
  end
  allowable_values = ["TotalBalance", "Balance0to30Days", "Balance31to60Days", "Balance61to90Days", "BalanceOver90Days"]
  if @api_client.config.client_side_validation && opts[:'balanceduration'] && !allowable_values.include?(opts[:'balanceduration'])
    fail ArgumentError, "invalid value for \"balanceduration\", must be one of #{allowable_values}"
  end
  allowable_values = ["NotEvictionPending", "EvictionPending"]
  if @api_client.config.client_side_validation && opts[:'evictionstatus'] && !allowable_values.include?(opts[:'evictionstatus'])
    fail ArgumentError, "invalid value for \"evictionstatus\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/leases/outstandingbalances'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'leasestatuses'] = @api_client.build_collection_param(opts[:'leasestatuses'], :multi) if !opts[:'leasestatuses'].nil?
  query_params[:'leaseids'] = @api_client.build_collection_param(opts[:'leaseids'], :multi) if !opts[:'leaseids'].nil?
  query_params[:'pastdueemail'] = opts[:'pastdueemail'] if !opts[:'pastdueemail'].nil?
  query_params[:'balanceduration'] = opts[:'balanceduration'] if !opts[:'balanceduration'].nil?
  query_params[:'evictionstatus'] = opts[:'evictionstatus'] if !opts[:'evictionstatus'].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<LeaseOutstandingBalanceMessage>'

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

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

#get_lease_recurring_credit_by_id(lease_id, transaction_id, opts = {}) ⇒ LeaseRecurringCreditMessage

Retrieve a recurring credit Retrieves a recurring credit. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • transaction_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1317
1318
1319
1320
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1317

def get_lease_recurring_credit_by_id(lease_id, transaction_id, opts = {})
  data, _status_code, _headers = get_lease_recurring_credit_by_id_with_http_info(lease_id, transaction_id, opts)
  data
end

#get_lease_recurring_credit_by_id_with_http_info(lease_id, transaction_id, opts = {}) ⇒ Array<(LeaseRecurringCreditMessage, Integer, Hash)>

Retrieve a recurring credit Retrieves a recurring credit. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • transaction_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LeaseRecurringCreditMessage data, response status code and response headers



1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1328

def get_lease_recurring_credit_by_id_with_http_info(lease_id, transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_lease_recurring_credit_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_lease_recurring_credit_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 LeaseTransactionsApi.get_lease_recurring_credit_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/recurringcredits/{transactionId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).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] || 'LeaseRecurringCreditMessage'

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

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

#get_lease_recurring_transactions(lease_id, opts = {}) ⇒ Array<RecurringTransactionMessage>

Retrieve all recurring transactions Retrieves all recurring transactions for a given lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

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



1388
1389
1390
1391
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1388

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

#get_lease_recurring_transactions_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<RecurringTransactionMessage>, Integer, Hash)>

Retrieve all recurring transactions Retrieves all recurring transactions for a given lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_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<RecurringTransactionMessage>, Integer, Hash)>)

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



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
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1401

def get_lease_recurring_transactions_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_lease_recurring_transactions ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_lease_recurring_transactions"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/recurringtransactions'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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<RecurringTransactionMessage>'

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

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

#get_recurring_lease_payments_by_id(lease_id, payment_id, opts = {}) ⇒ LeaseRecurringPaymentMessage

Retrieve a recurring payment Retrieves a recurring payment. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease Transactions</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



1458
1459
1460
1461
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1458

def get_recurring_lease_payments_by_id(lease_id, payment_id, opts = {})
  data, _status_code, _headers = get_recurring_lease_payments_by_id_with_http_info(lease_id, payment_id, opts)
  data
end

#get_recurring_lease_payments_by_id_with_http_info(lease_id, payment_id, opts = {}) ⇒ Array<(LeaseRecurringPaymentMessage, Integer, Hash)>

Retrieve a recurring payment Retrieves a recurring payment. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Returns:



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
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1469

def get_recurring_lease_payments_by_id_with_http_info(lease_id, payment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.get_recurring_lease_payments_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.get_recurring_lease_payments_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 LeaseTransactionsApi.get_recurring_lease_payments_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/recurringpayments/{paymentId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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] || 'LeaseRecurringPaymentMessage'

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

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

#update_deposit_withholding(lease_id, deposit_id, update_deposit_withholding_request, opts = {}) ⇒ LeaseTransactionMessage

Update a deposit withholding Updates a resident deposit withholding. <br /><br /><h4>Required permission(s):</h4><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease Ledger</span> - ‘View` `Edit` <br /><span class="permissionBlock">Accounting > General Ledger Accounts</span> - `View`

Parameters:

  • lease_id (Integer)
  • deposit_id (Integer)
  • update_deposit_withholding_request (UpdateDepositWithholdingRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1528
1529
1530
1531
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1528

def update_deposit_withholding(lease_id, deposit_id, update_deposit_withholding_request, opts = {})
  data, _status_code, _headers = update_deposit_withholding_with_http_info(lease_id, deposit_id, update_deposit_withholding_request, opts)
  data
end

#update_deposit_withholding_with_http_info(lease_id, deposit_id, update_deposit_withholding_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Update a deposit withholding Updates a resident deposit withholding. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease Ledger&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &gt; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • deposit_id (Integer)
  • update_deposit_withholding_request (UpdateDepositWithholdingRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1540

def update_deposit_withholding_with_http_info(lease_id, deposit_id, update_deposit_withholding_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.update_deposit_withholding ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.update_deposit_withholding"
  end
  # verify the required parameter 'deposit_id' is set
  if @api_client.config.client_side_validation && deposit_id.nil?
    fail ArgumentError, "Missing the required parameter 'deposit_id' when calling LeaseTransactionsApi.update_deposit_withholding"
  end
  # verify the required parameter 'update_deposit_withholding_request' is set
  if @api_client.config.client_side_validation && update_deposit_withholding_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_deposit_withholding_request' when calling LeaseTransactionsApi.update_deposit_withholding"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/applieddeposits/{depositId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'depositId' + '}', CGI.escape(deposit_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(update_deposit_withholding_request)

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

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

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

#update_lease_charge(lease_id, charge_id, update_lease_charge_request, opts = {}) ⇒ LeaseTransactionMessage

Update a charge Updates a charge. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)
  • charge_id (Integer)
  • update_lease_charge_request (UpdateLeaseChargeRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1608
1609
1610
1611
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1608

def update_lease_charge(lease_id, charge_id, update_lease_charge_request, opts = {})
  data, _status_code, _headers = update_lease_charge_with_http_info(lease_id, charge_id, update_lease_charge_request, opts)
  data
end

#update_lease_charge_with_http_info(lease_id, charge_id, update_lease_charge_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Update a charge Updates a charge. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • charge_id (Integer)
  • update_lease_charge_request (UpdateLeaseChargeRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
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
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1620

def update_lease_charge_with_http_info(lease_id, charge_id, update_lease_charge_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.update_lease_charge ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.update_lease_charge"
  end
  # verify the required parameter 'charge_id' is set
  if @api_client.config.client_side_validation && charge_id.nil?
    fail ArgumentError, "Missing the required parameter 'charge_id' when calling LeaseTransactionsApi.update_lease_charge"
  end
  # verify the required parameter 'update_lease_charge_request' is set
  if @api_client.config.client_side_validation && update_lease_charge_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_lease_charge_request' when calling LeaseTransactionsApi.update_lease_charge"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/charges/{chargeId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'chargeId' + '}', CGI.escape(charge_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(update_lease_charge_request)

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

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

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

#update_lease_ledger_payment(lease_id, payment_id, update_lease_ledger_payment_request, opts = {}) ⇒ LeaseTransactionMessage

Update a payment Updates a ledger payment. Each line item must have a unique general ledger account identifier. PaymentMethod, Date, Memo, and the total Amount cannot be changed for payments with a PaymentMethod of ‘BuildiumEFT`, `BuildiumCC` or `RetailCash`. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - `View` `Edit`

Parameters:

  • lease_id (Integer)
  • payment_id (Integer)
  • update_lease_ledger_payment_request (UpdateLeaseLedgerPaymentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1688
1689
1690
1691
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1688

def update_lease_ledger_payment(lease_id, payment_id, update_lease_ledger_payment_request, opts = {})
  data, _status_code, _headers = update_lease_ledger_payment_with_http_info(lease_id, payment_id, update_lease_ledger_payment_request, opts)
  data
end

#update_lease_ledger_payment_with_http_info(lease_id, payment_id, update_lease_ledger_payment_request, opts = {}) ⇒ Array<(LeaseTransactionMessage, Integer, Hash)>

Update a payment Updates a ledger payment. Each line item must have a unique general ledger account identifier. PaymentMethod, Date, Memo, and the total Amount cannot be changed for payments with a PaymentMethod of &#x60;BuildiumEFT&#x60;, &#x60;BuildiumCC&#x60; or &#x60;RetailCash&#x60;. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • payment_id (Integer)
  • update_lease_ledger_payment_request (UpdateLeaseLedgerPaymentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
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
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1700

def update_lease_ledger_payment_with_http_info(lease_id, payment_id, update_lease_ledger_payment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeaseTransactionsApi.update_lease_ledger_payment ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeaseTransactionsApi.update_lease_ledger_payment"
  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 LeaseTransactionsApi.update_lease_ledger_payment"
  end
  # verify the required parameter 'update_lease_ledger_payment_request' is set
  if @api_client.config.client_side_validation && update_lease_ledger_payment_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_lease_ledger_payment_request' when calling LeaseTransactionsApi.update_lease_ledger_payment"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/payments/{paymentId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_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'])
  # 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(update_lease_ledger_payment_request)

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

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

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