propertyware 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (392) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ci.yml +27 -0
  3. data/.github/workflows/publish.yml +48 -0
  4. data/.gitignore +39 -0
  5. data/.openapi-generator/FILES +375 -0
  6. data/.openapi-generator/VERSION +1 -0
  7. data/.openapi-generator/templates/ruby-client/gemspec.mustache +37 -0
  8. data/.openapi-generator/templates/ruby-client/partial_model_generic.mustache +371 -0
  9. data/.openapi-generator/templates/ruby-client/rubocop.mustache +124 -0
  10. data/.openapi-generator-ignore +23 -0
  11. data/.rspec +2 -0
  12. data/.rubocop.yml +124 -0
  13. data/CUSTOMIZATIONS.md +11 -0
  14. data/DOCS.md +673 -0
  15. data/Gemfile +9 -0
  16. data/Gemfile.lock +76 -0
  17. data/README.md +93 -0
  18. data/Rakefile +10 -0
  19. data/bin/CUSTOMIZATIONS.md +11 -0
  20. data/bin/README.md +93 -0
  21. data/bin/config.yml +7 -0
  22. data/bin/fix_json.rb +59 -0
  23. data/bin/propertyware.json +1 -0
  24. data/bin/rebuild.sh +31 -0
  25. data/docs/Account.md +84 -0
  26. data/docs/AccountingApi.md +1235 -0
  27. data/docs/Address.md +28 -0
  28. data/docs/Amenity.md +24 -0
  29. data/docs/AutoJournalEntry.md +46 -0
  30. data/docs/AutoPayment.md +42 -0
  31. data/docs/Bank.md +52 -0
  32. data/docs/BankDeposit.md +32 -0
  33. data/docs/BasicVendor.md +40 -0
  34. data/docs/Bill.md +54 -0
  35. data/docs/BillPaid.md +24 -0
  36. data/docs/BillPay.md +20 -0
  37. data/docs/BillPayment.md +46 -0
  38. data/docs/BillSplit.md +42 -0
  39. data/docs/BillsApi.md +1391 -0
  40. data/docs/Building.md +116 -0
  41. data/docs/BuildingsApi.md +1037 -0
  42. data/docs/Campaign.md +60 -0
  43. data/docs/CampaignSource.md +26 -0
  44. data/docs/Charge.md +36 -0
  45. data/docs/ChargeTx.md +52 -0
  46. data/docs/Check.md +48 -0
  47. data/docs/CheckSplit.md +30 -0
  48. data/docs/Comment.md +28 -0
  49. data/docs/Contact.md +74 -0
  50. data/docs/ContactsApi.md +783 -0
  51. data/docs/Conversation.md +36 -0
  52. data/docs/CreditCardAccount.md +18 -0
  53. data/docs/CurrentAsset.md +30 -0
  54. data/docs/CurrentLiability.md +30 -0
  55. data/docs/CustomField.md +24 -0
  56. data/docs/Discount.md +40 -0
  57. data/docs/Document.md +40 -0
  58. data/docs/DocumentsApi.md +267 -0
  59. data/docs/Entry.md +34 -0
  60. data/docs/Equity.md +32 -0
  61. data/docs/ErrorResponse.md +22 -0
  62. data/docs/Expense.md +32 -0
  63. data/docs/GLItem.md +40 -0
  64. data/docs/HealthCheckApi.md +86 -0
  65. data/docs/Income.md +34 -0
  66. data/docs/Inspection.md +46 -0
  67. data/docs/InspectionArea.md +22 -0
  68. data/docs/InspectionItem.md +24 -0
  69. data/docs/InspectionsApi.md +193 -0
  70. data/docs/JournalEntry.md +36 -0
  71. data/docs/JournalEntrySplit.md +24 -0
  72. data/docs/JournalEntrySplitResponse.md +24 -0
  73. data/docs/LateFeeRule.md +26 -0
  74. data/docs/Lease.md +76 -0
  75. data/docs/LeaseClause.md +22 -0
  76. data/docs/LeaseContact.md +36 -0
  77. data/docs/LeasesApi.md +3319 -0
  78. data/docs/ManagementFee.md +30 -0
  79. data/docs/ManagementSettings.md +26 -0
  80. data/docs/Marketing.md +62 -0
  81. data/docs/NonCurrentAsset.md +26 -0
  82. data/docs/NonCurrentLiability.md +30 -0
  83. data/docs/NonOperatingExpense.md +32 -0
  84. data/docs/NonOperatingInome.md +32 -0
  85. data/docs/Note.md +28 -0
  86. data/docs/Owner.md +38 -0
  87. data/docs/OwnerContribution.md +44 -0
  88. data/docs/OwnerDraw.md +44 -0
  89. data/docs/Payment.md +50 -0
  90. data/docs/PaymentCharge.md +36 -0
  91. data/docs/Portfolio.md +60 -0
  92. data/docs/PortfoliosApi.md +701 -0
  93. data/docs/PropertyManager.md +26 -0
  94. data/docs/Prospect.md +114 -0
  95. data/docs/ProspectsApi.md +789 -0
  96. data/docs/RESTAPIBulkErrorResponse.md +22 -0
  97. data/docs/RESTAPIBulkSuccessResponse.md +18 -0
  98. data/docs/RESTAPIError.md +20 -0
  99. data/docs/Refund.md +44 -0
  100. data/docs/ResponseEntity.md +20 -0
  101. data/docs/SaveAccount.md +52 -0
  102. data/docs/SaveAddress.md +28 -0
  103. data/docs/SaveAdjustment.md +26 -0
  104. data/docs/SaveAutoCharge.md +28 -0
  105. data/docs/SaveBankDeposit.md +20 -0
  106. data/docs/SaveBill.md +42 -0
  107. data/docs/SaveBillPayment.md +30 -0
  108. data/docs/SaveBillSplit.md +36 -0
  109. data/docs/SaveBuilding.md +84 -0
  110. data/docs/SaveCharge.md +28 -0
  111. data/docs/SaveCheck.md +30 -0
  112. data/docs/SaveCheckSplit.md +30 -0
  113. data/docs/SaveComment.md +18 -0
  114. data/docs/SaveContact.md +60 -0
  115. data/docs/SaveConversation.md +20 -0
  116. data/docs/SaveCredit.md +26 -0
  117. data/docs/SaveDiscount.md +28 -0
  118. data/docs/SaveJournalEntrySplit.md +22 -0
  119. data/docs/SaveLease.md +50 -0
  120. data/docs/SaveLeaseJournalEntry.md +26 -0
  121. data/docs/SaveOwner.md +36 -0
  122. data/docs/SaveOwnerContribution.md +34 -0
  123. data/docs/SaveOwnerDraw.md +34 -0
  124. data/docs/SavePayment.md +34 -0
  125. data/docs/SavePortfolio.md +38 -0
  126. data/docs/SaveProspect.md +76 -0
  127. data/docs/SaveProspectContact.md +36 -0
  128. data/docs/SaveRefund.md +34 -0
  129. data/docs/SaveUnit.md +60 -0
  130. data/docs/SaveVendor.md +46 -0
  131. data/docs/SaveWorkOrder.md +36 -0
  132. data/docs/SaveWorkOrderTask.md +30 -0
  133. data/docs/SplitPaid.md +34 -0
  134. data/docs/SplitPay.md +20 -0
  135. data/docs/Task.md +42 -0
  136. data/docs/Transaction.md +54 -0
  137. data/docs/Unit.md +96 -0
  138. data/docs/UnitsApi.md +875 -0
  139. data/docs/UpdateLeaseJournalEntry.md +26 -0
  140. data/docs/Vendor.md +76 -0
  141. data/docs/VendorsApi.md +617 -0
  142. data/docs/WorkOrder.md +78 -0
  143. data/docs/WorkOrdersApi.md +883 -0
  144. data/lib/propertyware/api/accounting_api.rb +1041 -0
  145. data/lib/propertyware/api/bills_api.rb +1182 -0
  146. data/lib/propertyware/api/buildings_api.rb +863 -0
  147. data/lib/propertyware/api/contacts_api.rb +666 -0
  148. data/lib/propertyware/api/documents_api.rb +235 -0
  149. data/lib/propertyware/api/health_check_api.rb +79 -0
  150. data/lib/propertyware/api/inspections_api.rb +172 -0
  151. data/lib/propertyware/api/leases_api.rb +2787 -0
  152. data/lib/propertyware/api/portfolios_api.rb +599 -0
  153. data/lib/propertyware/api/prospects_api.rb +671 -0
  154. data/lib/propertyware/api/units_api.rb +740 -0
  155. data/lib/propertyware/api/vendors_api.rb +522 -0
  156. data/lib/propertyware/api/work_orders_api.rb +763 -0
  157. data/lib/propertyware/api_client.rb +428 -0
  158. data/lib/propertyware/api_error.rb +58 -0
  159. data/lib/propertyware/configuration.rb +392 -0
  160. data/lib/propertyware/models/account.rb +549 -0
  161. data/lib/propertyware/models/address.rb +269 -0
  162. data/lib/propertyware/models/amenity.rb +249 -0
  163. data/lib/propertyware/models/auto_journal_entry.rb +358 -0
  164. data/lib/propertyware/models/auto_payment.rb +338 -0
  165. data/lib/propertyware/models/bank.rb +389 -0
  166. data/lib/propertyware/models/bank_deposit.rb +289 -0
  167. data/lib/propertyware/models/basic_vendor.rb +330 -0
  168. data/lib/propertyware/models/bill.rb +401 -0
  169. data/lib/propertyware/models/bill_paid.rb +250 -0
  170. data/lib/propertyware/models/bill_pay.rb +230 -0
  171. data/lib/propertyware/models/bill_payment.rb +361 -0
  172. data/lib/propertyware/models/bill_split.rb +339 -0
  173. data/lib/propertyware/models/building.rb +782 -0
  174. data/lib/propertyware/models/campaign.rb +430 -0
  175. data/lib/propertyware/models/campaign_source.rb +258 -0
  176. data/lib/propertyware/models/charge.rb +318 -0
  177. data/lib/propertyware/models/charge_tx.rb +401 -0
  178. data/lib/propertyware/models/check.rb +425 -0
  179. data/lib/propertyware/models/check_split.rb +284 -0
  180. data/lib/propertyware/models/comment.rb +269 -0
  181. data/lib/propertyware/models/contact.rb +546 -0
  182. data/lib/propertyware/models/conversation.rb +345 -0
  183. data/lib/propertyware/models/credit_card_account.rb +219 -0
  184. data/lib/propertyware/models/current_asset.rb +279 -0
  185. data/lib/propertyware/models/current_liability.rb +279 -0
  186. data/lib/propertyware/models/custom_field.rb +249 -0
  187. data/lib/propertyware/models/discount.rb +339 -0
  188. data/lib/propertyware/models/document.rb +362 -0
  189. data/lib/propertyware/models/entry.rb +297 -0
  190. data/lib/propertyware/models/equity.rb +289 -0
  191. data/lib/propertyware/models/error_response.rb +237 -0
  192. data/lib/propertyware/models/expense.rb +289 -0
  193. data/lib/propertyware/models/gl_item.rb +330 -0
  194. data/lib/propertyware/models/income.rb +299 -0
  195. data/lib/propertyware/models/inspection.rb +361 -0
  196. data/lib/propertyware/models/inspection_area.rb +241 -0
  197. data/lib/propertyware/models/inspection_item.rb +249 -0
  198. data/lib/propertyware/models/journal_entry.rb +311 -0
  199. data/lib/propertyware/models/journal_entry_split.rb +264 -0
  200. data/lib/propertyware/models/journal_entry_split_response.rb +263 -0
  201. data/lib/propertyware/models/late_fee_rule.rb +258 -0
  202. data/lib/propertyware/models/lease.rb +515 -0
  203. data/lib/propertyware/models/lease_clause.rb +238 -0
  204. data/lib/propertyware/models/lease_contact.rb +309 -0
  205. data/lib/propertyware/models/management_fee.rb +279 -0
  206. data/lib/propertyware/models/management_settings.rb +261 -0
  207. data/lib/propertyware/models/marketing.rb +439 -0
  208. data/lib/propertyware/models/non_current_asset.rb +259 -0
  209. data/lib/propertyware/models/non_current_liability.rb +279 -0
  210. data/lib/propertyware/models/non_operating_expense.rb +289 -0
  211. data/lib/propertyware/models/non_operating_inome.rb +289 -0
  212. data/lib/propertyware/models/note.rb +267 -0
  213. data/lib/propertyware/models/owner.rb +318 -0
  214. data/lib/propertyware/models/owner_contribution.rb +418 -0
  215. data/lib/propertyware/models/owner_draw.rb +398 -0
  216. data/lib/propertyware/models/payment.rb +423 -0
  217. data/lib/propertyware/models/payment_charge.rb +358 -0
  218. data/lib/propertyware/models/portfolio.rb +479 -0
  219. data/lib/propertyware/models/property_manager.rb +259 -0
  220. data/lib/propertyware/models/prospect.rb +701 -0
  221. data/lib/propertyware/models/refund.rb +384 -0
  222. data/lib/propertyware/models/response_entity.rb +260 -0
  223. data/lib/propertyware/models/restapi_bulk_error_response.rb +237 -0
  224. data/lib/propertyware/models/restapi_bulk_success_response.rb +217 -0
  225. data/lib/propertyware/models/restapi_error.rb +226 -0
  226. data/lib/propertyware/models/save_account.rb +398 -0
  227. data/lib/propertyware/models/save_address.rb +274 -0
  228. data/lib/propertyware/models/save_adjustment.rb +269 -0
  229. data/lib/propertyware/models/save_auto_charge.rb +328 -0
  230. data/lib/propertyware/models/save_bank_deposit.rb +239 -0
  231. data/lib/propertyware/models/save_bill.rb +356 -0
  232. data/lib/propertyware/models/save_bill_payment.rb +314 -0
  233. data/lib/propertyware/models/save_bill_split.rb +319 -0
  234. data/lib/propertyware/models/save_building.rb +653 -0
  235. data/lib/propertyware/models/save_charge.rb +289 -0
  236. data/lib/propertyware/models/save_check.rb +291 -0
  237. data/lib/propertyware/models/save_check_split.rb +289 -0
  238. data/lib/propertyware/models/save_comment.rb +224 -0
  239. data/lib/propertyware/models/save_contact.rb +472 -0
  240. data/lib/propertyware/models/save_conversation.rb +273 -0
  241. data/lib/propertyware/models/save_credit.rb +271 -0
  242. data/lib/propertyware/models/save_discount.rb +289 -0
  243. data/lib/propertyware/models/save_journal_entry_split.rb +254 -0
  244. data/lib/propertyware/models/save_lease.rb +444 -0
  245. data/lib/propertyware/models/save_lease_journal_entry.rb +276 -0
  246. data/lib/propertyware/models/save_owner.rb +318 -0
  247. data/lib/propertyware/models/save_owner_contribution.rb +373 -0
  248. data/lib/propertyware/models/save_owner_draw.rb +334 -0
  249. data/lib/propertyware/models/save_payment.rb +373 -0
  250. data/lib/propertyware/models/save_portfolio.rb +379 -0
  251. data/lib/propertyware/models/save_prospect.rb +511 -0
  252. data/lib/propertyware/models/save_prospect_contact.rb +318 -0
  253. data/lib/propertyware/models/save_refund.rb +334 -0
  254. data/lib/propertyware/models/save_unit.rb +492 -0
  255. data/lib/propertyware/models/save_vendor.rb +379 -0
  256. data/lib/propertyware/models/save_work_order.rb +345 -0
  257. data/lib/propertyware/models/save_work_order_task.rb +284 -0
  258. data/lib/propertyware/models/split_paid.rb +298 -0
  259. data/lib/propertyware/models/split_pay.rb +228 -0
  260. data/lib/propertyware/models/task.rb +339 -0
  261. data/lib/propertyware/models/transaction.rb +433 -0
  262. data/lib/propertyware/models/unit.rb +670 -0
  263. data/lib/propertyware/models/update_lease_journal_entry.rb +276 -0
  264. data/lib/propertyware/models/vendor.rb +511 -0
  265. data/lib/propertyware/models/work_order.rb +557 -0
  266. data/lib/propertyware/version.rb +15 -0
  267. data/lib/propertyware.rb +158 -0
  268. data/openapitools.json +7 -0
  269. data/propertyware.gemspec +39 -0
  270. data/spec/api/accounting_api_spec.rb +239 -0
  271. data/spec/api/bills_api_spec.rb +260 -0
  272. data/spec/api/buildings_api_spec.rb +199 -0
  273. data/spec/api/contacts_api_spec.rb +159 -0
  274. data/spec/api/documents_api_spec.rb +77 -0
  275. data/spec/api/health_check_api_spec.rb +46 -0
  276. data/spec/api/inspections_api_spec.rb +68 -0
  277. data/spec/api/leases_api_spec.rb +579 -0
  278. data/spec/api/portfolios_api_spec.rb +147 -0
  279. data/spec/api/prospects_api_spec.rb +162 -0
  280. data/spec/api/units_api_spec.rb +176 -0
  281. data/spec/api/vendors_api_spec.rb +134 -0
  282. data/spec/api/work_orders_api_spec.rb +180 -0
  283. data/spec/api_client_spec.rb +223 -0
  284. data/spec/configuration_spec.rb +82 -0
  285. data/spec/models/account_spec.rb +232 -0
  286. data/spec/models/address_spec.rb +64 -0
  287. data/spec/models/amenity_spec.rb +52 -0
  288. data/spec/models/auto_journal_entry_spec.rb +118 -0
  289. data/spec/models/auto_payment_spec.rb +106 -0
  290. data/spec/models/bank_deposit_spec.rb +76 -0
  291. data/spec/models/bank_spec.rb +136 -0
  292. data/spec/models/basic_vendor_spec.rb +100 -0
  293. data/spec/models/bill_paid_spec.rb +52 -0
  294. data/spec/models/bill_pay_spec.rb +40 -0
  295. data/spec/models/bill_payment_spec.rb +118 -0
  296. data/spec/models/bill_spec.rb +142 -0
  297. data/spec/models/bill_split_spec.rb +106 -0
  298. data/spec/models/building_spec.rb +344 -0
  299. data/spec/models/campaign_source_spec.rb +58 -0
  300. data/spec/models/campaign_spec.rb +160 -0
  301. data/spec/models/charge_spec.rb +88 -0
  302. data/spec/models/charge_tx_spec.rb +136 -0
  303. data/spec/models/check_spec.rb +128 -0
  304. data/spec/models/check_split_spec.rb +70 -0
  305. data/spec/models/comment_spec.rb +64 -0
  306. data/spec/models/contact_spec.rb +210 -0
  307. data/spec/models/conversation_spec.rb +92 -0
  308. data/spec/models/credit_card_account_spec.rb +34 -0
  309. data/spec/models/current_asset_spec.rb +70 -0
  310. data/spec/models/current_liability_spec.rb +70 -0
  311. data/spec/models/custom_field_spec.rb +52 -0
  312. data/spec/models/discount_spec.rb +100 -0
  313. data/spec/models/document_spec.rb +104 -0
  314. data/spec/models/entry_spec.rb +82 -0
  315. data/spec/models/equity_spec.rb +76 -0
  316. data/spec/models/error_response_spec.rb +46 -0
  317. data/spec/models/expense_spec.rb +76 -0
  318. data/spec/models/gl_item_spec.rb +100 -0
  319. data/spec/models/income_spec.rb +82 -0
  320. data/spec/models/inspection_area_spec.rb +46 -0
  321. data/spec/models/inspection_item_spec.rb +52 -0
  322. data/spec/models/inspection_spec.rb +118 -0
  323. data/spec/models/journal_entry_spec.rb +88 -0
  324. data/spec/models/journal_entry_split_response_spec.rb +52 -0
  325. data/spec/models/journal_entry_split_spec.rb +52 -0
  326. data/spec/models/late_fee_rule_spec.rb +58 -0
  327. data/spec/models/lease_clause_spec.rb +46 -0
  328. data/spec/models/lease_contact_spec.rb +88 -0
  329. data/spec/models/lease_spec.rb +208 -0
  330. data/spec/models/management_fee_spec.rb +70 -0
  331. data/spec/models/management_settings_spec.rb +58 -0
  332. data/spec/models/marketing_spec.rb +166 -0
  333. data/spec/models/non_current_asset_spec.rb +58 -0
  334. data/spec/models/non_current_liability_spec.rb +70 -0
  335. data/spec/models/non_operating_expense_spec.rb +76 -0
  336. data/spec/models/non_operating_inome_spec.rb +76 -0
  337. data/spec/models/note_spec.rb +64 -0
  338. data/spec/models/owner_contribution_spec.rb +116 -0
  339. data/spec/models/owner_draw_spec.rb +116 -0
  340. data/spec/models/owner_spec.rb +94 -0
  341. data/spec/models/payment_charge_spec.rb +92 -0
  342. data/spec/models/payment_spec.rb +134 -0
  343. data/spec/models/portfolio_spec.rb +168 -0
  344. data/spec/models/property_manager_spec.rb +58 -0
  345. data/spec/models/prospect_spec.rb +322 -0
  346. data/spec/models/refund_spec.rb +112 -0
  347. data/spec/models/response_entity_spec.rb +44 -0
  348. data/spec/models/restapi_bulk_error_response_spec.rb +46 -0
  349. data/spec/models/restapi_bulk_success_response_spec.rb +34 -0
  350. data/spec/models/restapi_error_spec.rb +40 -0
  351. data/spec/models/save_account_spec.rb +136 -0
  352. data/spec/models/save_address_spec.rb +64 -0
  353. data/spec/models/save_adjustment_spec.rb +58 -0
  354. data/spec/models/save_auto_charge_spec.rb +68 -0
  355. data/spec/models/save_bank_deposit_spec.rb +40 -0
  356. data/spec/models/save_bill_payment_spec.rb +74 -0
  357. data/spec/models/save_bill_spec.rb +106 -0
  358. data/spec/models/save_bill_split_spec.rb +88 -0
  359. data/spec/models/save_building_spec.rb +248 -0
  360. data/spec/models/save_charge_spec.rb +64 -0
  361. data/spec/models/save_check_spec.rb +70 -0
  362. data/spec/models/save_check_split_spec.rb +70 -0
  363. data/spec/models/save_comment_spec.rb +34 -0
  364. data/spec/models/save_contact_spec.rb +164 -0
  365. data/spec/models/save_conversation_spec.rb +44 -0
  366. data/spec/models/save_credit_spec.rb +58 -0
  367. data/spec/models/save_discount_spec.rb +64 -0
  368. data/spec/models/save_journal_entry_split_spec.rb +46 -0
  369. data/spec/models/save_lease_journal_entry_spec.rb +58 -0
  370. data/spec/models/save_lease_spec.rb +134 -0
  371. data/spec/models/save_owner_contribution_spec.rb +86 -0
  372. data/spec/models/save_owner_draw_spec.rb +82 -0
  373. data/spec/models/save_owner_spec.rb +88 -0
  374. data/spec/models/save_payment_spec.rb +86 -0
  375. data/spec/models/save_portfolio_spec.rb +102 -0
  376. data/spec/models/save_prospect_contact_spec.rb +88 -0
  377. data/spec/models/save_prospect_spec.rb +208 -0
  378. data/spec/models/save_refund_spec.rb +82 -0
  379. data/spec/models/save_unit_spec.rb +164 -0
  380. data/spec/models/save_vendor_spec.rb +118 -0
  381. data/spec/models/save_work_order_spec.rb +92 -0
  382. data/spec/models/save_work_order_task_spec.rb +70 -0
  383. data/spec/models/split_paid_spec.rb +82 -0
  384. data/spec/models/split_pay_spec.rb +40 -0
  385. data/spec/models/task_spec.rb +106 -0
  386. data/spec/models/transaction_spec.rb +146 -0
  387. data/spec/models/unit_spec.rb +280 -0
  388. data/spec/models/update_lease_journal_entry_spec.rb +58 -0
  389. data/spec/models/vendor_spec.rb +208 -0
  390. data/spec/models/work_order_spec.rb +218 -0
  391. data/spec/spec_helper.rb +111 -0
  392. metadata +609 -0
