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, lease_auto_allocated_payment_post_message, 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 &gt; Application Settings &gt; 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 &gt; 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, lease_auto_allocated_payment_post_message, opts = {})
  data, _status_code, _headers = create_lease_auto_allocated_payment_with_http_info(lease_id, lease_auto_allocated_payment_post_message, opts)
  data
end

#create_lease_auto_allocated_payment_with_http_info(lease_id, lease_auto_allocated_payment_post_message, 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 &amp;gt; Application Settings &amp;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 &amp;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, lease_auto_allocated_payment_post_message, 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 'lease_auto_allocated_payment_post_message' is set
  if @api_client.config.client_side_validation && lease_auto_allocated_payment_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_auto_allocated_payment_post_message' 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(lease_auto_allocated_payment_post_message)

  # 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, charge_recurring_transaction_post_message, 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 &gt; 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, charge_recurring_transaction_post_message, opts = {})
  data, _status_code, _headers = create_lease_charge_recurring_transaction_with_http_info(lease_id, charge_recurring_transaction_post_message, opts)
  data
end

#create_lease_charge_recurring_transaction_with_http_info(lease_id, charge_recurring_transaction_post_message, 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 &amp;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, charge_recurring_transaction_post_message, 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 'charge_recurring_transaction_post_message' is set
  if @api_client.config.client_side_validation && charge_recurring_transaction_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'charge_recurring_transaction_post_message' 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(charge_recurring_transaction_post_message)

  # 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, lease_ledger_credit_post_message, opts = {}) ⇒ LeaseTransactionMessage

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

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

  • lease_ledger_credit_post_message (LeaseLedgerCreditPostMessage)
  • 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, lease_ledger_credit_post_message, opts = {})
  data, _status_code, _headers = create_lease_credit_with_http_info(lease_id, lease_ledger_credit_post_message, opts)
  data
end

#create_lease_credit_recurring_transaction(lease_id, credit_recurring_transaction_post_message, 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 &gt; 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, credit_recurring_transaction_post_message, opts = {})
  data, _status_code, _headers = create_lease_credit_recurring_transaction_with_http_info(lease_id, credit_recurring_transaction_post_message, opts)
  data
end

#create_lease_credit_recurring_transaction_with_http_info(lease_id, credit_recurring_transaction_post_message, 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 &amp;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, credit_recurring_transaction_post_message, 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 'credit_recurring_transaction_post_message' is set
  if @api_client.config.client_side_validation && credit_recurring_transaction_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'credit_recurring_transaction_post_message' 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(credit_recurring_transaction_post_message)

  # 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, lease_ledger_credit_post_message, 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 &amp;gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

  • lease_ledger_credit_post_message (LeaseLedgerCreditPostMessage)
  • 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, lease_ledger_credit_post_message, 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 'lease_ledger_credit_post_message' is set
  if @api_client.config.client_side_validation && lease_ledger_credit_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_ledger_credit_post_message' 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(lease_ledger_credit_post_message)

  # 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, lease_charge_post_message, 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 &gt; Lease transactions</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



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

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

#create_lease_ledger_charge_with_http_info(lease_id, lease_charge_post_message, 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 &amp;gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional 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, lease_charge_post_message, 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 'lease_charge_post_message' is set
  if @api_client.config.client_side_validation && lease_charge_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_charge_post_message' 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(lease_charge_post_message)

  # 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, lease_ledger_deposit_withholding_post_message, 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 &gt; Lease Ledger</span> - ‘View` `Edit` <br /><span class="permissionBlock">Accounting &gt; 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, lease_ledger_deposit_withholding_post_message, opts = {})
  data, _status_code, _headers = create_lease_ledger_deposit_withholding_with_http_info(lease_id, lease_ledger_deposit_withholding_post_message, opts)
  data
end

#create_lease_ledger_deposit_withholding_with_http_info(lease_id, lease_ledger_deposit_withholding_post_message, 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 &amp;gt; Lease Ledger&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;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, lease_ledger_deposit_withholding_post_message, 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 'lease_ledger_deposit_withholding_post_message' is set
  if @api_client.config.client_side_validation && lease_ledger_deposit_withholding_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_ledger_deposit_withholding_post_message' 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(lease_ledger_deposit_withholding_post_message)

  # 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, lease_ledger_refund_post_message, opts = {}) ⇒ LeaseLedgerRefundMessage

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

Parameters:

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

    the optional parameters

Returns:



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

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

#create_lease_ledger_refund_with_http_info(lease_id, lease_ledger_refund_post_message, 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 &amp;gt; Bank Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional 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, lease_ledger_refund_post_message, 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 'lease_ledger_refund_post_message' is set
  if @api_client.config.client_side_validation && lease_ledger_refund_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_ledger_refund_post_message' 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(lease_ledger_refund_post_message)

  # 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, payment_recurring_transaction_post_message, 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 &gt; 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, payment_recurring_transaction_post_message, opts = {})
  data, _status_code, _headers = create_lease_recurring_payment_with_http_info(lease_id, payment_recurring_transaction_post_message, opts)
  data