@@ -0,0 +1,2787 @@
1
+ =begin
2
+ #Open API, powered by Propertyware
3
+
4
+ #<script type=\"text/javascript\" src=\"https://buildium.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-raa8on/b/8/c95134bc67d3a521bb3f4331beb9b804/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=e43cd15d\"></script> # Introduction Welcome to Propertyware’s API—a powerful, RESTful programming interface that lets you leverage valuable Propertyware data. ## Account Configuration Before you can use Propertyware’s API, you’ll need to make some tweaks to your account settings. <br /> ### Enabling the API In order to start creating your keys and making requests, you’ll need to enable the API. > **Tip:** You’ll need an administrator user role with access to ***Administration Setup > API Keys*** to set things up properly. **Let's Begin!** 1. Sign in to your [Propertyware](https://app.propertyware.com/pw/login.jsp) account from your browser. 2. Open the ***Setup*** page 3. On the left navigation bar, expand ***Administration Setup*** and then click ***API Keys***. If you are having issues accessing the API keys page within your account you can submit a [Support](#section/API-Overview/Support) request for assistance. ## API Keys Account-level API keys authenticate every request and keep things secure. API keys have two components: a “client ID” and a “secret”. * **Client IDs** are similar to usernames. They’re used to identify your Propertyware API key and are safe to share. * **Secrets** are similar to passwords. They must be kept confidential. Whenever you make a request, you’ll need the API key’s client ID and secret. If you forget it, make a mistake, or try to use information that’s linked to a deleted key, the API will return a `401` response code. > **Tip:** We compiled a list of best practices that detail how securely store API keys. [Give it a read](#section/Getting-Started/Keeping-API-Keys-Safe)! ## Creating API Keys Now that the Open API is enabled, you’ll be able to create API keys. You’re almost there! **How to create an API key** 1. On the API Keys page, click ***Create API Key***. A modal will appear. <p> <img src=\"APIKey_Page.JPG\"/> </p> <p> <img src=\"APIKey_New.JPG\"/> </p> 2. Enter a clear, memorable name and description for your API key. It’ll make it easier to locate the right key when you make a request. 3. Now, choose which pieces of Propertyware data you want this API key to have access to by selecting the corresponding radio buttons. Once finished, click **GENERATE KEY**. 4. You have successfully created an API key! The client id and secret associated to this key will be presented. <p> <img src=\"APIKey_Generate.JPG\"/> </p> > **Important:** This is your only chance to record the secret. Make sure it’s stored somewhere secure! If it’s forgotten, you’ll need to delete this key and start from scratch. You have now successfully created an API key and have everything you need to send requests to the Propertyware API! Before moving on to [making your first request](#section/Getting-Started/How-to-Make-a-Request) please review [Keeping API Keys Safe](#section/Getting-Started/Keeping-API-Keys-Safe) for an overview on securely storing your API keys. <br /> If you are having issues creating API keys you can submit a [Support](#section/API-Overview/Support) request for assistance. ## Keeping API Keys Safe Based on their permissions, API keys could have full access to your account’s Propertyware data. It’s important that you only grant access to trusted applications, securely record secrets, and consider a password manager to stay organized. ### Recommended Practices - Avoid hard-coding client IDs and secrets inside source files. - Avoid storing client IDs and secrets in any files that may be committed to source control, particularly cloud-based source control platforms. - Apply restrictions to client IDs and secrets shared with your staff. You can restrict a key to particular Propertyware entities or to read-only access (GET resources only). - Avoid sharing client IDs and secrets across public, insecure platforms. - Establish a process to regularly recreate your client IDs and secrets from your Propertyware account. <br /> <br /> ## How to Make a Request You’ve done a great job setting up your account, Now, we’ll walk you through how to access your data. It’s very straightforward and should only take a few minutes! > **Tip:** Looking for the right HTTP client? If you’re just getting started, we recommend Postman. ### Let's Get Started! #### Step 1: Get Your API Key If you haven't yet done so, obtain your API key client ID and secret from your Propertyware account. Your API key is how the Propertyware API authenticates requests and ensures only you can access your data. #### Step 2: Install a HTTP client The Propertyware API supports any standard HTTP client. If you're looking for a user-friendly HTTP client application, we recommend [Postman](https://www.postman.com/product/api-client) – it allows you to access the Propertyware API without writing code. We’ll use Postman for our example below to demonstrate sending an API request. #### Step 3: Make a Sample Request Let's dive in and make a simple request to get all the [Buildings](#operation/getBuildingsUsingGET) in your account. This will confirm your connectivity to our platform and validate the keys you created on our website. Simply follow the instructions below. 1. Open the Postman application. 2. Open the *verb* menu and select **GET**. 3. Enter the request endpoint in the field next to GET. - Here’s the endpoint to get all buildings: https://api.propertyware.com/pw/api/rest/v1/buildings. 4. To authenticate the request, enter your `client ID`, your `secret` and your `organization iD` respectively in these request headers: - `x-propertyware-client-id` - `x-propertyware-client-secret` - `x-propertyware-system-id` _(organization id)_ The organization id uniquely identifies your Propertyware account and is an additional measure to enforce proper access to the correct data. ___Your client id and secret pair will only work with the organization it belongs to___. Your full request should look similar to the image below. <kbd><img src=\"request_example.png\" /></kbd> 5. Review the parameters of your request on last time. Once finished, click **Send**. 6. If successful, you should see a JSON response and a `200` HTTP status code. Congratulations! You've connected to the Propertyware API. You now have the knowledge required to make requests for any of our resources. If you've received an error response please review the JSON response message for a description of how to resolve the issue. You can also see more information about HTTP status codes in the [Response Codes](#section/API-Overview/Response-Codes) section. If you are still having trouble making a request after reviewing these sections please submit a [Support](#section/API-Overview/Support) request. # API Overview The Propertyware API is built upon standard REST conventions. It's designed to use consistent resource-oriented URLs, accept and return JSON-encoded messages, and use standard HTTP status codes and verbs. ## Base URL The base URL for production environment API requests is: `https://api.propertyware.com/pw/api/v1/rest` In order to ensure all requests and responses are secure between the API consumer and Propertyware servers, requests must be made using the `https` protocol. Any requests not made with the `https` protocol will be refused by the Propertyware API platform. > **Note:** URL paths are case-sensitive to stay consistent with common REST standards. If your request doesn’t align with the documented URL path, you’ll receive a `404` response code reminding you of this constraint. ## API Versioning The Propertyware API is version controlled. Versioning ensures backwards-incompatible changes to the API don’t impact any existing integrations. Propertyware uses only a major version nomenclature to manage changes. The current version of the Propertyware API is version 1. By specifying a version in the resource request URL, you'll get expected responses regardless of future changes to the API. Here's an example of calling version 1 of the retrieve all leases resource: `https://api.propertyware.com/pw/api/rest/v1/leases` Any request submitted without the version in the URL path will result in a `404` error response code. ### Releasing Changes to the API The Propertyware API will continue to evolve to ensure it meets the needs of our customers. Changes will be defined as either backwards-compatible or backwards-incompatible. We’ll provide advance notice for all API releases–regardless of the type of modifications being made. #### Backward-compatible Changes Backward-compatible changes are modifications to the API that shouldn't impact existing integrations. They'll apply to the current version of the API. Simply put: you won’t need to change the version to consume new changes like these. It's important as you develop against the Propertyware API that you ensure these types of changes don't impact your integration. Here's are examples of backward-compatible modifications. * Adding new API resources and/or endpoints. * Adding new optional request parameters to existing API methods. * Adding new properties to existing API responses and non-required properties for request messages. * Changing property order in existing API responses. All backward-compatible changes to the API will be documented in the [Changelog](#section/Changelog). #### Backwards-incompatible Changes When backwards-incompatible changes to the API occur, a new version of the API will be released. You’ll need to update the URL path to consume resources under the new API version. Backwards-incompatible changes include: * Removing a property from a request and/or response message. * Changing the name of a property in a message. * Adding a required parameter to a request message. * Changing existing enumeration values. New versions of the API will have full reference documentation and an upgrade guide. ## Authentication The Propertyware API uses API key’s client IDs and secrets to authenticate requests. An organization ID, an API key client ID and secret must be passed in every request header using the following parameters: - `x-propertyware-client-id` - `x-propertyware-client-secret` - `x-propertyware-system-id` Failing to provide both of them in the request header will cause the API to return a `401` HTTP status code. <!-- ## Rate Limiting (FUTURE) Rate limits help us ensure consistent and reliable performance for all users, even during peak loads. That’s why we limit clients to **10 concurrent requests per second**. If your request rate violates that limit, a response code of `429` is returned. Simply retry the request after a short interval (~200ms). --> ## Bulk Request Options All top-level API resources support bulk fetches. For instance, you can retrieve all [Portfolios](#operation/getPortfoliosUsingGET). These resources also allow for filtering criteria. Each resource has descriptions of the filter criteria available. In addition to filtering, our API gives you the ability to control the returned data’s pagination and the sort order. ### Pagination Endpoints that return result sets allow for pagination using `limit` and `offset` request parameters to reduce the amount of data returned. The `limit` request parameter will cap the number of results that come back in the response. If you don't specify a `limit` value, a **default of 100 results** are returned. The maximum `limit` value is 500. If a `limit` value is specified greater than 500, it will be overridden to the default to 500. The `offset` request parameter indicates the record position within the resultset to start at when returning the results. The `offset` is zero-based and is inclusive. If no `offset` value is submitted it will default to 0. The total resultset count is returned in the HTTP Header `X-Total-Count` #### Pagination Example As an example, let's say we make a request to retrieve all rental properties with no paging parameters. Our response indicates in the `X-Total-Count` header that there are 150 total rental properties. We want to get only the last 50 results so we would submit a request with the `offset` set to 100 and the `limit` set to 50. > **Note:** The `limit` and `offset` parameter names are case-sensitive. If they aren't formatted correctly, the API will return a `404` HTTP status code. ### Sorting Results You can specify the sort order of returned data by assigning properties from the returned object to the `orderby` parameter in the querystring. For example: ``` orderby=name ``` By default, the sort is performed in ascending order. To specify sort order, use \"asc\" for ascending or \"desc\" for descending. For example: ``` orderby=name desc ``` Additionally, you can sort by multiple properties by comma separating the properties. For example: ``` orderby=abbreviation asc,name desc ``` > **Note:** While the `orderby` parameter is case-sensitive, the properties specified in the `orderby` value aren't. ## Response Codes The Propertyware API supports standard HTTP status codes. |Response Code |Description | |--|--| |200 OK | Everything worked as expected. | |400 Bad Request | The request was unacceptable, often due to missing a required parameter.| |401 Unauthorized|The API client ID and secret weren’t provided or they’re no longer valid. Be sure that the client ID and secret combination are correct and they are still active.| |403 Forbidden|The API key doesn't have permission to perform the request. This could be due to authorization for the given endpoint or an inability to access given entities within the platform (e.g. properties). |404 Not Found|The requested resource doesn't exist.| |415 Unsupported Media Type |Ensure you have the appropriate content-type header value set on your request. Each resource is documented with media type(s) that are accepted.| |429 Too Many Requests |Too many requests against the API too quickly. We recommend an exponential backoff of your requests.| |500 and above - Server Errors|Something went wrong on Propertyware's end. Review the JSON response message for more details about the error.| ## API Date Format * For all request and response date fields allowing ISO date format: YYYY-MM-DD (e.g.2019-08-24). * For all request and response dateAndTime fields format is allowing: YYYY-MM-dd'T'HH:mm:ssXXX (e.g.2022-06-28T08:47:13Z). ## Support If you are unable to resolve your issue after reviewing the API documentation our support team can assist you. # Changelog ### 2023-07-11 * Retrieve all documents * Retrieve a document * Download a document ### 2023-06-10 * Lease contacts are included in Retrieve all leases API response * Lease contacts are included in Retrieve a lease API response ### 2023-04-24 * Bulk Insertion: Prospects * Bulk Insertion: Bill Payments ### 2023-04-11 * Bulk Insertion: Portfolios * Bulk Insertion: Buildings * Bulk Insertion: Units ### 2023-03-19 * Bulk insertion: contacts ### 2023-03-08 * Bulk insertion: bills ### 2023-01-24 * Custom fields in \"Get all\" endpoints * Prospect creation * Bill removals ### 2022-10-25 * API Read operations for non-financial data ### 2022-09-21 * API Read operations available
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@propertyware.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Propertyware
16
+ class LeasesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add comment to a lease conversation (BETA)
23
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Adds comment to a lease conversation.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
24
+ # @param lease_id [Integer] Lease ID
25
+ # @param conversation_id [Integer] Conversation ID
26
+ # @param save_comment [SaveComment] saveComment
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [Comment]
29
+ def add_comment_to_lease_conversation(lease_id, conversation_id, save_comment, opts = {})
30
+ data, _status_code, _headers = add_comment_to_lease_conversation_with_http_info(lease_id, conversation_id, save_comment, opts)
31
+ data
32
+ end
33
+
34
+ # Add comment to a lease conversation (BETA)
35
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Adds comment to a lease conversation.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
36
+ # @param lease_id [Integer] Lease ID
37
+ # @param conversation_id [Integer] Conversation ID
38
+ # @param save_comment [SaveComment] saveComment
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(Comment, Integer, Hash)>] Comment data, response status code and response headers
41
+ def add_comment_to_lease_conversation_with_http_info(lease_id, conversation_id, save_comment, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: LeasesApi.add_comment_to_lease_conversation ...'
44
+ end
45
+ # verify the required parameter 'lease_id' is set
46
+ if @api_client.config.client_side_validation && lease_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.add_comment_to_lease_conversation"
48
+ end
49
+ # verify the required parameter 'conversation_id' is set
50
+ if @api_client.config.client_side_validation && conversation_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling LeasesApi.add_comment_to_lease_conversation"
52
+ end
53
+ # verify the required parameter 'save_comment' is set
54
+ if @api_client.config.client_side_validation && save_comment.nil?
55
+ fail ArgumentError, "Missing the required parameter 'save_comment' when calling LeasesApi.add_comment_to_lease_conversation"
56
+ end
57
+ # resource path
58
+ local_var_path = '/leases/{leaseID}/conversations/{conversationID}/comments'.sub('{' + 'leaseID' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'conversationID' + '}', CGI.escape(conversation_id.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+ # HTTP header 'Content-Type'
68
+ content_type = @api_client.select_header_content_type(['application/json'])
69
+ if !content_type.nil?
70
+ header_params['Content-Type'] = content_type
71
+ end
72
+
73
+ # form parameters
74
+ form_params = opts[:form_params] || {}
75
+
76
+ # http body (model)
77
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_comment)
78
+
79
+ # return_type
80
+ return_type = opts[:debug_return_type] || 'Comment'
81
+
82
+ # auth_names
83
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
84
+
85
+ new_options = opts.merge(
86
+ :operation => :"LeasesApi.add_comment_to_lease_conversation",
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => return_type
93
+ )
94
+
95
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: LeasesApi#add_comment_to_lease_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Create a lease journal entry (BETA)
103
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a lease journal entry.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
104
+ # @param save_lease_journal_entry [SaveLeaseJournalEntry] saveLeaseJournalEntry
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [JournalEntry]
107
+ def create_journal_entry(save_lease_journal_entry, opts = {})
108
+ data, _status_code, _headers = create_journal_entry_with_http_info(save_lease_journal_entry, opts)
109
+ data
110
+ end
111
+
112
+ # Create a lease journal entry (BETA)
113
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a lease journal entry.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
114
+ # @param save_lease_journal_entry [SaveLeaseJournalEntry] saveLeaseJournalEntry
115
+ # @param [Hash] opts the optional parameters
116
+ # @return [Array<(JournalEntry, Integer, Hash)>] JournalEntry data, response status code and response headers
117
+ def create_journal_entry_with_http_info(save_lease_journal_entry, opts = {})
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_journal_entry ...'
120
+ end
121
+ # verify the required parameter 'save_lease_journal_entry' is set
122
+ if @api_client.config.client_side_validation && save_lease_journal_entry.nil?
123
+ fail ArgumentError, "Missing the required parameter 'save_lease_journal_entry' when calling LeasesApi.create_journal_entry"
124
+ end
125
+ # resource path
126
+ local_var_path = '/leases/journalentries'
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
135
+ # HTTP header 'Content-Type'
136
+ content_type = @api_client.select_header_content_type(['application/json'])
137
+ if !content_type.nil?
138
+ header_params['Content-Type'] = content_type
139
+ end
140
+
141
+ # form parameters
142
+ form_params = opts[:form_params] || {}
143
+
144
+ # http body (model)
145
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_lease_journal_entry)
146
+
147
+ # return_type
148
+ return_type = opts[:debug_return_type] || 'JournalEntry'
149
+
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"LeasesApi.create_journal_entry",
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: LeasesApi#create_journal_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+ # Create a lease (BETA)
171
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a new lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
172
+ # @param save_lease [SaveLease] saveLease
173
+ # @param [Hash] opts the optional parameters
174
+ # @return [Lease]
175
+ def create_lease(save_lease, opts = {})
176
+ data, _status_code, _headers = create_lease_with_http_info(save_lease, opts)
177
+ data
178
+ end
179
+
180
+ # Create a lease (BETA)
181
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a new lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
182
+ # @param save_lease [SaveLease] saveLease
183
+ # @param [Hash] opts the optional parameters
184
+ # @return [Array<(Lease, Integer, Hash)>] Lease data, response status code and response headers
185
+ def create_lease_with_http_info(save_lease, opts = {})
186
+ if @api_client.config.debugging
187
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease ...'
188
+ end
189
+ # verify the required parameter 'save_lease' is set
190
+ if @api_client.config.client_side_validation && save_lease.nil?
191
+ fail ArgumentError, "Missing the required parameter 'save_lease' when calling LeasesApi.create_lease"
192
+ end
193
+ # resource path
194
+ local_var_path = '/leases'
195
+
196
+ # query parameters
197
+ query_params = opts[:query_params] || {}
198
+
199
+ # header parameters
200
+ header_params = opts[:header_params] || {}
201
+ # HTTP header 'Accept' (if needed)
202
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
203
+ # HTTP header 'Content-Type'
204
+ content_type = @api_client.select_header_content_type(['application/json'])
205
+ if !content_type.nil?
206
+ header_params['Content-Type'] = content_type
207
+ end
208
+
209
+ # form parameters
210
+ form_params = opts[:form_params] || {}
211
+
212
+ # http body (model)
213
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_lease)
214
+
215
+ # return_type
216
+ return_type = opts[:debug_return_type] || 'Lease'
217
+
218
+ # auth_names
219
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
220
+
221
+ new_options = opts.merge(
222
+ :operation => :"LeasesApi.create_lease",
223
+ :header_params => header_params,
224
+ :query_params => query_params,
225
+ :form_params => form_params,
226
+ :body => post_body,
227
+ :auth_names => auth_names,
228
+ :return_type => return_type
229
+ )
230
+
231
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+
238
+ # Create a lease adjustment (BETA)
239
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a lease adjustment.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
240
+ # @param save_adjustment [SaveAdjustment] saveAdjustment
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [ChargeTx]
243
+ def create_lease_adjustment(save_adjustment, opts = {})
244
+ data, _status_code, _headers = create_lease_adjustment_with_http_info(save_adjustment, opts)
245
+ data
246
+ end
247
+
248
+ # Create a lease adjustment (BETA)
249
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a lease adjustment.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
250
+ # @param save_adjustment [SaveAdjustment] saveAdjustment
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [Array<(ChargeTx, Integer, Hash)>] ChargeTx data, response status code and response headers
253
+ def create_lease_adjustment_with_http_info(save_adjustment, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_adjustment ...'
256
+ end
257
+ # verify the required parameter 'save_adjustment' is set
258
+ if @api_client.config.client_side_validation && save_adjustment.nil?
259
+ fail ArgumentError, "Missing the required parameter 'save_adjustment' when calling LeasesApi.create_lease_adjustment"
260
+ end
261
+ # resource path
262
+ local_var_path = '/leases/adjustments'
263
+
264
+ # query parameters
265
+ query_params = opts[:query_params] || {}
266
+
267
+ # header parameters
268
+ header_params = opts[:header_params] || {}
269
+ # HTTP header 'Accept' (if needed)
270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
271
+ # HTTP header 'Content-Type'
272
+ content_type = @api_client.select_header_content_type(['application/json'])
273
+ if !content_type.nil?
274
+ header_params['Content-Type'] = content_type
275
+ end
276
+
277
+ # form parameters
278
+ form_params = opts[:form_params] || {}
279
+
280
+ # http body (model)
281
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_adjustment)
282
+
283
+ # return_type
284
+ return_type = opts[:debug_return_type] || 'ChargeTx'
285
+
286
+ # auth_names
287
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
288
+
289
+ new_options = opts.merge(
290
+ :operation => :"LeasesApi.create_lease_adjustment",
291
+ :header_params => header_params,
292
+ :query_params => query_params,
293
+ :form_params => form_params,
294
+ :body => post_body,
295
+ :auth_names => auth_names,
296
+ :return_type => return_type
297
+ )
298
+
299
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease_adjustment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
+ end
303
+ return data, status_code, headers
304
+ end
305
+
306
+ # Create a lease charge (BETA)
307
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a lease charge.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
308
+ # @param save_charge [SaveCharge] saveCharge
309
+ # @param [Hash] opts the optional parameters
310
+ # @return [ChargeTx]
311
+ def create_lease_charge(save_charge, opts = {})
312
+ data, _status_code, _headers = create_lease_charge_with_http_info(save_charge, opts)
313
+ data
314
+ end
315
+
316
+ # Create a lease charge (BETA)
317
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a lease charge.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
318
+ # @param save_charge [SaveCharge] saveCharge
319
+ # @param [Hash] opts the optional parameters
320
+ # @return [Array<(ChargeTx, Integer, Hash)>] ChargeTx data, response status code and response headers
321
+ def create_lease_charge_with_http_info(save_charge, opts = {})
322
+ if @api_client.config.debugging
323
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_charge ...'
324
+ end
325
+ # verify the required parameter 'save_charge' is set
326
+ if @api_client.config.client_side_validation && save_charge.nil?
327
+ fail ArgumentError, "Missing the required parameter 'save_charge' when calling LeasesApi.create_lease_charge"
328
+ end
329
+ # resource path
330
+ local_var_path = '/leases/charges'
331
+
332
+ # query parameters
333
+ query_params = opts[:query_params] || {}
334
+
335
+ # header parameters
336
+ header_params = opts[:header_params] || {}
337
+ # HTTP header 'Accept' (if needed)
338
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
339
+ # HTTP header 'Content-Type'
340
+ content_type = @api_client.select_header_content_type(['application/json'])
341
+ if !content_type.nil?
342
+ header_params['Content-Type'] = content_type
343
+ end
344
+
345
+ # form parameters
346
+ form_params = opts[:form_params] || {}
347
+
348
+ # http body (model)
349
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_charge)
350
+
351
+ # return_type
352
+ return_type = opts[:debug_return_type] || 'ChargeTx'
353
+
354
+ # auth_names
355
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
356
+
357
+ new_options = opts.merge(
358
+ :operation => :"LeasesApi.create_lease_charge",
359
+ :header_params => header_params,
360
+ :query_params => query_params,
361
+ :form_params => form_params,
362
+ :body => post_body,
363
+ :auth_names => auth_names,
364
+ :return_type => return_type
365
+ )
366
+
367
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+
374
+ # Create lease charges in bulk (BETA)
375
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates lease charges in bulk.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
376
+ # @param save_charge [Array<SaveCharge>] saveCharge
377
+ # @param [Hash] opts the optional parameters
378
+ # @return [Array<RESTAPIBulkSuccessResponse>]
379
+ def create_lease_charges(save_charge, opts = {})
380
+ data, _status_code, _headers = create_lease_charges_with_http_info(save_charge, opts)
381
+ data
382
+ end
383
+
384
+ # Create lease charges in bulk (BETA)
385
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates lease charges in bulk.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
386
+ # @param save_charge [Array<SaveCharge>] saveCharge
387
+ # @param [Hash] opts the optional parameters
388
+ # @return [Array<(Array<RESTAPIBulkSuccessResponse>, Integer, Hash)>] Array<RESTAPIBulkSuccessResponse> data, response status code and response headers
389
+ def create_lease_charges_with_http_info(save_charge, opts = {})
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_charges ...'
392
+ end
393
+ # verify the required parameter 'save_charge' is set
394
+ if @api_client.config.client_side_validation && save_charge.nil?
395
+ fail ArgumentError, "Missing the required parameter 'save_charge' when calling LeasesApi.create_lease_charges"
396
+ end
397
+ # resource path
398
+ local_var_path = '/leases/charges/bulk'
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
407
+ # HTTP header 'Content-Type'
408
+ content_type = @api_client.select_header_content_type(['application/json'])
409
+ if !content_type.nil?
410
+ header_params['Content-Type'] = content_type
411
+ end
412
+
413
+ # form parameters
414
+ form_params = opts[:form_params] || {}
415
+
416
+ # http body (model)
417
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_charge)
418
+
419
+ # return_type
420
+ return_type = opts[:debug_return_type] || 'Array<RESTAPIBulkSuccessResponse>'
421
+
422
+ # auth_names
423
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
424
+
425
+ new_options = opts.merge(
426
+ :operation => :"LeasesApi.create_lease_charges",
427
+ :header_params => header_params,
428
+ :query_params => query_params,
429
+ :form_params => form_params,
430
+ :body => post_body,
431
+ :auth_names => auth_names,
432
+ :return_type => return_type
433
+ )
434
+
435
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
+ end
439
+ return data, status_code, headers
440
+ end
441
+
442
+ # Create a lease conversation (BETA)
443
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a specific lease conversation.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
444
+ # @param lease_id [Integer] Lease ID
445
+ # @param save_conversation [SaveConversation] saveConversation
446
+ # @param [Hash] opts the optional parameters
447
+ # @return [Conversation]
448
+ def create_lease_conversation(lease_id, save_conversation, opts = {})
449
+ data, _status_code, _headers = create_lease_conversation_with_http_info(lease_id, save_conversation, opts)
450
+ data
451
+ end
452
+
453
+ # Create a lease conversation (BETA)
454
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a specific lease conversation.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
455
+ # @param lease_id [Integer] Lease ID
456
+ # @param save_conversation [SaveConversation] saveConversation
457
+ # @param [Hash] opts the optional parameters
458
+ # @return [Array<(Conversation, Integer, Hash)>] Conversation data, response status code and response headers
459
+ def create_lease_conversation_with_http_info(lease_id, save_conversation, opts = {})
460
+ if @api_client.config.debugging
461
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_conversation ...'
462
+ end
463
+ # verify the required parameter 'lease_id' is set
464
+ if @api_client.config.client_side_validation && lease_id.nil?
465
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.create_lease_conversation"
466
+ end
467
+ # verify the required parameter 'save_conversation' is set
468
+ if @api_client.config.client_side_validation && save_conversation.nil?
469
+ fail ArgumentError, "Missing the required parameter 'save_conversation' when calling LeasesApi.create_lease_conversation"
470
+ end
471
+ # resource path
472
+ local_var_path = '/leases/{leaseID}/conversations'.sub('{' + 'leaseID' + '}', CGI.escape(lease_id.to_s))
473
+
474
+ # query parameters
475
+ query_params = opts[:query_params] || {}
476
+
477
+ # header parameters
478
+ header_params = opts[:header_params] || {}
479
+ # HTTP header 'Accept' (if needed)
480
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
481
+ # HTTP header 'Content-Type'
482
+ content_type = @api_client.select_header_content_type(['application/json'])
483
+ if !content_type.nil?
484
+ header_params['Content-Type'] = content_type
485
+ end
486
+
487
+ # form parameters
488
+ form_params = opts[:form_params] || {}
489
+
490
+ # http body (model)
491
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_conversation)
492
+
493
+ # return_type
494
+ return_type = opts[:debug_return_type] || 'Conversation'
495
+
496
+ # auth_names
497
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
498
+
499
+ new_options = opts.merge(
500
+ :operation => :"LeasesApi.create_lease_conversation",
501
+ :header_params => header_params,
502
+ :query_params => query_params,
503
+ :form_params => form_params,
504
+ :body => post_body,
505
+ :auth_names => auth_names,
506
+ :return_type => return_type
507
+ )
508
+
509
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
510
+ if @api_client.config.debugging
511
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
512
+ end
513
+ return data, status_code, headers
514
+ end
515
+
516
+ # Create a lease discount (BETA)
517
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a lease discount.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
518
+ # @param save_discount [SaveDiscount] saveDiscount
519
+ # @param [Hash] opts the optional parameters
520
+ # @return [Discount]
521
+ def create_lease_discount(save_discount, opts = {})
522
+ data, _status_code, _headers = create_lease_discount_with_http_info(save_discount, opts)
523
+ data
524
+ end
525
+
526
+ # Create a lease discount (BETA)
527
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a lease discount.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
528
+ # @param save_discount [SaveDiscount] saveDiscount
529
+ # @param [Hash] opts the optional parameters
530
+ # @return [Array<(Discount, Integer, Hash)>] Discount data, response status code and response headers
531
+ def create_lease_discount_with_http_info(save_discount, opts = {})
532
+ if @api_client.config.debugging
533
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_discount ...'
534
+ end
535
+ # verify the required parameter 'save_discount' is set
536
+ if @api_client.config.client_side_validation && save_discount.nil?
537
+ fail ArgumentError, "Missing the required parameter 'save_discount' when calling LeasesApi.create_lease_discount"
538
+ end
539
+ # resource path
540
+ local_var_path = '/leases/discounts'
541
+
542
+ # query parameters
543
+ query_params = opts[:query_params] || {}
544
+
545
+ # header parameters
546
+ header_params = opts[:header_params] || {}
547
+ # HTTP header 'Accept' (if needed)
548
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
549
+ # HTTP header 'Content-Type'
550
+ content_type = @api_client.select_header_content_type(['application/json'])
551
+ if !content_type.nil?
552
+ header_params['Content-Type'] = content_type
553
+ end
554
+
555
+ # form parameters
556
+ form_params = opts[:form_params] || {}
557
+
558
+ # http body (model)
559
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_discount)
560
+
561
+ # return_type
562
+ return_type = opts[:debug_return_type] || 'Discount'
563
+
564
+ # auth_names
565
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
566
+
567
+ new_options = opts.merge(
568
+ :operation => :"LeasesApi.create_lease_discount",
569
+ :header_params => header_params,
570
+ :query_params => query_params,
571
+ :form_params => form_params,
572
+ :body => post_body,
573
+ :auth_names => auth_names,
574
+ :return_type => return_type
575
+ )
576
+
577
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
578
+ if @api_client.config.debugging
579
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease_discount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
580
+ end
581
+ return data, status_code, headers
582
+ end
583
+
584
+ # Create a lease payment (BETA)
585
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a lease payment.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
586
+ # @param save_payment [SavePayment] savePayment
587
+ # @param [Hash] opts the optional parameters
588
+ # @return [Payment]
589
+ def create_lease_payment(save_payment, opts = {})
590
+ data, _status_code, _headers = create_lease_payment_with_http_info(save_payment, opts)
591
+ data
592
+ end
593
+
594
+ # Create a lease payment (BETA)
595
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a lease payment.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
596
+ # @param save_payment [SavePayment] savePayment
597
+ # @param [Hash] opts the optional parameters
598
+ # @return [Array<(Payment, Integer, Hash)>] Payment data, response status code and response headers
599
+ def create_lease_payment_with_http_info(save_payment, opts = {})
600
+ if @api_client.config.debugging
601
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_payment ...'
602
+ end
603
+ # verify the required parameter 'save_payment' is set
604
+ if @api_client.config.client_side_validation && save_payment.nil?
605
+ fail ArgumentError, "Missing the required parameter 'save_payment' when calling LeasesApi.create_lease_payment"
606
+ end
607
+ # resource path
608
+ local_var_path = '/leases/payments'
609
+
610
+ # query parameters
611
+ query_params = opts[:query_params] || {}
612
+
613
+ # header parameters
614
+ header_params = opts[:header_params] || {}
615
+ # HTTP header 'Accept' (if needed)
616
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
617
+ # HTTP header 'Content-Type'
618
+ content_type = @api_client.select_header_content_type(['application/json'])
619
+ if !content_type.nil?
620
+ header_params['Content-Type'] = content_type
621
+ end
622
+
623
+ # form parameters
624
+ form_params = opts[:form_params] || {}
625
+
626
+ # http body (model)
627
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_payment)
628
+
629
+ # return_type
630
+ return_type = opts[:debug_return_type] || 'Payment'
631
+
632
+ # auth_names
633
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
634
+
635
+ new_options = opts.merge(
636
+ :operation => :"LeasesApi.create_lease_payment",
637
+ :header_params => header_params,
638
+ :query_params => query_params,
639
+ :form_params => form_params,
640
+ :body => post_body,
641
+ :auth_names => auth_names,
642
+ :return_type => return_type
643
+ )
644
+
645
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
646
+ if @api_client.config.debugging
647
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
648
+ end
649
+ return data, status_code, headers
650
+ end
651
+
652
+ # Create a lease refund (BETA)
653
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Creates a lease refund.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
654
+ # @param save_refund [SaveRefund] saveRefund
655
+ # @param [Hash] opts the optional parameters
656
+ # @return [Refund]
657
+ def create_lease_refund(save_refund, opts = {})
658
+ data, _status_code, _headers = create_lease_refund_with_http_info(save_refund, opts)
659
+ data
660
+ end
661
+
662
+ # Create a lease refund (BETA)
663
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates a lease refund.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
664
+ # @param save_refund [SaveRefund] saveRefund
665
+ # @param [Hash] opts the optional parameters
666
+ # @return [Array<(Refund, Integer, Hash)>] Refund data, response status code and response headers
667
+ def create_lease_refund_with_http_info(save_refund, opts = {})
668
+ if @api_client.config.debugging
669
+ @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_refund ...'
670
+ end
671
+ # verify the required parameter 'save_refund' is set
672
+ if @api_client.config.client_side_validation && save_refund.nil?
673
+ fail ArgumentError, "Missing the required parameter 'save_refund' when calling LeasesApi.create_lease_refund"
674
+ end
675
+ # resource path
676
+ local_var_path = '/leases/refunds'
677
+
678
+ # query parameters
679
+ query_params = opts[:query_params] || {}
680
+
681
+ # header parameters
682
+ header_params = opts[:header_params] || {}
683
+ # HTTP header 'Accept' (if needed)
684
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
685
+ # HTTP header 'Content-Type'
686
+ content_type = @api_client.select_header_content_type(['application/json'])
687
+ if !content_type.nil?
688
+ header_params['Content-Type'] = content_type
689
+ end
690
+
691
+ # form parameters
692
+ form_params = opts[:form_params] || {}
693
+
694
+ # http body (model)
695
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_refund)
696
+
697
+ # return_type
698
+ return_type = opts[:debug_return_type] || 'Refund'
699
+
700
+ # auth_names
701
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
702
+
703
+ new_options = opts.merge(
704
+ :operation => :"LeasesApi.create_lease_refund",
705
+ :header_params => header_params,
706
+ :query_params => query_params,
707
+ :form_params => form_params,
708
+ :body => post_body,
709
+ :auth_names => auth_names,
710
+ :return_type => return_type
711
+ )
712
+
713
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
714
+ if @api_client.config.debugging
715
+ @api_client.config.logger.debug "API called: LeasesApi#create_lease_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
716
+ end
717
+ return data, status_code, headers
718
+ end
719
+
720
+ # Delete a lease (BETA)
721
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Deletes a lease<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Delete</code>
722
+ # @param lease_id [Integer] Lease ID
723
+ # @param [Hash] opts the optional parameters
724
+ # @return [ResponseEntity]
725
+ def delete_lease(lease_id, opts = {})
726
+ data, _status_code, _headers = delete_lease_with_http_info(lease_id, opts)
727
+ data
728
+ end
729
+
730
+ # Delete a lease (BETA)
731
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Deletes a lease&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Delete&lt;/code&gt;
732
+ # @param lease_id [Integer] Lease ID
733
+ # @param [Hash] opts the optional parameters
734
+ # @return [Array<(ResponseEntity, Integer, Hash)>] ResponseEntity data, response status code and response headers
735
+ def delete_lease_with_http_info(lease_id, opts = {})
736
+ if @api_client.config.debugging
737
+ @api_client.config.logger.debug 'Calling API: LeasesApi.delete_lease ...'
738
+ end
739
+ # verify the required parameter 'lease_id' is set
740
+ if @api_client.config.client_side_validation && lease_id.nil?
741
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.delete_lease"
742
+ end
743
+ # resource path
744
+ local_var_path = '/leases/{leaseID}'.sub('{' + 'leaseID' + '}', CGI.escape(lease_id.to_s))
745
+
746
+ # query parameters
747
+ query_params = opts[:query_params] || {}
748
+
749
+ # header parameters
750
+ header_params = opts[:header_params] || {}
751
+ # HTTP header 'Accept' (if needed)
752
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
753
+
754
+ # form parameters
755
+ form_params = opts[:form_params] || {}
756
+
757
+ # http body (model)
758
+ post_body = opts[:debug_body]
759
+
760
+ # return_type
761
+ return_type = opts[:debug_return_type] || 'ResponseEntity'
762
+
763
+ # auth_names
764
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
765
+
766
+ new_options = opts.merge(
767
+ :operation => :"LeasesApi.delete_lease",
768
+ :header_params => header_params,
769
+ :query_params => query_params,
770
+ :form_params => form_params,
771
+ :body => post_body,
772
+ :auth_names => auth_names,
773
+ :return_type => return_type
774
+ )
775
+
776
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
777
+ if @api_client.config.debugging
778
+ @api_client.config.logger.debug "API called: LeasesApi#delete_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
779
+ end
780
+ return data, status_code, headers
781
+ end
782
+
783
+ # Delete a lease conversation (BETA)
784
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Deletes a specific lease conversation.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Delete</code>
785
+ # @param lease_id [Integer] Lease ID
786
+ # @param conversation_id [Integer] Conversation ID
787
+ # @param [Hash] opts the optional parameters
788
+ # @return [ResponseEntity]
789
+ def delete_lease_conversation(lease_id, conversation_id, opts = {})
790
+ data, _status_code, _headers = delete_lease_conversation_with_http_info(lease_id, conversation_id, opts)
791
+ data
792
+ end
793
+
794
+ # Delete a lease conversation (BETA)
795
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Deletes a specific lease conversation.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Delete&lt;/code&gt;
796
+ # @param lease_id [Integer] Lease ID
797
+ # @param conversation_id [Integer] Conversation ID
798
+ # @param [Hash] opts the optional parameters
799
+ # @return [Array<(ResponseEntity, Integer, Hash)>] ResponseEntity data, response status code and response headers
800
+ def delete_lease_conversation_with_http_info(lease_id, conversation_id, opts = {})
801
+ if @api_client.config.debugging
802
+ @api_client.config.logger.debug 'Calling API: LeasesApi.delete_lease_conversation ...'
803
+ end
804
+ # verify the required parameter 'lease_id' is set
805
+ if @api_client.config.client_side_validation && lease_id.nil?
806
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.delete_lease_conversation"
807
+ end
808
+ # verify the required parameter 'conversation_id' is set
809
+ if @api_client.config.client_side_validation && conversation_id.nil?
810
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling LeasesApi.delete_lease_conversation"
811
+ end
812
+ # resource path
813
+ local_var_path = '/leases/{leaseID}/conversations/{conversationID}'.sub('{' + 'leaseID' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'conversationID' + '}', CGI.escape(conversation_id.to_s))
814
+
815
+ # query parameters
816
+ query_params = opts[:query_params] || {}
817
+
818
+ # header parameters
819
+ header_params = opts[:header_params] || {}
820
+ # HTTP header 'Accept' (if needed)
821
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
822
+
823
+ # form parameters
824
+ form_params = opts[:form_params] || {}
825
+
826
+ # http body (model)
827
+ post_body = opts[:debug_body]
828
+
829
+ # return_type
830
+ return_type = opts[:debug_return_type] || 'ResponseEntity'
831
+
832
+ # auth_names
833
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
834
+
835
+ new_options = opts.merge(
836
+ :operation => :"LeasesApi.delete_lease_conversation",
837
+ :header_params => header_params,
838
+ :query_params => query_params,
839
+ :form_params => form_params,
840
+ :body => post_body,
841
+ :auth_names => auth_names,
842
+ :return_type => return_type
843
+ )
844
+
845
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
846
+ if @api_client.config.debugging
847
+ @api_client.config.logger.debug "API called: LeasesApi#delete_lease_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
848
+ end
849
+ return data, status_code, headers
850
+ end
851
+
852
+ # Retrieve a lease
853
+ # Retrieves a specific lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
854
+ # @param lease_id [Integer] Lease ID
855
+ # @param [Hash] opts the optional parameters
856
+ # @option opts [Boolean] :include_custom_fields includeCustomFields (default to true)
857
+ # @return [Lease]
858
+ def get_lease(lease_id, opts = {})
859
+ data, _status_code, _headers = get_lease_with_http_info(lease_id, opts)
860
+ data
861
+ end
862
+
863
+ # Retrieve a lease
864
+ # Retrieves a specific lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
865
+ # @param lease_id [Integer] Lease ID
866
+ # @param [Hash] opts the optional parameters
867
+ # @option opts [Boolean] :include_custom_fields includeCustomFields (default to true)
868
+ # @return [Array<(Lease, Integer, Hash)>] Lease data, response status code and response headers
869
+ def get_lease_with_http_info(lease_id, opts = {})
870
+ if @api_client.config.debugging
871
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease ...'
872
+ end
873
+ # verify the required parameter 'lease_id' is set
874
+ if @api_client.config.client_side_validation && lease_id.nil?
875
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease"
876
+ end
877
+ # resource path
878
+ local_var_path = '/leases/{leaseId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
879
+
880
+ # query parameters
881
+ query_params = opts[:query_params] || {}
882
+ query_params[:'includeCustomFields'] = opts[:'include_custom_fields'] if !opts[:'include_custom_fields'].nil?
883
+
884
+ # header parameters
885
+ header_params = opts[:header_params] || {}
886
+ # HTTP header 'Accept' (if needed)
887
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
888
+
889
+ # form parameters
890
+ form_params = opts[:form_params] || {}
891
+
892
+ # http body (model)
893
+ post_body = opts[:debug_body]
894
+
895
+ # return_type
896
+ return_type = opts[:debug_return_type] || 'Lease'
897
+
898
+ # auth_names
899
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
900
+
901
+ new_options = opts.merge(
902
+ :operation => :"LeasesApi.get_lease",
903
+ :header_params => header_params,
904
+ :query_params => query_params,
905
+ :form_params => form_params,
906
+ :body => post_body,
907
+ :auth_names => auth_names,
908
+ :return_type => return_type
909
+ )
910
+
911
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
912
+ if @api_client.config.debugging
913
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
914
+ end
915
+ return data, status_code, headers
916
+ end
917
+
918
+ # Retrieve all the adjustments
919
+ # Retrieves a list of adjustments.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">GL ACCOUNTS</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>leaseid</code>, <code>postdate</code>, <code>id</code>
920
+ # @param [Hash] opts the optional parameters
921
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
922
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
923
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
924
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
925
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
926
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
927
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
928
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
929
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
930
+ # @option opts [String] :status Filters results to with Lease Status.
931
+ # @return [Array<Transaction>]
932
+ def get_lease_adjustments(opts = {})
933
+ data, _status_code, _headers = get_lease_adjustments_with_http_info(opts)
934
+ data
935
+ end
936
+
937
+ # Retrieve all the adjustments
938
+ # Retrieves a list of adjustments.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;GL ACCOUNTS&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;leaseid&lt;/code&gt;, &lt;code&gt;postdate&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;
939
+ # @param [Hash] opts the optional parameters
940
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
941
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
942
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
943
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
944
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
945
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
946
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
947
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
948
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
949
+ # @option opts [String] :status Filters results to with Lease Status.
950
+ # @return [Array<(Array<Transaction>, Integer, Hash)>] Array<Transaction> data, response status code and response headers
951
+ def get_lease_adjustments_with_http_info(opts = {})
952
+ if @api_client.config.debugging
953
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_adjustments ...'
954
+ end
955
+ # resource path
956
+ local_var_path = '/leases/adjustments'
957
+
958
+ # query parameters
959
+ query_params = opts[:query_params] || {}
960
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
961
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
962
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
963
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
964
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
965
+ query_params[:'postDateStart'] = opts[:'post_date_start'] if !opts[:'post_date_start'].nil?
966
+ query_params[:'postDateEnd'] = opts[:'post_date_end'] if !opts[:'post_date_end'].nil?
967
+ query_params[:'portfolioID'] = opts[:'portfolio_id'] if !opts[:'portfolio_id'].nil?
968
+ query_params[:'leaseID'] = opts[:'lease_id'] if !opts[:'lease_id'].nil?
969
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
970
+
971
+ # header parameters
972
+ header_params = opts[:header_params] || {}
973
+ # HTTP header 'Accept' (if needed)
974
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
975
+
976
+ # form parameters
977
+ form_params = opts[:form_params] || {}
978
+
979
+ # http body (model)
980
+ post_body = opts[:debug_body]
981
+
982
+ # return_type
983
+ return_type = opts[:debug_return_type] || 'Array<Transaction>'
984
+
985
+ # auth_names
986
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
987
+
988
+ new_options = opts.merge(
989
+ :operation => :"LeasesApi.get_lease_adjustments",
990
+ :header_params => header_params,
991
+ :query_params => query_params,
992
+ :form_params => form_params,
993
+ :body => post_body,
994
+ :auth_names => auth_names,
995
+ :return_type => return_type
996
+ )
997
+
998
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
999
+ if @api_client.config.debugging
1000
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_adjustments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1001
+ end
1002
+ return data, status_code, headers
1003
+ end
1004
+
1005
+ # Retrieve all lease auto charges
1006
+ # Retrieves all the auto charges of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1007
+ # @param lease_id [Integer] Lease ID
1008
+ # @param [Hash] opts the optional parameters
1009
+ # @return [Array<Charge>]
1010
+ def get_lease_auto_charges(lease_id, opts = {})
1011
+ data, _status_code, _headers = get_lease_auto_charges_with_http_info(lease_id, opts)
1012
+ data
1013
+ end
1014
+
1015
+ # Retrieve all lease auto charges
1016
+ # Retrieves all the auto charges of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1017
+ # @param lease_id [Integer] Lease ID
1018
+ # @param [Hash] opts the optional parameters
1019
+ # @return [Array<(Array<Charge>, Integer, Hash)>] Array<Charge> data, response status code and response headers
1020
+ def get_lease_auto_charges_with_http_info(lease_id, opts = {})
1021
+ if @api_client.config.debugging
1022
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_auto_charges ...'
1023
+ end
1024
+ # verify the required parameter 'lease_id' is set
1025
+ if @api_client.config.client_side_validation && lease_id.nil?
1026
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_auto_charges"
1027
+ end
1028
+ # resource path
1029
+ local_var_path = '/leases/{leaseId}/autocharges'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1030
+
1031
+ # query parameters
1032
+ query_params = opts[:query_params] || {}
1033
+
1034
+ # header parameters
1035
+ header_params = opts[:header_params] || {}
1036
+ # HTTP header 'Accept' (if needed)
1037
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1038
+
1039
+ # form parameters
1040
+ form_params = opts[:form_params] || {}
1041
+
1042
+ # http body (model)
1043
+ post_body = opts[:debug_body]
1044
+
1045
+ # return_type
1046
+ return_type = opts[:debug_return_type] || 'Array<Charge>'
1047
+
1048
+ # auth_names
1049
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1050
+
1051
+ new_options = opts.merge(
1052
+ :operation => :"LeasesApi.get_lease_auto_charges",
1053
+ :header_params => header_params,
1054
+ :query_params => query_params,
1055
+ :form_params => form_params,
1056
+ :body => post_body,
1057
+ :auth_names => auth_names,
1058
+ :return_type => return_type
1059
+ )
1060
+
1061
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1062
+ if @api_client.config.debugging
1063
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_auto_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1064
+ end
1065
+ return data, status_code, headers
1066
+ end
1067
+
1068
+ # Retrieve all lease auto ePayments (BETA)
1069
+ # <p class=\"betaWarning\"><b>Note: </b>This operation is still in beta and might be subject to breaking changes. Production integrations should be avoided at this stage.</p> Retrieves all the auto ePayments of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1070
+ # @param lease_id [Integer] Lease ID
1071
+ # @param [Hash] opts the optional parameters
1072
+ # @return [AutoPayment]
1073
+ def get_lease_auto_e_payments(lease_id, opts = {})
1074
+ data, _status_code, _headers = get_lease_auto_e_payments_with_http_info(lease_id, opts)
1075
+ data
1076
+ end
1077
+
1078
+ # Retrieve all lease auto ePayments (BETA)
1079
+ # &lt;p class&#x3D;\&quot;betaWarning\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;This operation is still in beta and might be subject to breaking changes. Production integrations should be avoided at this stage.&lt;/p&gt; Retrieves all the auto ePayments of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1080
+ # @param lease_id [Integer] Lease ID
1081
+ # @param [Hash] opts the optional parameters
1082
+ # @return [Array<(AutoPayment, Integer, Hash)>] AutoPayment data, response status code and response headers
1083
+ def get_lease_auto_e_payments_with_http_info(lease_id, opts = {})
1084
+ if @api_client.config.debugging
1085
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_auto_e_payments ...'
1086
+ end
1087
+ # verify the required parameter 'lease_id' is set
1088
+ if @api_client.config.client_side_validation && lease_id.nil?
1089
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_auto_e_payments"
1090
+ end
1091
+ # resource path
1092
+ local_var_path = '/leases/{leaseId}/autoepayments'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1093
+
1094
+ # query parameters
1095
+ query_params = opts[:query_params] || {}
1096
+
1097
+ # header parameters
1098
+ header_params = opts[:header_params] || {}
1099
+ # HTTP header 'Accept' (if needed)
1100
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1101
+
1102
+ # form parameters
1103
+ form_params = opts[:form_params] || {}
1104
+
1105
+ # http body (model)
1106
+ post_body = opts[:debug_body]
1107
+
1108
+ # return_type
1109
+ return_type = opts[:debug_return_type] || 'AutoPayment'
1110
+
1111
+ # auth_names
1112
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1113
+
1114
+ new_options = opts.merge(
1115
+ :operation => :"LeasesApi.get_lease_auto_e_payments",
1116
+ :header_params => header_params,
1117
+ :query_params => query_params,
1118
+ :form_params => form_params,
1119
+ :body => post_body,
1120
+ :auth_names => auth_names,
1121
+ :return_type => return_type
1122
+ )
1123
+
1124
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1125
+ if @api_client.config.debugging
1126
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_auto_e_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1127
+ end
1128
+ return data, status_code, headers
1129
+ end
1130
+
1131
+ # Retrieve all lease auto journal entries (BETA)
1132
+ # <p class=\"betaWarning\"><b>Note: </b>This operation is still in beta and might be subject to breaking changes. Production integrations should be avoided at this stage.</p> Retrieves all the auto journal entries of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1133
+ # @param lease_id [Integer] Lease ID
1134
+ # @param [Hash] opts the optional parameters
1135
+ # @return [AutoJournalEntry]
1136
+ def get_lease_auto_journal_entries(lease_id, opts = {})
1137
+ data, _status_code, _headers = get_lease_auto_journal_entries_with_http_info(lease_id, opts)
1138
+ data
1139
+ end
1140
+
1141
+ # Retrieve all lease auto journal entries (BETA)
1142
+ # &lt;p class&#x3D;\&quot;betaWarning\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;This operation is still in beta and might be subject to breaking changes. Production integrations should be avoided at this stage.&lt;/p&gt; Retrieves all the auto journal entries of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1143
+ # @param lease_id [Integer] Lease ID
1144
+ # @param [Hash] opts the optional parameters
1145
+ # @return [Array<(AutoJournalEntry, Integer, Hash)>] AutoJournalEntry data, response status code and response headers
1146
+ def get_lease_auto_journal_entries_with_http_info(lease_id, opts = {})
1147
+ if @api_client.config.debugging
1148
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_auto_journal_entries ...'
1149
+ end
1150
+ # verify the required parameter 'lease_id' is set
1151
+ if @api_client.config.client_side_validation && lease_id.nil?
1152
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_auto_journal_entries"
1153
+ end
1154
+ # resource path
1155
+ local_var_path = '/leases/{leaseId}/autojournalentries'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1156
+
1157
+ # query parameters
1158
+ query_params = opts[:query_params] || {}
1159
+
1160
+ # header parameters
1161
+ header_params = opts[:header_params] || {}
1162
+ # HTTP header 'Accept' (if needed)
1163
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1164
+
1165
+ # form parameters
1166
+ form_params = opts[:form_params] || {}
1167
+
1168
+ # http body (model)
1169
+ post_body = opts[:debug_body]
1170
+
1171
+ # return_type
1172
+ return_type = opts[:debug_return_type] || 'AutoJournalEntry'
1173
+
1174
+ # auth_names
1175
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1176
+
1177
+ new_options = opts.merge(
1178
+ :operation => :"LeasesApi.get_lease_auto_journal_entries",
1179
+ :header_params => header_params,
1180
+ :query_params => query_params,
1181
+ :form_params => form_params,
1182
+ :body => post_body,
1183
+ :auth_names => auth_names,
1184
+ :return_type => return_type
1185
+ )
1186
+
1187
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1188
+ if @api_client.config.debugging
1189
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_auto_journal_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1190
+ end
1191
+ return data, status_code, headers
1192
+ end
1193
+
1194
+ # Retrieve all the lease charges
1195
+ # Retrieves a list of lease charges.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>leaseid</code>, <code>postdate</code>, <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>
1196
+ # @param [Hash] opts the optional parameters
1197
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1198
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1199
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1200
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1201
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1202
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
1203
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
1204
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
1205
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
1206
+ # @option opts [String] :status Filters results to with Lease Status.
1207
+ # @return [Array<ChargeTx>]
1208
+ def get_lease_charges(opts = {})
1209
+ data, _status_code, _headers = get_lease_charges_with_http_info(opts)
1210
+ data
1211
+ end
1212
+
1213
+ # Retrieve all the lease charges
1214
+ # Retrieves a list of lease charges.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;leaseid&lt;/code&gt;, &lt;code&gt;postdate&lt;/code&gt;, &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;
1215
+ # @param [Hash] opts the optional parameters
1216
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1217
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1218
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1219
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1220
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1221
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
1222
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
1223
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
1224
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
1225
+ # @option opts [String] :status Filters results to with Lease Status.
1226
+ # @return [Array<(Array<ChargeTx>, Integer, Hash)>] Array<ChargeTx> data, response status code and response headers
1227
+ def get_lease_charges_with_http_info(opts = {})
1228
+ if @api_client.config.debugging
1229
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_charges ...'
1230
+ end
1231
+ # resource path
1232
+ local_var_path = '/leases/charges'
1233
+
1234
+ # query parameters
1235
+ query_params = opts[:query_params] || {}
1236
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1237
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1238
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
1239
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
1240
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
1241
+ query_params[:'postDateStart'] = opts[:'post_date_start'] if !opts[:'post_date_start'].nil?
1242
+ query_params[:'postDateEnd'] = opts[:'post_date_end'] if !opts[:'post_date_end'].nil?
1243
+ query_params[:'portfolioID'] = opts[:'portfolio_id'] if !opts[:'portfolio_id'].nil?
1244
+ query_params[:'leaseID'] = opts[:'lease_id'] if !opts[:'lease_id'].nil?
1245
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1246
+
1247
+ # header parameters
1248
+ header_params = opts[:header_params] || {}
1249
+ # HTTP header 'Accept' (if needed)
1250
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1251
+
1252
+ # form parameters
1253
+ form_params = opts[:form_params] || {}
1254
+
1255
+ # http body (model)
1256
+ post_body = opts[:debug_body]
1257
+
1258
+ # return_type
1259
+ return_type = opts[:debug_return_type] || 'Array<ChargeTx>'
1260
+
1261
+ # auth_names
1262
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1263
+
1264
+ new_options = opts.merge(
1265
+ :operation => :"LeasesApi.get_lease_charges",
1266
+ :header_params => header_params,
1267
+ :query_params => query_params,
1268
+ :form_params => form_params,
1269
+ :body => post_body,
1270
+ :auth_names => auth_names,
1271
+ :return_type => return_type
1272
+ )
1273
+
1274
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1275
+ if @api_client.config.debugging
1276
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1277
+ end
1278
+ return data, status_code, headers
1279
+ end
1280
+
1281
+ # Retrieve all lease contacts
1282
+ # Retrieves all the contacts of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1283
+ # @param lease_id [Integer] Lease ID
1284
+ # @param [Hash] opts the optional parameters
1285
+ # @option opts [Boolean] :include_contact_custom_fields_in_the_response_ Include contact custom fields in the response.
1286
+ # @return [Array<Contact>]
1287
+ def get_lease_contacts(lease_id, opts = {})
1288
+ data, _status_code, _headers = get_lease_contacts_with_http_info(lease_id, opts)
1289
+ data
1290
+ end
1291
+
1292
+ # Retrieve all lease contacts
1293
+ # Retrieves all the contacts of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1294
+ # @param lease_id [Integer] Lease ID
1295
+ # @param [Hash] opts the optional parameters
1296
+ # @option opts [Boolean] :include_contact_custom_fields_in_the_response_ Include contact custom fields in the response.
1297
+ # @return [Array<(Array<Contact>, Integer, Hash)>] Array<Contact> data, response status code and response headers
1298
+ def get_lease_contacts_with_http_info(lease_id, opts = {})
1299
+ if @api_client.config.debugging
1300
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_contacts ...'
1301
+ end
1302
+ # verify the required parameter 'lease_id' is set
1303
+ if @api_client.config.client_side_validation && lease_id.nil?
1304
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_contacts"
1305
+ end
1306
+ # resource path
1307
+ local_var_path = '/leases/{leaseId}/contacts'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1308
+
1309
+ # query parameters
1310
+ query_params = opts[:query_params] || {}
1311
+ query_params[:'Include contact custom fields in the response.'] = opts[:'include_contact_custom_fields_in_the_response_'] if !opts[:'include_contact_custom_fields_in_the_response_'].nil?
1312
+
1313
+ # header parameters
1314
+ header_params = opts[:header_params] || {}
1315
+ # HTTP header 'Accept' (if needed)
1316
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1317
+
1318
+ # form parameters
1319
+ form_params = opts[:form_params] || {}
1320
+
1321
+ # http body (model)
1322
+ post_body = opts[:debug_body]
1323
+
1324
+ # return_type
1325
+ return_type = opts[:debug_return_type] || 'Array<Contact>'
1326
+
1327
+ # auth_names
1328
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1329
+
1330
+ new_options = opts.merge(
1331
+ :operation => :"LeasesApi.get_lease_contacts",
1332
+ :header_params => header_params,
1333
+ :query_params => query_params,
1334
+ :form_params => form_params,
1335
+ :body => post_body,
1336
+ :auth_names => auth_names,
1337
+ :return_type => return_type
1338
+ )
1339
+
1340
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1341
+ if @api_client.config.debugging
1342
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1343
+ end
1344
+ return data, status_code, headers
1345
+ end
1346
+
1347
+ # Retrieve a lease conversation
1348
+ # Retrieves a specific lease conversation.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1349
+ # @param lease_id [Integer] Lease ID
1350
+ # @param conversation_id [Integer] Conversation ID
1351
+ # @param [Hash] opts the optional parameters
1352
+ # @return [Conversation]
1353
+ def get_lease_conversation(lease_id, conversation_id, opts = {})
1354
+ data, _status_code, _headers = get_lease_conversation_with_http_info(lease_id, conversation_id, opts)
1355
+ data
1356
+ end
1357
+
1358
+ # Retrieve a lease conversation
1359
+ # Retrieves a specific lease conversation.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1360
+ # @param lease_id [Integer] Lease ID
1361
+ # @param conversation_id [Integer] Conversation ID
1362
+ # @param [Hash] opts the optional parameters
1363
+ # @return [Array<(Conversation, Integer, Hash)>] Conversation data, response status code and response headers
1364
+ def get_lease_conversation_with_http_info(lease_id, conversation_id, opts = {})
1365
+ if @api_client.config.debugging
1366
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_conversation ...'
1367
+ end
1368
+ # verify the required parameter 'lease_id' is set
1369
+ if @api_client.config.client_side_validation && lease_id.nil?
1370
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_conversation"
1371
+ end
1372
+ # verify the required parameter 'conversation_id' is set
1373
+ if @api_client.config.client_side_validation && conversation_id.nil?
1374
+ fail ArgumentError, "Missing the required parameter 'conversation_id' when calling LeasesApi.get_lease_conversation"
1375
+ end
1376
+ # resource path
1377
+ local_var_path = '/leases/{leaseID}/conversations/{conversationID}'.sub('{' + 'leaseID' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'conversationID' + '}', CGI.escape(conversation_id.to_s))
1378
+
1379
+ # query parameters
1380
+ query_params = opts[:query_params] || {}
1381
+
1382
+ # header parameters
1383
+ header_params = opts[:header_params] || {}
1384
+ # HTTP header 'Accept' (if needed)
1385
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1386
+
1387
+ # form parameters
1388
+ form_params = opts[:form_params] || {}
1389
+
1390
+ # http body (model)
1391
+ post_body = opts[:debug_body]
1392
+
1393
+ # return_type
1394
+ return_type = opts[:debug_return_type] || 'Conversation'
1395
+
1396
+ # auth_names
1397
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1398
+
1399
+ new_options = opts.merge(
1400
+ :operation => :"LeasesApi.get_lease_conversation",
1401
+ :header_params => header_params,
1402
+ :query_params => query_params,
1403
+ :form_params => form_params,
1404
+ :body => post_body,
1405
+ :auth_names => auth_names,
1406
+ :return_type => return_type
1407
+ )
1408
+
1409
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1410
+ if @api_client.config.debugging
1411
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1412
+ end
1413
+ return data, status_code, headers
1414
+ end
1415
+
1416
+ # Retrieve all lease conversations
1417
+ # Retrieves all the conversations of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>
1418
+ # @param lease_id [Integer] Lease ID
1419
+ # @param [Hash] opts the optional parameters
1420
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1421
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1422
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1423
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1424
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1425
+ # @option opts [String] :type Filters results by the conversation type.
1426
+ # @return [Array<Conversation>]
1427
+ def get_lease_conversations(lease_id, opts = {})
1428
+ data, _status_code, _headers = get_lease_conversations_with_http_info(lease_id, opts)
1429
+ data
1430
+ end
1431
+
1432
+ # Retrieve all lease conversations
1433
+ # Retrieves all the conversations of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;
1434
+ # @param lease_id [Integer] Lease ID
1435
+ # @param [Hash] opts the optional parameters
1436
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1437
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1438
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1439
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1440
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1441
+ # @option opts [String] :type Filters results by the conversation type.
1442
+ # @return [Array<(Array<Conversation>, Integer, Hash)>] Array<Conversation> data, response status code and response headers
1443
+ def get_lease_conversations_with_http_info(lease_id, opts = {})
1444
+ if @api_client.config.debugging
1445
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_conversations ...'
1446
+ end
1447
+ # verify the required parameter 'lease_id' is set
1448
+ if @api_client.config.client_side_validation && lease_id.nil?
1449
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_conversations"
1450
+ end
1451
+ allowable_values = ["MANAGEMENT_TEAM", "OWNER", "TENANT"]
1452
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1453
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
1454
+ end
1455
+ # resource path
1456
+ local_var_path = '/leases/{leaseID}/conversations'.sub('{' + 'leaseID' + '}', CGI.escape(lease_id.to_s))
1457
+
1458
+ # query parameters
1459
+ query_params = opts[:query_params] || {}
1460
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1461
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1462
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
1463
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
1464
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
1465
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1466
+
1467
+ # header parameters
1468
+ header_params = opts[:header_params] || {}
1469
+ # HTTP header 'Accept' (if needed)
1470
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1471
+
1472
+ # form parameters
1473
+ form_params = opts[:form_params] || {}
1474
+
1475
+ # http body (model)
1476
+ post_body = opts[:debug_body]
1477
+
1478
+ # return_type
1479
+ return_type = opts[:debug_return_type] || 'Array<Conversation>'
1480
+
1481
+ # auth_names
1482
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1483
+
1484
+ new_options = opts.merge(
1485
+ :operation => :"LeasesApi.get_lease_conversations",
1486
+ :header_params => header_params,
1487
+ :query_params => query_params,
1488
+ :form_params => form_params,
1489
+ :body => post_body,
1490
+ :auth_names => auth_names,
1491
+ :return_type => return_type
1492
+ )
1493
+
1494
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1495
+ if @api_client.config.debugging
1496
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1497
+ end
1498
+ return data, status_code, headers
1499
+ end
1500
+
1501
+ # Retrieve all lease custom fields
1502
+ # Retrieves all the custom fields of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1503
+ # @param lease_id [Integer] Lease ID
1504
+ # @param [Hash] opts the optional parameters
1505
+ # @return [Array<CustomField>]
1506
+ def get_lease_custom_fields(lease_id, opts = {})
1507
+ data, _status_code, _headers = get_lease_custom_fields_with_http_info(lease_id, opts)
1508
+ data
1509
+ end
1510
+
1511
+ # Retrieve all lease custom fields
1512
+ # Retrieves all the custom fields of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1513
+ # @param lease_id [Integer] Lease ID
1514
+ # @param [Hash] opts the optional parameters
1515
+ # @return [Array<(Array<CustomField>, Integer, Hash)>] Array<CustomField> data, response status code and response headers
1516
+ def get_lease_custom_fields_with_http_info(lease_id, opts = {})
1517
+ if @api_client.config.debugging
1518
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_custom_fields ...'
1519
+ end
1520
+ # verify the required parameter 'lease_id' is set
1521
+ if @api_client.config.client_side_validation && lease_id.nil?
1522
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_custom_fields"
1523
+ end
1524
+ # resource path
1525
+ local_var_path = '/leases/{leaseId}/customfields'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1526
+
1527
+ # query parameters
1528
+ query_params = opts[:query_params] || {}
1529
+
1530
+ # header parameters
1531
+ header_params = opts[:header_params] || {}
1532
+ # HTTP header 'Accept' (if needed)
1533
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1534
+
1535
+ # form parameters
1536
+ form_params = opts[:form_params] || {}
1537
+
1538
+ # http body (model)
1539
+ post_body = opts[:debug_body]
1540
+
1541
+ # return_type
1542
+ return_type = opts[:debug_return_type] || 'Array<CustomField>'
1543
+
1544
+ # auth_names
1545
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1546
+
1547
+ new_options = opts.merge(
1548
+ :operation => :"LeasesApi.get_lease_custom_fields",
1549
+ :header_params => header_params,
1550
+ :query_params => query_params,
1551
+ :form_params => form_params,
1552
+ :body => post_body,
1553
+ :auth_names => auth_names,
1554
+ :return_type => return_type
1555
+ )
1556
+
1557
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1558
+ if @api_client.config.debugging
1559
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_custom_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1560
+ end
1561
+ return data, status_code, headers
1562
+ end
1563
+
1564
+ # Retrieve all the lease discounts
1565
+ # Retrieves a list of lease discounts<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>leaseid</code>, <code>postdate</code>, <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>
1566
+ # @param [Hash] opts the optional parameters
1567
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1568
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1569
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1570
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1571
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1572
+ # @option opts [Integer] :lease_id Filters results to any LeaseID.
1573
+ # @option opts [Date] :post_date_start Filters results to any discount with a start date on or after the date specified.
1574
+ # @option opts [Date] :post_date_end Filters results to any discount with a start date on or prior to the date specified.
1575
+ # @return [Array<Transaction>]
1576
+ def get_lease_discounts(opts = {})
1577
+ data, _status_code, _headers = get_lease_discounts_with_http_info(opts)
1578
+ data
1579
+ end
1580
+
1581
+ # Retrieve all the lease discounts
1582
+ # Retrieves a list of lease discounts&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;leaseid&lt;/code&gt;, &lt;code&gt;postdate&lt;/code&gt;, &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;
1583
+ # @param [Hash] opts the optional parameters
1584
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1585
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1586
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1587
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1588
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1589
+ # @option opts [Integer] :lease_id Filters results to any LeaseID.
1590
+ # @option opts [Date] :post_date_start Filters results to any discount with a start date on or after the date specified.
1591
+ # @option opts [Date] :post_date_end Filters results to any discount with a start date on or prior to the date specified.
1592
+ # @return [Array<(Array<Transaction>, Integer, Hash)>] Array<Transaction> data, response status code and response headers
1593
+ def get_lease_discounts_with_http_info(opts = {})
1594
+ if @api_client.config.debugging
1595
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_discounts ...'
1596
+ end
1597
+ # resource path
1598
+ local_var_path = '/leases/discounts'
1599
+
1600
+ # query parameters
1601
+ query_params = opts[:query_params] || {}
1602
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1603
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1604
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
1605
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
1606
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
1607
+ query_params[:'leaseID'] = opts[:'lease_id'] if !opts[:'lease_id'].nil?
1608
+ query_params[:'postDateStart'] = opts[:'post_date_start'] if !opts[:'post_date_start'].nil?
1609
+ query_params[:'postDateEnd'] = opts[:'post_date_end'] if !opts[:'post_date_end'].nil?
1610
+
1611
+ # header parameters
1612
+ header_params = opts[:header_params] || {}
1613
+ # HTTP header 'Accept' (if needed)
1614
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1615
+
1616
+ # form parameters
1617
+ form_params = opts[:form_params] || {}
1618
+
1619
+ # http body (model)
1620
+ post_body = opts[:debug_body]
1621
+
1622
+ # return_type
1623
+ return_type = opts[:debug_return_type] || 'Array<Transaction>'
1624
+
1625
+ # auth_names
1626
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1627
+
1628
+ new_options = opts.merge(
1629
+ :operation => :"LeasesApi.get_lease_discounts",
1630
+ :header_params => header_params,
1631
+ :query_params => query_params,
1632
+ :form_params => form_params,
1633
+ :body => post_body,
1634
+ :auth_names => auth_names,
1635
+ :return_type => return_type
1636
+ )
1637
+
1638
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1639
+ if @api_client.config.debugging
1640
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_discounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1641
+ end
1642
+ return data, status_code, headers
1643
+ end
1644
+
1645
+ # Retrieve all lease documents
1646
+ # Retrieves all the documents of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1647
+ # @param lease_id [Integer] Lease ID
1648
+ # @param [Hash] opts the optional parameters
1649
+ # @return [Array<Document>]
1650
+ def get_lease_documents(lease_id, opts = {})
1651
+ data, _status_code, _headers = get_lease_documents_with_http_info(lease_id, opts)
1652
+ data
1653
+ end
1654
+
1655
+ # Retrieve all lease documents
1656
+ # Retrieves all the documents of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1657
+ # @param lease_id [Integer] Lease ID
1658
+ # @param [Hash] opts the optional parameters
1659
+ # @return [Array<(Array<Document>, Integer, Hash)>] Array<Document> data, response status code and response headers
1660
+ def get_lease_documents_with_http_info(lease_id, opts = {})
1661
+ if @api_client.config.debugging
1662
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_documents ...'
1663
+ end
1664
+ # verify the required parameter 'lease_id' is set
1665
+ if @api_client.config.client_side_validation && lease_id.nil?
1666
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_documents"
1667
+ end
1668
+ # resource path
1669
+ local_var_path = '/leases/{leaseId}/document'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1670
+
1671
+ # query parameters
1672
+ query_params = opts[:query_params] || {}
1673
+
1674
+ # header parameters
1675
+ header_params = opts[:header_params] || {}
1676
+ # HTTP header 'Accept' (if needed)
1677
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1678
+
1679
+ # form parameters
1680
+ form_params = opts[:form_params] || {}
1681
+
1682
+ # http body (model)
1683
+ post_body = opts[:debug_body]
1684
+
1685
+ # return_type
1686
+ return_type = opts[:debug_return_type] || 'Array<Document>'
1687
+
1688
+ # auth_names
1689
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1690
+
1691
+ new_options = opts.merge(
1692
+ :operation => :"LeasesApi.get_lease_documents",
1693
+ :header_params => header_params,
1694
+ :query_params => query_params,
1695
+ :form_params => form_params,
1696
+ :body => post_body,
1697
+ :auth_names => auth_names,
1698
+ :return_type => return_type
1699
+ )
1700
+
1701
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1702
+ if @api_client.config.debugging
1703
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1704
+ end
1705
+ return data, status_code, headers
1706
+ end
1707
+
1708
+ # Retrieve all lease journal entries
1709
+ # Retrieves a specific lease journal entries.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1710
+ # @param lease_id [Integer] Lease ID
1711
+ # @param [Hash] opts the optional parameters
1712
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1713
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1714
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1715
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1716
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1717
+ # @option opts [Integer] :lease_id2 Filters results to transactions associated with a specific lease.
1718
+ # @option opts [Date] :post_date_start Filters results to any transaction with post date on or after to the date specified.
1719
+ # @option opts [Date] :post_date_end Filters results to any transaction with post date on or prior to the date specified.
1720
+ # @return [JournalEntry]
1721
+ def get_lease_journal_entry(lease_id, opts = {})
1722
+ data, _status_code, _headers = get_lease_journal_entry_with_http_info(lease_id, opts)
1723
+ data
1724
+ end
1725
+
1726
+ # Retrieve all lease journal entries
1727
+ # Retrieves a specific lease journal entries.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1728
+ # @param lease_id [Integer] Lease ID
1729
+ # @param [Hash] opts the optional parameters
1730
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1731
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1732
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1733
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1734
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1735
+ # @option opts [Integer] :lease_id2 Filters results to transactions associated with a specific lease.
1736
+ # @option opts [Date] :post_date_start Filters results to any transaction with post date on or after to the date specified.
1737
+ # @option opts [Date] :post_date_end Filters results to any transaction with post date on or prior to the date specified.
1738
+ # @return [Array<(JournalEntry, Integer, Hash)>] JournalEntry data, response status code and response headers
1739
+ def get_lease_journal_entry_with_http_info(lease_id, opts = {})
1740
+ if @api_client.config.debugging
1741
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_journal_entry ...'
1742
+ end
1743
+ # verify the required parameter 'lease_id' is set
1744
+ if @api_client.config.client_side_validation && lease_id.nil?
1745
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_journal_entry"
1746
+ end
1747
+ # resource path
1748
+ local_var_path = '/leases/journalentries/{leaseID}'.sub('{' + 'leaseID' + '}', CGI.escape(lease_id.to_s))
1749
+
1750
+ # query parameters
1751
+ query_params = opts[:query_params] || {}
1752
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1753
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1754
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
1755
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
1756
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
1757
+ query_params[:'leaseID'] = opts[:'lease_id2'] if !opts[:'lease_id2'].nil?
1758
+ query_params[:'postDateStart'] = opts[:'post_date_start'] if !opts[:'post_date_start'].nil?
1759
+ query_params[:'postDateEnd'] = opts[:'post_date_end'] if !opts[:'post_date_end'].nil?
1760
+
1761
+ # header parameters
1762
+ header_params = opts[:header_params] || {}
1763
+ # HTTP header 'Accept' (if needed)
1764
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1765
+
1766
+ # form parameters
1767
+ form_params = opts[:form_params] || {}
1768
+
1769
+ # http body (model)
1770
+ post_body = opts[:debug_body]
1771
+
1772
+ # return_type
1773
+ return_type = opts[:debug_return_type] || 'JournalEntry'
1774
+
1775
+ # auth_names
1776
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1777
+
1778
+ new_options = opts.merge(
1779
+ :operation => :"LeasesApi.get_lease_journal_entry",
1780
+ :header_params => header_params,
1781
+ :query_params => query_params,
1782
+ :form_params => form_params,
1783
+ :body => post_body,
1784
+ :auth_names => auth_names,
1785
+ :return_type => return_type
1786
+ )
1787
+
1788
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1789
+ if @api_client.config.debugging
1790
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_journal_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1791
+ end
1792
+ return data, status_code, headers
1793
+ end
1794
+
1795
+ # Retrieve the lease late fee rule
1796
+ # Retrieves the lease late fee rule.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1797
+ # @param lease_id [Integer] Lease ID
1798
+ # @param [Hash] opts the optional parameters
1799
+ # @return [LateFeeRule]
1800
+ def get_lease_late_fee(lease_id, opts = {})
1801
+ data, _status_code, _headers = get_lease_late_fee_with_http_info(lease_id, opts)
1802
+ data
1803
+ end
1804
+
1805
+ # Retrieve the lease late fee rule
1806
+ # Retrieves the lease late fee rule.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1807
+ # @param lease_id [Integer] Lease ID
1808
+ # @param [Hash] opts the optional parameters
1809
+ # @return [Array<(LateFeeRule, Integer, Hash)>] LateFeeRule data, response status code and response headers
1810
+ def get_lease_late_fee_with_http_info(lease_id, opts = {})
1811
+ if @api_client.config.debugging
1812
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_late_fee ...'
1813
+ end
1814
+ # verify the required parameter 'lease_id' is set
1815
+ if @api_client.config.client_side_validation && lease_id.nil?
1816
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_late_fee"
1817
+ end
1818
+ # resource path
1819
+ local_var_path = '/leases/{leaseId}/latefeerule'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1820
+
1821
+ # query parameters
1822
+ query_params = opts[:query_params] || {}
1823
+
1824
+ # header parameters
1825
+ header_params = opts[:header_params] || {}
1826
+ # HTTP header 'Accept' (if needed)
1827
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1828
+
1829
+ # form parameters
1830
+ form_params = opts[:form_params] || {}
1831
+
1832
+ # http body (model)
1833
+ post_body = opts[:debug_body]
1834
+
1835
+ # return_type
1836
+ return_type = opts[:debug_return_type] || 'LateFeeRule'
1837
+
1838
+ # auth_names
1839
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1840
+
1841
+ new_options = opts.merge(
1842
+ :operation => :"LeasesApi.get_lease_late_fee",
1843
+ :header_params => header_params,
1844
+ :query_params => query_params,
1845
+ :form_params => form_params,
1846
+ :body => post_body,
1847
+ :auth_names => auth_names,
1848
+ :return_type => return_type
1849
+ )
1850
+
1851
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1852
+ if @api_client.config.debugging
1853
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_late_fee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1854
+ end
1855
+ return data, status_code, headers
1856
+ end
1857
+
1858
+ # Retrieve all lease notes
1859
+ # Retrieves all the notes of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
1860
+ # @param lease_id [Integer] Lease ID
1861
+ # @param [Hash] opts the optional parameters
1862
+ # @return [Array<Note>]
1863
+ def get_lease_notes(lease_id, opts = {})
1864
+ data, _status_code, _headers = get_lease_notes_with_http_info(lease_id, opts)
1865
+ data
1866
+ end
1867
+
1868
+ # Retrieve all lease notes
1869
+ # Retrieves all the notes of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
1870
+ # @param lease_id [Integer] Lease ID
1871
+ # @param [Hash] opts the optional parameters
1872
+ # @return [Array<(Array<Note>, Integer, Hash)>] Array<Note> data, response status code and response headers
1873
+ def get_lease_notes_with_http_info(lease_id, opts = {})
1874
+ if @api_client.config.debugging
1875
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_notes ...'
1876
+ end
1877
+ # verify the required parameter 'lease_id' is set
1878
+ if @api_client.config.client_side_validation && lease_id.nil?
1879
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_notes"
1880
+ end
1881
+ # resource path
1882
+ local_var_path = '/leases/{leaseId}/notes'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1883
+
1884
+ # query parameters
1885
+ query_params = opts[:query_params] || {}
1886
+
1887
+ # header parameters
1888
+ header_params = opts[:header_params] || {}
1889
+ # HTTP header 'Accept' (if needed)
1890
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1891
+
1892
+ # form parameters
1893
+ form_params = opts[:form_params] || {}
1894
+
1895
+ # http body (model)
1896
+ post_body = opts[:debug_body]
1897
+
1898
+ # return_type
1899
+ return_type = opts[:debug_return_type] || 'Array<Note>'
1900
+
1901
+ # auth_names
1902
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1903
+
1904
+ new_options = opts.merge(
1905
+ :operation => :"LeasesApi.get_lease_notes",
1906
+ :header_params => header_params,
1907
+ :query_params => query_params,
1908
+ :form_params => form_params,
1909
+ :body => post_body,
1910
+ :auth_names => auth_names,
1911
+ :return_type => return_type
1912
+ )
1913
+
1914
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1915
+ if @api_client.config.debugging
1916
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1917
+ end
1918
+ return data, status_code, headers
1919
+ end
1920
+
1921
+ # Retrieve all the lease payments
1922
+ # Retrieves a list of lease payments.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>leaseid</code>, <code>postdate</code>, <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>
1923
+ # @param [Hash] opts the optional parameters
1924
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1925
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1926
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1927
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1928
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1929
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
1930
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
1931
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
1932
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
1933
+ # @option opts [String] :status Filters results to with Lease Status.
1934
+ # @return [Array<Payment>]
1935
+ def get_lease_payments(opts = {})
1936
+ data, _status_code, _headers = get_lease_payments_with_http_info(opts)
1937
+ data
1938
+ end
1939
+
1940
+ # Retrieve all the lease payments
1941
+ # Retrieves a list of lease payments.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;leaseid&lt;/code&gt;, &lt;code&gt;postdate&lt;/code&gt;, &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;
1942
+ # @param [Hash] opts the optional parameters
1943
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
1944
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
1945
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
1946
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
1947
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
1948
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
1949
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
1950
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
1951
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
1952
+ # @option opts [String] :status Filters results to with Lease Status.
1953
+ # @return [Array<(Array<Payment>, Integer, Hash)>] Array<Payment> data, response status code and response headers
1954
+ def get_lease_payments_with_http_info(opts = {})
1955
+ if @api_client.config.debugging
1956
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_payments ...'
1957
+ end
1958
+ # resource path
1959
+ local_var_path = '/leases/payments'
1960
+
1961
+ # query parameters
1962
+ query_params = opts[:query_params] || {}
1963
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1964
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1965
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
1966
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
1967
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
1968
+ query_params[:'postDateStart'] = opts[:'post_date_start'] if !opts[:'post_date_start'].nil?
1969
+ query_params[:'postDateEnd'] = opts[:'post_date_end'] if !opts[:'post_date_end'].nil?
1970
+ query_params[:'portfolioID'] = opts[:'portfolio_id'] if !opts[:'portfolio_id'].nil?
1971
+ query_params[:'leaseID'] = opts[:'lease_id'] if !opts[:'lease_id'].nil?
1972
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1973
+
1974
+ # header parameters
1975
+ header_params = opts[:header_params] || {}
1976
+ # HTTP header 'Accept' (if needed)
1977
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1978
+
1979
+ # form parameters
1980
+ form_params = opts[:form_params] || {}
1981
+
1982
+ # http body (model)
1983
+ post_body = opts[:debug_body]
1984
+
1985
+ # return_type
1986
+ return_type = opts[:debug_return_type] || 'Array<Payment>'
1987
+
1988
+ # auth_names
1989
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
1990
+
1991
+ new_options = opts.merge(
1992
+ :operation => :"LeasesApi.get_lease_payments",
1993
+ :header_params => header_params,
1994
+ :query_params => query_params,
1995
+ :form_params => form_params,
1996
+ :body => post_body,
1997
+ :auth_names => auth_names,
1998
+ :return_type => return_type
1999
+ )
2000
+
2001
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2002
+ if @api_client.config.debugging
2003
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2004
+ end
2005
+ return data, status_code, headers
2006
+ end
2007
+
2008
+ # Retrieve all the tenant refunds
2009
+ # Retrieves a list of tenant refunds.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>leaseid</code>, <code>postdate</code>, <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>
2010
+ # @param [Hash] opts the optional parameters
2011
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
2012
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
2013
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
2014
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
2015
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
2016
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
2017
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
2018
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
2019
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
2020
+ # @option opts [String] :status Filters results to with Lease Status.
2021
+ # @return [Array<Refund>]
2022
+ def get_lease_refunds(opts = {})
2023
+ data, _status_code, _headers = get_lease_refunds_with_http_info(opts)
2024
+ data
2025
+ end
2026
+
2027
+ # Retrieve all the tenant refunds
2028
+ # Retrieves a list of tenant refunds.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;leaseid&lt;/code&gt;, &lt;code&gt;postdate&lt;/code&gt;, &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;
2029
+ # @param [Hash] opts the optional parameters
2030
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
2031
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
2032
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
2033
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
2034
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
2035
+ # @option opts [Date] :post_date_start Filters results to any transaction with a start date on or after the date specified.
2036
+ # @option opts [Date] :post_date_end Filters results to any transaction with a start date on or prior to the date specified.
2037
+ # @option opts [Integer] :portfolio_id Filters results associated with a specific portfolio.
2038
+ # @option opts [Integer] :lease_id Filters results with Lease ID.
2039
+ # @option opts [String] :status Filters results to with Lease Status.
2040
+ # @return [Array<(Array<Refund>, Integer, Hash)>] Array<Refund> data, response status code and response headers
2041
+ def get_lease_refunds_with_http_info(opts = {})
2042
+ if @api_client.config.debugging
2043
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_refunds ...'
2044
+ end
2045
+ # resource path
2046
+ local_var_path = '/leases/refunds'
2047
+
2048
+ # query parameters
2049
+ query_params = opts[:query_params] || {}
2050
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
2051
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2052
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
2053
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
2054
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
2055
+ query_params[:'postDateStart'] = opts[:'post_date_start'] if !opts[:'post_date_start'].nil?
2056
+ query_params[:'postDateEnd'] = opts[:'post_date_end'] if !opts[:'post_date_end'].nil?
2057
+ query_params[:'portfolioID'] = opts[:'portfolio_id'] if !opts[:'portfolio_id'].nil?
2058
+ query_params[:'leaseID'] = opts[:'lease_id'] if !opts[:'lease_id'].nil?
2059
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
2060
+
2061
+ # header parameters
2062
+ header_params = opts[:header_params] || {}
2063
+ # HTTP header 'Accept' (if needed)
2064
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2065
+
2066
+ # form parameters
2067
+ form_params = opts[:form_params] || {}
2068
+
2069
+ # http body (model)
2070
+ post_body = opts[:debug_body]
2071
+
2072
+ # return_type
2073
+ return_type = opts[:debug_return_type] || 'Array<Refund>'
2074
+
2075
+ # auth_names
2076
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2077
+
2078
+ new_options = opts.merge(
2079
+ :operation => :"LeasesApi.get_lease_refunds",
2080
+ :header_params => header_params,
2081
+ :query_params => query_params,
2082
+ :form_params => form_params,
2083
+ :body => post_body,
2084
+ :auth_names => auth_names,
2085
+ :return_type => return_type
2086
+ )
2087
+
2088
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2089
+ if @api_client.config.debugging
2090
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_refunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2091
+ end
2092
+ return data, status_code, headers
2093
+ end
2094
+
2095
+ # Retrieve all lease work orders
2096
+ # Retrieves all the work orders of a lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code>
2097
+ # @param lease_id [Integer] Lease ID
2098
+ # @param [Hash] opts the optional parameters
2099
+ # @return [Array<WorkOrder>]
2100
+ def get_lease_work_orders(lease_id, opts = {})
2101
+ data, _status_code, _headers = get_lease_work_orders_with_http_info(lease_id, opts)
2102
+ data
2103
+ end
2104
+
2105
+ # Retrieve all lease work orders
2106
+ # Retrieves all the work orders of a lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;
2107
+ # @param lease_id [Integer] Lease ID
2108
+ # @param [Hash] opts the optional parameters
2109
+ # @return [Array<(Array<WorkOrder>, Integer, Hash)>] Array<WorkOrder> data, response status code and response headers
2110
+ def get_lease_work_orders_with_http_info(lease_id, opts = {})
2111
+ if @api_client.config.debugging
2112
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_work_orders ...'
2113
+ end
2114
+ # verify the required parameter 'lease_id' is set
2115
+ if @api_client.config.client_side_validation && lease_id.nil?
2116
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_work_orders"
2117
+ end
2118
+ # resource path
2119
+ local_var_path = '/leases/{leaseId}/workorders'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
2120
+
2121
+ # query parameters
2122
+ query_params = opts[:query_params] || {}
2123
+
2124
+ # header parameters
2125
+ header_params = opts[:header_params] || {}
2126
+ # HTTP header 'Accept' (if needed)
2127
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2128
+
2129
+ # form parameters
2130
+ form_params = opts[:form_params] || {}
2131
+
2132
+ # http body (model)
2133
+ post_body = opts[:debug_body]
2134
+
2135
+ # return_type
2136
+ return_type = opts[:debug_return_type] || 'Array<WorkOrder>'
2137
+
2138
+ # auth_names
2139
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2140
+
2141
+ new_options = opts.merge(
2142
+ :operation => :"LeasesApi.get_lease_work_orders",
2143
+ :header_params => header_params,
2144
+ :query_params => query_params,
2145
+ :form_params => form_params,
2146
+ :body => post_body,
2147
+ :auth_names => auth_names,
2148
+ :return_type => return_type
2149
+ )
2150
+
2151
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2152
+ if @api_client.config.debugging
2153
+ @api_client.config.logger.debug "API called: LeasesApi#get_lease_work_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2154
+ end
2155
+ return data, status_code, headers
2156
+ end
2157
+
2158
+ # Retrieve all leases
2159
+ # Retrieves a list of leases.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Read</code> <br/><br/><b>Sortable by:</b> <code>startdate</code>, <code>idnumber</code>, <code>scheduledmoveoutdate</code>, <code>enddate</code>, <code>lastmodifieddatetime</code>, <code>status</code>, <code>moveoutdate</code>, <code>id</code>, <code>moveindate</code>
2160
+ # @param [Hash] opts the optional parameters
2161
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
2162
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
2163
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
2164
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
2165
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
2166
+ # @option opts [Date] :start_date_start Filters results to any lease with a start date on or after the date specified.
2167
+ # @option opts [Date] :start_date_end Filters results to any lease with a start date on or prior to the date specified.
2168
+ # @option opts [Date] :end_date_start Filters results to any lease with a end date on or after the date specified.
2169
+ # @option opts [Date] :end_date_end Filters results to any lease with a end date on or prior to the date specified.
2170
+ # @option opts [Date] :move_in_date_start Filters results to any lease with a move-in date on or after the date specified.
2171
+ # @option opts [Date] :move_in_date_end Filters results to any lease with a move-in date on or prior to the date specified.
2172
+ # @option opts [Date] :schedule_move_out_date_start Filters results to any lease with a move-out date on or after the date specified.
2173
+ # @option opts [Date] :schedule_move_out_date_end Filters results to any lease with a move-out date on or prior to the date specified.
2174
+ # @option opts [Integer] :portfolio_id Filters results to leases associated with a specific portfolio.
2175
+ # @option opts [Integer] :building_id Filters results to leases associated with a specific building.
2176
+ # @option opts [Integer] :unit_id Filters results to leases associated with a specific unit.
2177
+ # @option opts [String] :status Filters results to inspections with a specific status.
2178
+ # @option opts [Boolean] :include_custom_fields includeCustomFields (default to false)
2179
+ # @return [Array<Lease>]
2180
+ def get_leases(opts = {})
2181
+ data, _status_code, _headers = get_leases_with_http_info(opts)
2182
+ data
2183
+ end
2184
+
2185
+ # Retrieve all leases
2186
+ # Retrieves a list of leases.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;startdate&lt;/code&gt;, &lt;code&gt;idnumber&lt;/code&gt;, &lt;code&gt;scheduledmoveoutdate&lt;/code&gt;, &lt;code&gt;enddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, &lt;code&gt;moveoutdate&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;moveindate&lt;/code&gt;
2187
+ # @param [Hash] opts the optional parameters
2188
+ # @option opts [Integer] :offset &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.
2189
+ # @option opts [Integer] :limit &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)
2190
+ # @option opts [Time] :last_modified_date_time_start Filters results to any item modified on or after the date time specified.
2191
+ # @option opts [Time] :last_modified_date_time_end Filters results to any item modified on or prior to the date time specified.
2192
+ # @option opts [String] :orderby Indicates the field(s) and direction to sort the results in the response.
2193
+ # @option opts [Date] :start_date_start Filters results to any lease with a start date on or after the date specified.
2194
+ # @option opts [Date] :start_date_end Filters results to any lease with a start date on or prior to the date specified.
2195
+ # @option opts [Date] :end_date_start Filters results to any lease with a end date on or after the date specified.
2196
+ # @option opts [Date] :end_date_end Filters results to any lease with a end date on or prior to the date specified.
2197
+ # @option opts [Date] :move_in_date_start Filters results to any lease with a move-in date on or after the date specified.
2198
+ # @option opts [Date] :move_in_date_end Filters results to any lease with a move-in date on or prior to the date specified.
2199
+ # @option opts [Date] :schedule_move_out_date_start Filters results to any lease with a move-out date on or after the date specified.
2200
+ # @option opts [Date] :schedule_move_out_date_end Filters results to any lease with a move-out date on or prior to the date specified.
2201
+ # @option opts [Integer] :portfolio_id Filters results to leases associated with a specific portfolio.
2202
+ # @option opts [Integer] :building_id Filters results to leases associated with a specific building.
2203
+ # @option opts [Integer] :unit_id Filters results to leases associated with a specific unit.
2204
+ # @option opts [String] :status Filters results to inspections with a specific status.
2205
+ # @option opts [Boolean] :include_custom_fields includeCustomFields (default to false)
2206
+ # @return [Array<(Array<Lease>, Integer, Hash)>] Array<Lease> data, response status code and response headers
2207
+ def get_leases_with_http_info(opts = {})
2208
+ if @api_client.config.debugging
2209
+ @api_client.config.logger.debug 'Calling API: LeasesApi.get_leases ...'
2210
+ end
2211
+ # resource path
2212
+ local_var_path = '/leases'
2213
+
2214
+ # query parameters
2215
+ query_params = opts[:query_params] || {}
2216
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
2217
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2218
+ query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
2219
+ query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
2220
+ query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
2221
+ query_params[:'startDateStart'] = opts[:'start_date_start'] if !opts[:'start_date_start'].nil?
2222
+ query_params[:'startDateEnd'] = opts[:'start_date_end'] if !opts[:'start_date_end'].nil?
2223
+ query_params[:'endDateStart'] = opts[:'end_date_start'] if !opts[:'end_date_start'].nil?
2224
+ query_params[:'endDateEnd'] = opts[:'end_date_end'] if !opts[:'end_date_end'].nil?
2225
+ query_params[:'moveInDateStart'] = opts[:'move_in_date_start'] if !opts[:'move_in_date_start'].nil?
2226
+ query_params[:'moveInDateEnd'] = opts[:'move_in_date_end'] if !opts[:'move_in_date_end'].nil?
2227
+ query_params[:'scheduleMoveOutDateStart'] = opts[:'schedule_move_out_date_start'] if !opts[:'schedule_move_out_date_start'].nil?
2228
+ query_params[:'scheduleMoveOutDateEnd'] = opts[:'schedule_move_out_date_end'] if !opts[:'schedule_move_out_date_end'].nil?
2229
+ query_params[:'portfolioID'] = opts[:'portfolio_id'] if !opts[:'portfolio_id'].nil?
2230
+ query_params[:'buildingID'] = opts[:'building_id'] if !opts[:'building_id'].nil?
2231
+ query_params[:'unitID'] = opts[:'unit_id'] if !opts[:'unit_id'].nil?
2232
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
2233
+ query_params[:'includeCustomFields'] = opts[:'include_custom_fields'] if !opts[:'include_custom_fields'].nil?
2234
+
2235
+ # header parameters
2236
+ header_params = opts[:header_params] || {}
2237
+ # HTTP header 'Accept' (if needed)
2238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2239
+
2240
+ # form parameters
2241
+ form_params = opts[:form_params] || {}
2242
+
2243
+ # http body (model)
2244
+ post_body = opts[:debug_body]
2245
+
2246
+ # return_type
2247
+ return_type = opts[:debug_return_type] || 'Array<Lease>'
2248
+
2249
+ # auth_names
2250
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2251
+
2252
+ new_options = opts.merge(
2253
+ :operation => :"LeasesApi.get_leases",
2254
+ :header_params => header_params,
2255
+ :query_params => query_params,
2256
+ :form_params => form_params,
2257
+ :body => post_body,
2258
+ :auth_names => auth_names,
2259
+ :return_type => return_type
2260
+ )
2261
+
2262
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2263
+ if @api_client.config.debugging
2264
+ @api_client.config.logger.debug "API called: LeasesApi#get_leases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2265
+ end
2266
+ return data, status_code, headers
2267
+ end
2268
+
2269
+ # Update a lease (BETA)
2270
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Updates an existing lease.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
2271
+ # @param lease_id [Integer] Lease ID
2272
+ # @param save_lease [SaveLease] lease
2273
+ # @param [Hash] opts the optional parameters
2274
+ # @return [Lease]
2275
+ def update_lease(lease_id, save_lease, opts = {})
2276
+ data, _status_code, _headers = update_lease_with_http_info(lease_id, save_lease, opts)
2277
+ data
2278
+ end
2279
+
2280
+ # Update a lease (BETA)
2281
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Updates an existing lease.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
2282
+ # @param lease_id [Integer] Lease ID
2283
+ # @param save_lease [SaveLease] lease
2284
+ # @param [Hash] opts the optional parameters
2285
+ # @return [Array<(Lease, Integer, Hash)>] Lease data, response status code and response headers
2286
+ def update_lease_with_http_info(lease_id, save_lease, opts = {})
2287
+ if @api_client.config.debugging
2288
+ @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease ...'
2289
+ end
2290
+ # verify the required parameter 'lease_id' is set
2291
+ if @api_client.config.client_side_validation && lease_id.nil?
2292
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.update_lease"
2293
+ end
2294
+ # verify the required parameter 'save_lease' is set
2295
+ if @api_client.config.client_side_validation && save_lease.nil?
2296
+ fail ArgumentError, "Missing the required parameter 'save_lease' when calling LeasesApi.update_lease"
2297
+ end
2298
+ # resource path
2299
+ local_var_path = '/leases/{leaseId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
2300
+
2301
+ # query parameters
2302
+ query_params = opts[:query_params] || {}
2303
+
2304
+ # header parameters
2305
+ header_params = opts[:header_params] || {}
2306
+ # HTTP header 'Accept' (if needed)
2307
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2308
+ # HTTP header 'Content-Type'
2309
+ content_type = @api_client.select_header_content_type(['application/json'])
2310
+ if !content_type.nil?
2311
+ header_params['Content-Type'] = content_type
2312
+ end
2313
+
2314
+ # form parameters
2315
+ form_params = opts[:form_params] || {}
2316
+
2317
+ # http body (model)
2318
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_lease)
2319
+
2320
+ # return_type
2321
+ return_type = opts[:debug_return_type] || 'Lease'
2322
+
2323
+ # auth_names
2324
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2325
+
2326
+ new_options = opts.merge(
2327
+ :operation => :"LeasesApi.update_lease",
2328
+ :header_params => header_params,
2329
+ :query_params => query_params,
2330
+ :form_params => form_params,
2331
+ :body => post_body,
2332
+ :auth_names => auth_names,
2333
+ :return_type => return_type
2334
+ )
2335
+
2336
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2337
+ if @api_client.config.debugging
2338
+ @api_client.config.logger.debug "API called: LeasesApi#update_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2339
+ end
2340
+ return data, status_code, headers
2341
+ end
2342
+
2343
+ # Update a lease adjustment (BETA)
2344
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Updates an lease adjustment.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
2345
+ # @param adjustment_id [Integer] Adjustment ID
2346
+ # @param save_adjustment [SaveAdjustment] saveAdjustment
2347
+ # @param [Hash] opts the optional parameters
2348
+ # @return [ChargeTx]
2349
+ def update_lease_adjustment(adjustment_id, save_adjustment, opts = {})
2350
+ data, _status_code, _headers = update_lease_adjustment_with_http_info(adjustment_id, save_adjustment, opts)
2351
+ data
2352
+ end
2353
+
2354
+ # Update a lease adjustment (BETA)
2355
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Updates an lease adjustment.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
2356
+ # @param adjustment_id [Integer] Adjustment ID
2357
+ # @param save_adjustment [SaveAdjustment] saveAdjustment
2358
+ # @param [Hash] opts the optional parameters
2359
+ # @return [Array<(ChargeTx, Integer, Hash)>] ChargeTx data, response status code and response headers
2360
+ def update_lease_adjustment_with_http_info(adjustment_id, save_adjustment, opts = {})
2361
+ if @api_client.config.debugging
2362
+ @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_adjustment ...'
2363
+ end
2364
+ # verify the required parameter 'adjustment_id' is set
2365
+ if @api_client.config.client_side_validation && adjustment_id.nil?
2366
+ fail ArgumentError, "Missing the required parameter 'adjustment_id' when calling LeasesApi.update_lease_adjustment"
2367
+ end
2368
+ # verify the required parameter 'save_adjustment' is set
2369
+ if @api_client.config.client_side_validation && save_adjustment.nil?
2370
+ fail ArgumentError, "Missing the required parameter 'save_adjustment' when calling LeasesApi.update_lease_adjustment"
2371
+ end
2372
+ # resource path
2373
+ local_var_path = '/leases/adjustments/{adjustmentID}'.sub('{' + 'adjustmentID' + '}', CGI.escape(adjustment_id.to_s))
2374
+
2375
+ # query parameters
2376
+ query_params = opts[:query_params] || {}
2377
+
2378
+ # header parameters
2379
+ header_params = opts[:header_params] || {}
2380
+ # HTTP header 'Accept' (if needed)
2381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2382
+ # HTTP header 'Content-Type'
2383
+ content_type = @api_client.select_header_content_type(['application/json'])
2384
+ if !content_type.nil?
2385
+ header_params['Content-Type'] = content_type
2386
+ end
2387
+
2388
+ # form parameters
2389
+ form_params = opts[:form_params] || {}
2390
+
2391
+ # http body (model)
2392
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_adjustment)
2393
+
2394
+ # return_type
2395
+ return_type = opts[:debug_return_type] || 'ChargeTx'
2396
+
2397
+ # auth_names
2398
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2399
+
2400
+ new_options = opts.merge(
2401
+ :operation => :"LeasesApi.update_lease_adjustment",
2402
+ :header_params => header_params,
2403
+ :query_params => query_params,
2404
+ :form_params => form_params,
2405
+ :body => post_body,
2406
+ :auth_names => auth_names,
2407
+ :return_type => return_type
2408
+ )
2409
+
2410
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2411
+ if @api_client.config.debugging
2412
+ @api_client.config.logger.debug "API called: LeasesApi#update_lease_adjustment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2413
+ end
2414
+ return data, status_code, headers
2415
+ end
2416
+
2417
+ # Update a lease charge (BETA)
2418
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Updates a lease charge.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
2419
+ # @param charge_id [Integer] Charge ID
2420
+ # @param save_charge [SaveCharge] saveCharge
2421
+ # @param [Hash] opts the optional parameters
2422
+ # @return [ChargeTx]
2423
+ def update_lease_charge(charge_id, save_charge, opts = {})
2424
+ data, _status_code, _headers = update_lease_charge_with_http_info(charge_id, save_charge, opts)
2425
+ data
2426
+ end
2427
+
2428
+ # Update a lease charge (BETA)
2429
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Updates a lease charge.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
2430
+ # @param charge_id [Integer] Charge ID
2431
+ # @param save_charge [SaveCharge] saveCharge
2432
+ # @param [Hash] opts the optional parameters
2433
+ # @return [Array<(ChargeTx, Integer, Hash)>] ChargeTx data, response status code and response headers
2434
+ def update_lease_charge_with_http_info(charge_id, save_charge, opts = {})
2435
+ if @api_client.config.debugging
2436
+ @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_charge ...'
2437
+ end
2438
+ # verify the required parameter 'charge_id' is set
2439
+ if @api_client.config.client_side_validation && charge_id.nil?
2440
+ fail ArgumentError, "Missing the required parameter 'charge_id' when calling LeasesApi.update_lease_charge"
2441
+ end
2442
+ # verify the required parameter 'save_charge' is set
2443
+ if @api_client.config.client_side_validation && save_charge.nil?
2444
+ fail ArgumentError, "Missing the required parameter 'save_charge' when calling LeasesApi.update_lease_charge"
2445
+ end
2446
+ # resource path
2447
+ local_var_path = '/leases/charges/{chargeID}'.sub('{' + 'chargeID' + '}', CGI.escape(charge_id.to_s))
2448
+
2449
+ # query parameters
2450
+ query_params = opts[:query_params] || {}
2451
+
2452
+ # header parameters
2453
+ header_params = opts[:header_params] || {}
2454
+ # HTTP header 'Accept' (if needed)
2455
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2456
+ # HTTP header 'Content-Type'
2457
+ content_type = @api_client.select_header_content_type(['application/json'])
2458
+ if !content_type.nil?
2459
+ header_params['Content-Type'] = content_type
2460
+ end
2461
+
2462
+ # form parameters
2463
+ form_params = opts[:form_params] || {}
2464
+
2465
+ # http body (model)
2466
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_charge)
2467
+
2468
+ # return_type
2469
+ return_type = opts[:debug_return_type] || 'ChargeTx'
2470
+
2471
+ # auth_names
2472
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2473
+
2474
+ new_options = opts.merge(
2475
+ :operation => :"LeasesApi.update_lease_charge",
2476
+ :header_params => header_params,
2477
+ :query_params => query_params,
2478
+ :form_params => form_params,
2479
+ :body => post_body,
2480
+ :auth_names => auth_names,
2481
+ :return_type => return_type
2482
+ )
2483
+
2484
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2485
+ if @api_client.config.debugging
2486
+ @api_client.config.logger.debug "API called: LeasesApi#update_lease_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2487
+ end
2488
+ return data, status_code, headers
2489
+ end
2490
+
2491
+ # Updates a lease Discount (BETA)
2492
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Updates a lease Discount.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
2493
+ # @param discount_id [Integer] Discount ID
2494
+ # @param save_discount [SaveDiscount] saveDiscount
2495
+ # @param [Hash] opts the optional parameters
2496
+ # @return [Discount]
2497
+ def update_lease_discount(discount_id, save_discount, opts = {})
2498
+ data, _status_code, _headers = update_lease_discount_with_http_info(discount_id, save_discount, opts)
2499
+ data
2500
+ end
2501
+
2502
+ # Updates a lease Discount (BETA)
2503
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Updates a lease Discount.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
2504
+ # @param discount_id [Integer] Discount ID
2505
+ # @param save_discount [SaveDiscount] saveDiscount
2506
+ # @param [Hash] opts the optional parameters
2507
+ # @return [Array<(Discount, Integer, Hash)>] Discount data, response status code and response headers
2508
+ def update_lease_discount_with_http_info(discount_id, save_discount, opts = {})
2509
+ if @api_client.config.debugging
2510
+ @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_discount ...'
2511
+ end
2512
+ # verify the required parameter 'discount_id' is set
2513
+ if @api_client.config.client_side_validation && discount_id.nil?
2514
+ fail ArgumentError, "Missing the required parameter 'discount_id' when calling LeasesApi.update_lease_discount"
2515
+ end
2516
+ # verify the required parameter 'save_discount' is set
2517
+ if @api_client.config.client_side_validation && save_discount.nil?
2518
+ fail ArgumentError, "Missing the required parameter 'save_discount' when calling LeasesApi.update_lease_discount"
2519
+ end
2520
+ # resource path
2521
+ local_var_path = '/leases/discounts/{discountID}'.sub('{' + 'discountID' + '}', CGI.escape(discount_id.to_s))
2522
+
2523
+ # query parameters
2524
+ query_params = opts[:query_params] || {}
2525
+
2526
+ # header parameters
2527
+ header_params = opts[:header_params] || {}
2528
+ # HTTP header 'Accept' (if needed)
2529
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2530
+ # HTTP header 'Content-Type'
2531
+ content_type = @api_client.select_header_content_type(['application/json'])
2532
+ if !content_type.nil?
2533
+ header_params['Content-Type'] = content_type
2534
+ end
2535
+
2536
+ # form parameters
2537
+ form_params = opts[:form_params] || {}
2538
+
2539
+ # http body (model)
2540
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_discount)
2541
+
2542
+ # return_type
2543
+ return_type = opts[:debug_return_type] || 'Discount'
2544
+
2545
+ # auth_names
2546
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2547
+
2548
+ new_options = opts.merge(
2549
+ :operation => :"LeasesApi.update_lease_discount",
2550
+ :header_params => header_params,
2551
+ :query_params => query_params,
2552
+ :form_params => form_params,
2553
+ :body => post_body,
2554
+ :auth_names => auth_names,
2555
+ :return_type => return_type
2556
+ )
2557
+
2558
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2559
+ if @api_client.config.debugging
2560
+ @api_client.config.logger.debug "API called: LeasesApi#update_lease_discount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2561
+ end
2562
+ return data, status_code, headers
2563
+ end
2564
+
2565
+ # Update a lease journal entry (BETA)
2566
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Updates a lease journal entry.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code> <br/><br/><b>Sortable by:</b> <code>postdate</code>, <code>createddate</code>, <code>lastmodifieddatetime</code>, <code>id</code>
2567
+ # @param journalentry_id [Integer] Journal Entry ID
2568
+ # @param update_lease_journal_entry [UpdateLeaseJournalEntry] updateLeaseJournalEntry
2569
+ # @param [Hash] opts the optional parameters
2570
+ # @return [JournalEntry]
2571
+ def update_lease_journal_entry(journalentry_id, update_lease_journal_entry, opts = {})
2572
+ data, _status_code, _headers = update_lease_journal_entry_with_http_info(journalentry_id, update_lease_journal_entry, opts)
2573
+ data
2574
+ end
2575
+
2576
+ # Update a lease journal entry (BETA)
2577
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Updates a lease journal entry.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt; &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Sortable by:&lt;/b&gt; &lt;code&gt;postdate&lt;/code&gt;, &lt;code&gt;createddate&lt;/code&gt;, &lt;code&gt;lastmodifieddatetime&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;
2578
+ # @param journalentry_id [Integer] Journal Entry ID
2579
+ # @param update_lease_journal_entry [UpdateLeaseJournalEntry] updateLeaseJournalEntry
2580
+ # @param [Hash] opts the optional parameters
2581
+ # @return [Array<(JournalEntry, Integer, Hash)>] JournalEntry data, response status code and response headers
2582
+ def update_lease_journal_entry_with_http_info(journalentry_id, update_lease_journal_entry, opts = {})
2583
+ if @api_client.config.debugging
2584
+ @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_journal_entry ...'
2585
+ end
2586
+ # verify the required parameter 'journalentry_id' is set
2587
+ if @api_client.config.client_side_validation && journalentry_id.nil?
2588
+ fail ArgumentError, "Missing the required parameter 'journalentry_id' when calling LeasesApi.update_lease_journal_entry"
2589
+ end
2590
+ # verify the required parameter 'update_lease_journal_entry' is set
2591
+ if @api_client.config.client_side_validation && update_lease_journal_entry.nil?
2592
+ fail ArgumentError, "Missing the required parameter 'update_lease_journal_entry' when calling LeasesApi.update_lease_journal_entry"
2593
+ end
2594
+ # resource path
2595
+ local_var_path = '/leases/journalentries/{journalentryID}'.sub('{' + 'journalentryID' + '}', CGI.escape(journalentry_id.to_s))
2596
+
2597
+ # query parameters
2598
+ query_params = opts[:query_params] || {}
2599
+
2600
+ # header parameters
2601
+ header_params = opts[:header_params] || {}
2602
+ # HTTP header 'Accept' (if needed)
2603
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2604
+ # HTTP header 'Content-Type'
2605
+ content_type = @api_client.select_header_content_type(['application/json'])
2606
+ if !content_type.nil?
2607
+ header_params['Content-Type'] = content_type
2608
+ end
2609
+
2610
+ # form parameters
2611
+ form_params = opts[:form_params] || {}
2612
+
2613
+ # http body (model)
2614
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_lease_journal_entry)
2615
+
2616
+ # return_type
2617
+ return_type = opts[:debug_return_type] || 'JournalEntry'
2618
+
2619
+ # auth_names
2620
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2621
+
2622
+ new_options = opts.merge(
2623
+ :operation => :"LeasesApi.update_lease_journal_entry",
2624
+ :header_params => header_params,
2625
+ :query_params => query_params,
2626
+ :form_params => form_params,
2627
+ :body => post_body,
2628
+ :auth_names => auth_names,
2629
+ :return_type => return_type
2630
+ )
2631
+
2632
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2633
+ if @api_client.config.debugging
2634
+ @api_client.config.logger.debug "API called: LeasesApi#update_lease_journal_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2635
+ end
2636
+ return data, status_code, headers
2637
+ end
2638
+
2639
+ # Update a lease payment (BETA)
2640
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Updates a lease payment.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
2641
+ # @param entity_id [Integer] Lease Payment ID
2642
+ # @param save_payment [SavePayment] savePayment
2643
+ # @param [Hash] opts the optional parameters
2644
+ # @return [Payment]
2645
+ def update_lease_payment(entity_id, save_payment, opts = {})
2646
+ data, _status_code, _headers = update_lease_payment_with_http_info(entity_id, save_payment, opts)
2647
+ data
2648
+ end
2649
+
2650
+ # Update a lease payment (BETA)
2651
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Updates a lease payment.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
2652
+ # @param entity_id [Integer] Lease Payment ID
2653
+ # @param save_payment [SavePayment] savePayment
2654
+ # @param [Hash] opts the optional parameters
2655
+ # @return [Array<(Payment, Integer, Hash)>] Payment data, response status code and response headers
2656
+ def update_lease_payment_with_http_info(entity_id, save_payment, opts = {})
2657
+ if @api_client.config.debugging
2658
+ @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_payment ...'
2659
+ end
2660
+ # verify the required parameter 'entity_id' is set
2661
+ if @api_client.config.client_side_validation && entity_id.nil?
2662
+ fail ArgumentError, "Missing the required parameter 'entity_id' when calling LeasesApi.update_lease_payment"
2663
+ end
2664
+ # verify the required parameter 'save_payment' is set
2665
+ if @api_client.config.client_side_validation && save_payment.nil?
2666
+ fail ArgumentError, "Missing the required parameter 'save_payment' when calling LeasesApi.update_lease_payment"
2667
+ end
2668
+ # resource path
2669
+ local_var_path = '/leases/payments/{entityID}'.sub('{' + 'entityID' + '}', CGI.escape(entity_id.to_s))
2670
+
2671
+ # query parameters
2672
+ query_params = opts[:query_params] || {}
2673
+
2674
+ # header parameters
2675
+ header_params = opts[:header_params] || {}
2676
+ # HTTP header 'Accept' (if needed)
2677
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2678
+ # HTTP header 'Content-Type'
2679
+ content_type = @api_client.select_header_content_type(['application/json'])
2680
+ if !content_type.nil?
2681
+ header_params['Content-Type'] = content_type
2682
+ end
2683
+
2684
+ # form parameters
2685
+ form_params = opts[:form_params] || {}
2686
+
2687
+ # http body (model)
2688
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_payment)
2689
+
2690
+ # return_type
2691
+ return_type = opts[:debug_return_type] || 'Payment'
2692
+
2693
+ # auth_names
2694
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2695
+
2696
+ new_options = opts.merge(
2697
+ :operation => :"LeasesApi.update_lease_payment",
2698
+ :header_params => header_params,
2699
+ :query_params => query_params,
2700
+ :form_params => form_params,
2701
+ :body => post_body,
2702
+ :auth_names => auth_names,
2703
+ :return_type => return_type
2704
+ )
2705
+
2706
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2707
+ if @api_client.config.debugging
2708
+ @api_client.config.logger.debug "API called: LeasesApi#update_lease_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2709
+ end
2710
+ return data, status_code, headers
2711
+ end
2712
+
2713
+ # Update a lease refund (BETA)
2714
+ # <p class=\"betaError\"><b>Note: </b>Write access is only available to customers who have opted in to our beta program. Please reach out to support if you'd like to be included.</p> Update an lease refund.<br/><br/><b>Required permission:</b><br/><span class=\"permissionBlock\">LEASES</span> - <code>Write</code>
2715
+ # @param refund_id [Integer] Refund ID
2716
+ # @param save_refund [SaveRefund] saveRefund
2717
+ # @param [Hash] opts the optional parameters
2718
+ # @return [Refund]
2719
+ def update_lease_refund(refund_id, save_refund, opts = {})
2720
+ data, _status_code, _headers = update_lease_refund_with_http_info(refund_id, save_refund, opts)
2721
+ data
2722
+ end
2723
+
2724
+ # Update a lease refund (BETA)
2725
+ # &lt;p class&#x3D;\&quot;betaError\&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Update an lease refund.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;permissionBlock\&quot;&gt;LEASES&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;
2726
+ # @param refund_id [Integer] Refund ID
2727
+ # @param save_refund [SaveRefund] saveRefund
2728
+ # @param [Hash] opts the optional parameters
2729
+ # @return [Array<(Refund, Integer, Hash)>] Refund data, response status code and response headers
2730
+ def update_lease_refund_with_http_info(refund_id, save_refund, opts = {})
2731
+ if @api_client.config.debugging
2732
+ @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_refund ...'
2733
+ end
2734
+ # verify the required parameter 'refund_id' is set
2735
+ if @api_client.config.client_side_validation && refund_id.nil?
2736
+ fail ArgumentError, "Missing the required parameter 'refund_id' when calling LeasesApi.update_lease_refund"
2737
+ end
2738
+ # verify the required parameter 'save_refund' is set
2739
+ if @api_client.config.client_side_validation && save_refund.nil?
2740
+ fail ArgumentError, "Missing the required parameter 'save_refund' when calling LeasesApi.update_lease_refund"
2741
+ end
2742
+ # resource path
2743
+ local_var_path = '/leases/refunds/{refundID}'.sub('{' + 'refundID' + '}', CGI.escape(refund_id.to_s))
2744
+
2745
+ # query parameters
2746
+ query_params = opts[:query_params] || {}
2747
+
2748
+ # header parameters
2749
+ header_params = opts[:header_params] || {}
2750
+ # HTTP header 'Accept' (if needed)
2751
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2752
+ # HTTP header 'Content-Type'
2753
+ content_type = @api_client.select_header_content_type(['application/json'])
2754
+ if !content_type.nil?
2755
+ header_params['Content-Type'] = content_type
2756
+ end
2757
+
2758
+ # form parameters
2759
+ form_params = opts[:form_params] || {}
2760
+
2761
+ # http body (model)
2762
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_refund)
2763
+
2764
+ # return_type
2765
+ return_type = opts[:debug_return_type] || 'Refund'
2766
+
2767
+ # auth_names
2768
+ auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']
2769
+
2770
+ new_options = opts.merge(
2771
+ :operation => :"LeasesApi.update_lease_refund",
2772
+ :header_params => header_params,
2773
+ :query_params => query_params,
2774
+ :form_params => form_params,
2775
+ :body => post_body,
2776
+ :auth_names => auth_names,
2777
+ :return_type => return_type
2778
+ )
2779
+
2780
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2781
+ if @api_client.config.debugging
2782
+ @api_client.config.logger.debug "API called: LeasesApi#update_lease_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2783
+ end
2784
+ return data, status_code, headers
2785
+ end
2786
+ end
2787
+ end