end

#create_lease_recurring_payment_with_http_info(lease_id, payment_recurring_transaction_post_message, 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 &amp;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, payment_recurring_transaction_post_message, 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 'payment_recurring_transaction_post_message' is set
  if @api_client.config.client_side_validation && payment_recurring_transaction_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'payment_recurring_transaction_post_message' 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(payment_recurring_transaction_post_message)

  # 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, lease_ledger_reverse_payment_post_message, 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 &gt; Lease transactions</span> - ‘View` `Edit` <br /><span class="permissionBlock">Accounting &gt; Bank Accounts</span> - `View` `Edit`

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

  • lease_ledger_reverse_payment_post_message (LeaseLedgerReversePaymentPostMessage)
  • 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, lease_ledger_reverse_payment_post_message, opts = {})
  data, _status_code, _headers = create_lease_reverse_payment_with_http_info(lease_id, lease_ledger_reverse_payment_post_message, opts)
  data
end

#create_lease_reverse_payment_with_http_info(lease_id, lease_ledger_reverse_payment_post_message, 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 &amp;gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; Bank Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

  • lease_ledger_reverse_payment_post_message (LeaseLedgerReversePaymentPostMessage)
  • 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, lease_ledger_reverse_payment_post_message, 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 'lease_ledger_reverse_payment_post_message' is set
  if @api_client.config.client_side_validation && lease_ledger_reverse_payment_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_ledger_reverse_payment_post_message' 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(lease_ledger_reverse_payment_post_message)

  # 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, lease_ledger_payment_post_message, opts = {}) ⇒ LeaseTransactionMessage

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

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

  • lease_ledger_payment_post_message (LeaseLedgerPaymentPostMessage)
  • 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, lease_ledger_payment_post_message, opts = {})
  data, _status_code, _headers = create_payment_with_http_info(lease_id, lease_ledger_payment_post_message, opts)
  data
end

#create_payment_with_http_info(lease_id, lease_ledger_payment_post_message, 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 &amp;gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)

    The lease unique identifier.

  • lease_ledger_payment_post_message (LeaseLedgerPaymentPostMessage)
  • 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, lease_ledger_payment_post_message, 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 'lease_ledger_payment_post_message' is set
  if @api_client.config.client_side_validation && lease_ledger_payment_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_ledger_payment_post_message' 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(lease_ledger_payment_post_message)

  # 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_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 &gt; Lease transactions</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



768
769
770
771
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 768

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 &amp;gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Returns:



779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 779

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 &gt; Bank Accounts</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



837
838
839
840
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 837

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 &amp;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



848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 848

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 &gt; Lease Transactions</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



906
907
908
909
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 906

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 &amp;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



917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 917

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 &gt; 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:



980
981
982
983
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 980

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 &amp;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



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

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 &gt; 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:



1068
1069
1070
1071
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1068

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 &amp;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



1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1087

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 &gt; Lease transactions</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



1167
1168
1169
1170
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1167

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 &amp;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



1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1178

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 &gt; 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:



1238
1239
1240
1241
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1238

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 &amp;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



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

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 &gt; Lease Transactions</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



1308
1309
1310
1311
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1308

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 &amp;gt; Lease Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Returns:



1319
1320
1321
1322
1323
1324
1325
1326
1327
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
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1319

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_lease_charge(lease_id, charge_id, lease_charge_put_message, opts = {}) ⇒ LeaseTransactionMessage

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

Parameters:

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

    the optional parameters

Returns:



1378
1379
1380
1381
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1378

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

#update_lease_charge_with_http_info(lease_id, charge_id, lease_charge_put_message, 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 &amp;gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1390

def update_lease_charge_with_http_info(lease_id, charge_id, lease_charge_put_message, 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 'lease_charge_put_message' is set
  if @api_client.config.client_side_validation && lease_charge_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_charge_put_message' 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(lease_charge_put_message)

  # 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, lease_ledger_payment_put_message, opts = {}) ⇒ LeaseTransactionMessage

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

Parameters:

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

    the optional parameters

Returns:



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

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

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

Update a payment Updates a 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 &amp;gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    LeaseTransactionMessage data, response status code and response headers



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
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
# File 'lib/buildium-ruby/api/lease_transactions_api.rb', line 1470

def update_lease_ledger_payment_with_http_info(lease_id, payment_id, lease_ledger_payment_put_message, 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 'lease_ledger_payment_put_message' is set
  if @api_client.config.client_side_validation && lease_ledger_payment_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'lease_ledger_payment_put_message' 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(lease_ledger_payment_put_message)

  # 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