xero-apimatic-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +175 -0
  4. data/bin/console +15 -0
  5. data/lib/xero_ap_is/api_helper.rb +10 -0
  6. data/lib/xero_ap_is/apis/accounting_api.rb +8328 -0
  7. data/lib/xero_ap_is/apis/asset_api.rb +210 -0
  8. data/lib/xero_ap_is/apis/bank_feeds_api.rb +268 -0
  9. data/lib/xero_ap_is/apis/base_api.rb +67 -0
  10. data/lib/xero_ap_is/apis/identity_api.rb +51 -0
  11. data/lib/xero_ap_is/apis/oauth_authorization_api.rb +87 -0
  12. data/lib/xero_ap_is/apis/project_api.rb +662 -0
  13. data/lib/xero_ap_is/client.rb +110 -0
  14. data/lib/xero_ap_is/configuration.rb +196 -0
  15. data/lib/xero_ap_is/exceptions/api_exception.rb +21 -0
  16. data/lib/xero_ap_is/exceptions/asset_types400_error_exception.rb +72 -0
  17. data/lib/xero_ap_is/exceptions/assets400_error_exception.rb +72 -0
  18. data/lib/xero_ap_is/exceptions/error_error1_exception.rb +63 -0
  19. data/lib/xero_ap_is/exceptions/error_error2_exception.rb +51 -0
  20. data/lib/xero_ap_is/exceptions/error_exception.rb +72 -0
  21. data/lib/xero_ap_is/exceptions/feed_connections_error_exception.rb +60 -0
  22. data/lib/xero_ap_is/exceptions/oauth_provider_exception.rb +64 -0
  23. data/lib/xero_ap_is/exceptions/statements_error_exception.rb +60 -0
  24. data/lib/xero_ap_is/http/api_response.rb +19 -0
  25. data/lib/xero_ap_is/http/auth/basic_auth.rb +62 -0
  26. data/lib/xero_ap_is/http/auth/oauth_2.rb +161 -0
  27. data/lib/xero_ap_is/http/http_call_back.rb +10 -0
  28. data/lib/xero_ap_is/http/http_method_enum.rb +10 -0
  29. data/lib/xero_ap_is/http/http_request.rb +10 -0
  30. data/lib/xero_ap_is/http/http_response.rb +10 -0
  31. data/lib/xero_ap_is/http/proxy_settings.rb +22 -0
  32. data/lib/xero_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
  33. data/lib/xero_ap_is/logging/sdk_logger.rb +17 -0
  34. data/lib/xero_ap_is/models/access_token.rb +116 -0
  35. data/lib/xero_ap_is/models/account.rb +300 -0
  36. data/lib/xero_ap_is/models/account_type.rb +100 -0
  37. data/lib/xero_ap_is/models/account_type1.rb +37 -0
  38. data/lib/xero_ap_is/models/accounts.rb +84 -0
  39. data/lib/xero_ap_is/models/accounts_payable.rb +85 -0
  40. data/lib/xero_ap_is/models/accounts_receivable.rb +85 -0
  41. data/lib/xero_ap_is/models/action.rb +85 -0
  42. data/lib/xero_ap_is/models/actions.rb +84 -0
  43. data/lib/xero_ap_is/models/address.rb +167 -0
  44. data/lib/xero_ap_is/models/address_for_organisation.rb +167 -0
  45. data/lib/xero_ap_is/models/address_type.rb +40 -0
  46. data/lib/xero_ap_is/models/address_type1.rb +36 -0
  47. data/lib/xero_ap_is/models/allocation.rb +174 -0
  48. data/lib/xero_ap_is/models/allocations.rb +85 -0
  49. data/lib/xero_ap_is/models/amount.rb +85 -0
  50. data/lib/xero_ap_is/models/asset.rb +249 -0
  51. data/lib/xero_ap_is/models/asset_status.rb +40 -0
  52. data/lib/xero_ap_is/models/asset_status_query_param.rb +40 -0
  53. data/lib/xero_ap_is/models/asset_type.rb +154 -0
  54. data/lib/xero_ap_is/models/assets.rb +94 -0
  55. data/lib/xero_ap_is/models/attachment.rb +126 -0
  56. data/lib/xero_ap_is/models/attachments.rb +85 -0
  57. data/lib/xero_ap_is/models/averaging_method.rb +36 -0
  58. data/lib/xero_ap_is/models/balance_details.rb +98 -0
  59. data/lib/xero_ap_is/models/balances.rb +89 -0
  60. data/lib/xero_ap_is/models/bank_account_type.rb +44 -0
  61. data/lib/xero_ap_is/models/bank_transaction.rb +319 -0
  62. data/lib/xero_ap_is/models/bank_transactions.rb +114 -0
  63. data/lib/xero_ap_is/models/bank_transfer.rb +224 -0
  64. data/lib/xero_ap_is/models/bank_transfers.rb +85 -0
  65. data/lib/xero_ap_is/models/base_model.rb +110 -0
  66. data/lib/xero_ap_is/models/batch_payment.rb +275 -0
  67. data/lib/xero_ap_is/models/batch_payment_delete.rb +84 -0
  68. data/lib/xero_ap_is/models/batch_payment_delete_by_url_param.rb +73 -0
  69. data/lib/xero_ap_is/models/batch_payment_details.rb +128 -0
  70. data/lib/xero_ap_is/models/batch_payments.rb +85 -0
  71. data/lib/xero_ap_is/models/bill.rb +85 -0
  72. data/lib/xero_ap_is/models/book_depreciation_detail.rb +243 -0
  73. data/lib/xero_ap_is/models/book_depreciation_setting.rb +170 -0
  74. data/lib/xero_ap_is/models/branding_theme.rb +129 -0
  75. data/lib/xero_ap_is/models/branding_themes.rb +85 -0
  76. data/lib/xero_ap_is/models/budget.rb +145 -0
  77. data/lib/xero_ap_is/models/budget_balance.rb +105 -0
  78. data/lib/xero_ap_is/models/budget_line.rb +105 -0
  79. data/lib/xero_ap_is/models/budgets.rb +84 -0
  80. data/lib/xero_ap_is/models/charge_type.rb +42 -0
  81. data/lib/xero_ap_is/models/cis_org_setting.rb +105 -0
  82. data/lib/xero_ap_is/models/cis_org_settings.rb +85 -0
  83. data/lib/xero_ap_is/models/cis_setting.rb +86 -0
  84. data/lib/xero_ap_is/models/cis_settings.rb +85 -0
  85. data/lib/xero_ap_is/models/class1.rb +113 -0
  86. data/lib/xero_ap_is/models/connection.rb +155 -0
  87. data/lib/xero_ap_is/models/contact.rb +661 -0
  88. data/lib/xero_ap_is/models/contact_group.rb +119 -0
  89. data/lib/xero_ap_is/models/contact_groups.rb +85 -0
  90. data/lib/xero_ap_is/models/contact_person.rb +108 -0
  91. data/lib/xero_ap_is/models/contact_status.rb +40 -0
  92. data/lib/xero_ap_is/models/contacts.rb +113 -0
  93. data/lib/xero_ap_is/models/conversion_balances.rb +108 -0
  94. data/lib/xero_ap_is/models/conversion_date.rb +87 -0
  95. data/lib/xero_ap_is/models/country_code.rb +990 -0
  96. data/lib/xero_ap_is/models/credit_debit_indicator.rb +37 -0
  97. data/lib/xero_ap_is/models/credit_note.rb +453 -0
  98. data/lib/xero_ap_is/models/credit_notes.rb +113 -0
  99. data/lib/xero_ap_is/models/currencies.rb +85 -0
  100. data/lib/xero_ap_is/models/currency.rb +85 -0
  101. data/lib/xero_ap_is/models/currency_code.rb +700 -0
  102. data/lib/xero_ap_is/models/currency_code1.rb +680 -0
  103. data/lib/xero_ap_is/models/depreciation_calculation_method.rb +40 -0
  104. data/lib/xero_ap_is/models/depreciation_method.rb +52 -0
  105. data/lib/xero_ap_is/models/due_date_type.rb +52 -0
  106. data/lib/xero_ap_is/models/edition.rb +38 -0
  107. data/lib/xero_ap_is/models/element.rb +160 -0
  108. data/lib/xero_ap_is/models/employee.rb +160 -0
  109. data/lib/xero_ap_is/models/employees.rb +85 -0
  110. data/lib/xero_ap_is/models/end_balance.rb +89 -0
  111. data/lib/xero_ap_is/models/error1.rb +138 -0
  112. data/lib/xero_ap_is/models/error2.rb +106 -0
  113. data/lib/xero_ap_is/models/error3.rb +85 -0
  114. data/lib/xero_ap_is/models/expense_claim.rb +209 -0
  115. data/lib/xero_ap_is/models/expense_claims.rb +85 -0
  116. data/lib/xero_ap_is/models/external_link.rb +95 -0
  117. data/lib/xero_ap_is/models/federal_tax_classification.rb +56 -0
  118. data/lib/xero_ap_is/models/feed_connection.rb +177 -0
  119. data/lib/xero_ap_is/models/feed_connections.rb +94 -0
  120. data/lib/xero_ap_is/models/field_validation_errors_element.rb +127 -0
  121. data/lib/xero_ap_is/models/history_record.rb +105 -0
  122. data/lib/xero_ap_is/models/history_records.rb +85 -0
  123. data/lib/xero_ap_is/models/import_summary.rb +87 -0
  124. data/lib/xero_ap_is/models/import_summary_accounts.rb +154 -0
  125. data/lib/xero_ap_is/models/import_summary_object.rb +76 -0
  126. data/lib/xero_ap_is/models/import_summary_organisation.rb +75 -0
  127. data/lib/xero_ap_is/models/invoice.rb +586 -0
  128. data/lib/xero_ap_is/models/invoice_address.rb +158 -0
  129. data/lib/xero_ap_is/models/invoice_address_type.rb +37 -0
  130. data/lib/xero_ap_is/models/invoice_reminder.rb +75 -0
  131. data/lib/xero_ap_is/models/invoice_reminders.rb +85 -0
  132. data/lib/xero_ap_is/models/invoices.rb +113 -0
  133. data/lib/xero_ap_is/models/item.rb +259 -0
  134. data/lib/xero_ap_is/models/items.rb +84 -0
  135. data/lib/xero_ap_is/models/journal.rb +157 -0
  136. data/lib/xero_ap_is/models/journal_line.rb +201 -0
  137. data/lib/xero_ap_is/models/journals.rb +103 -0
  138. data/lib/xero_ap_is/models/line_amount_types.rb +41 -0
  139. data/lib/xero_ap_is/models/line_item.rb +287 -0
  140. data/lib/xero_ap_is/models/line_item_item.rb +95 -0
  141. data/lib/xero_ap_is/models/line_item_tracking.rb +108 -0
  142. data/lib/xero_ap_is/models/link_type.rb +48 -0
  143. data/lib/xero_ap_is/models/linked_transaction.rb +215 -0
  144. data/lib/xero_ap_is/models/linked_transactions.rb +85 -0
  145. data/lib/xero_ap_is/models/manual_journal.rb +255 -0
  146. data/lib/xero_ap_is/models/manual_journal_line.rb +156 -0
  147. data/lib/xero_ap_is/models/manual_journals.rb +114 -0
  148. data/lib/xero_ap_is/models/mclass.rb +48 -0
  149. data/lib/xero_ap_is/models/oauth_provider_error.rb +62 -0
  150. data/lib/xero_ap_is/models/oauth_scope_oauth_2.rb +113 -0
  151. data/lib/xero_ap_is/models/oauth_token.rb +96 -0
  152. data/lib/xero_ap_is/models/online_invoice.rb +77 -0
  153. data/lib/xero_ap_is/models/online_invoices.rb +85 -0
  154. data/lib/xero_ap_is/models/order_by.rb +56 -0
  155. data/lib/xero_ap_is/models/organisation.rb +467 -0
  156. data/lib/xero_ap_is/models/organisation_entity_type.rb +80 -0
  157. data/lib/xero_ap_is/models/organisation_role.rb +61 -0
  158. data/lib/xero_ap_is/models/organisation_type.rb +80 -0
  159. data/lib/xero_ap_is/models/organisations.rb +85 -0
  160. data/lib/xero_ap_is/models/overpayment.rb +309 -0
  161. data/lib/xero_ap_is/models/overpayments.rb +113 -0
  162. data/lib/xero_ap_is/models/pagination.rb +105 -0
  163. data/lib/xero_ap_is/models/payment.rb +381 -0
  164. data/lib/xero_ap_is/models/payment_delete.rb +73 -0
  165. data/lib/xero_ap_is/models/payment_service.rb +143 -0
  166. data/lib/xero_ap_is/models/payment_services.rb +85 -0
  167. data/lib/xero_ap_is/models/payment_term.rb +85 -0
  168. data/lib/xero_ap_is/models/payment_term_type.rb +44 -0
  169. data/lib/xero_ap_is/models/payment_type.rb +60 -0
  170. data/lib/xero_ap_is/models/payments.rb +113 -0
  171. data/lib/xero_ap_is/models/phone.rb +108 -0
  172. data/lib/xero_ap_is/models/phone_type.rb +48 -0
  173. data/lib/xero_ap_is/models/prepayment.rb +309 -0
  174. data/lib/xero_ap_is/models/prepayments.rb +113 -0
  175. data/lib/xero_ap_is/models/project.rb +328 -0
  176. data/lib/xero_ap_is/models/project_create_or_update.rb +115 -0
  177. data/lib/xero_ap_is/models/project_patch.rb +73 -0
  178. data/lib/xero_ap_is/models/project_status.rb +36 -0
  179. data/lib/xero_ap_is/models/project_user.rb +95 -0
  180. data/lib/xero_ap_is/models/project_users.rb +94 -0
  181. data/lib/xero_ap_is/models/projects.rb +94 -0
  182. data/lib/xero_ap_is/models/purchase.rb +112 -0
  183. data/lib/xero_ap_is/models/purchase_order.rb +408 -0
  184. data/lib/xero_ap_is/models/purchase_orders.rb +114 -0
  185. data/lib/xero_ap_is/models/purchases_default_line_amount_type.rb +42 -0
  186. data/lib/xero_ap_is/models/quote.rb +338 -0
  187. data/lib/xero_ap_is/models/quote_line_amount_types.rb +41 -0
  188. data/lib/xero_ap_is/models/quote_status_codes.rb +52 -0
  189. data/lib/xero_ap_is/models/quotes.rb +84 -0
  190. data/lib/xero_ap_is/models/receipt.rb +287 -0
  191. data/lib/xero_ap_is/models/receipts.rb +84 -0
  192. data/lib/xero_ap_is/models/refresh_token.rb +106 -0
  193. data/lib/xero_ap_is/models/repeating_invoice.rb +290 -0
  194. data/lib/xero_ap_is/models/repeating_invoices.rb +85 -0
  195. data/lib/xero_ap_is/models/report.rb +136 -0
  196. data/lib/xero_ap_is/models/report_attribute.rb +85 -0
  197. data/lib/xero_ap_is/models/report_cell.rb +94 -0
  198. data/lib/xero_ap_is/models/report_fields.rb +95 -0
  199. data/lib/xero_ap_is/models/report_row.rb +104 -0
  200. data/lib/xero_ap_is/models/report_rows.rb +123 -0
  201. data/lib/xero_ap_is/models/report_tax_type.rb +424 -0
  202. data/lib/xero_ap_is/models/report_type.rb +26 -0
  203. data/lib/xero_ap_is/models/report_with_row.rb +176 -0
  204. data/lib/xero_ap_is/models/report_with_rows.rb +84 -0
  205. data/lib/xero_ap_is/models/reports.rb +84 -0
  206. data/lib/xero_ap_is/models/request_empty.rb +75 -0
  207. data/lib/xero_ap_is/models/resource_validation_errors_element.rb +116 -0
  208. data/lib/xero_ap_is/models/row_type.rb +44 -0
  209. data/lib/xero_ap_is/models/sales_default_line_amount_type.rb +42 -0
  210. data/lib/xero_ap_is/models/sales_tax_basis.rb +60 -0
  211. data/lib/xero_ap_is/models/sales_tax_period.rb +88 -0
  212. data/lib/xero_ap_is/models/sales_tracking_category.rb +89 -0
  213. data/lib/xero_ap_is/models/schedule.rb +140 -0
  214. data/lib/xero_ap_is/models/setting.rb +175 -0
  215. data/lib/xero_ap_is/models/setup.rb +117 -0
  216. data/lib/xero_ap_is/models/sort_direction.rb +36 -0
  217. data/lib/xero_ap_is/models/source_transaction_type_code.rb +38 -0
  218. data/lib/xero_ap_is/models/source_type.rb +128 -0
  219. data/lib/xero_ap_is/models/start_balance.rb +88 -0
  220. data/lib/xero_ap_is/models/statement.rb +194 -0
  221. data/lib/xero_ap_is/models/statement_line.rb +162 -0
  222. data/lib/xero_ap_is/models/statements.rb +94 -0
  223. data/lib/xero_ap_is/models/status.rb +41 -0
  224. data/lib/xero_ap_is/models/status1.rb +38 -0
  225. data/lib/xero_ap_is/models/status10.rb +40 -0
  226. data/lib/xero_ap_is/models/status11.rb +44 -0
  227. data/lib/xero_ap_is/models/status110.rb +40 -0
  228. data/lib/xero_ap_is/models/status111.rb +43 -0
  229. data/lib/xero_ap_is/models/status12.rb +48 -0
  230. data/lib/xero_ap_is/models/status13.rb +48 -0
  231. data/lib/xero_ap_is/models/status14.rb +52 -0
  232. data/lib/xero_ap_is/models/status15.rb +48 -0
  233. data/lib/xero_ap_is/models/status16.rb +36 -0
  234. data/lib/xero_ap_is/models/status17.rb +48 -0
  235. data/lib/xero_ap_is/models/status18.rb +40 -0
  236. data/lib/xero_ap_is/models/status19.rb +44 -0
  237. data/lib/xero_ap_is/models/status2.rb +40 -0
  238. data/lib/xero_ap_is/models/status20.rb +48 -0
  239. data/lib/xero_ap_is/models/status21.rb +36 -0
  240. data/lib/xero_ap_is/models/status22.rb +44 -0
  241. data/lib/xero_ap_is/models/status3.rb +52 -0
  242. data/lib/xero_ap_is/models/status4.rb +40 -0
  243. data/lib/xero_ap_is/models/status5.rb +40 -0
  244. data/lib/xero_ap_is/models/status6.rb +52 -0
  245. data/lib/xero_ap_is/models/status7.rb +36 -0
  246. data/lib/xero_ap_is/models/status8.rb +37 -0
  247. data/lib/xero_ap_is/models/status9.rb +40 -0
  248. data/lib/xero_ap_is/models/system_account.rb +110 -0
  249. data/lib/xero_ap_is/models/task.rb +234 -0
  250. data/lib/xero_ap_is/models/task_create_or_update.rb +105 -0
  251. data/lib/xero_ap_is/models/tasks.rb +94 -0
  252. data/lib/xero_ap_is/models/tax_breakdown_component.rb +172 -0
  253. data/lib/xero_ap_is/models/tax_component.rb +108 -0
  254. data/lib/xero_ap_is/models/tax_number_type.rb +45 -0
  255. data/lib/xero_ap_is/models/tax_rate.rb +213 -0
  256. data/lib/xero_ap_is/models/tax_rates.rb +85 -0
  257. data/lib/xero_ap_is/models/tax_type.rb +520 -0
  258. data/lib/xero_ap_is/models/taxability.rb +48 -0
  259. data/lib/xero_ap_is/models/ten_ninety_nine_contact.rb +318 -0
  260. data/lib/xero_ap_is/models/time_entries.rb +94 -0
  261. data/lib/xero_ap_is/models/time_entry.rb +179 -0
  262. data/lib/xero_ap_is/models/time_entry_create_or_update.rb +120 -0
  263. data/lib/xero_ap_is/models/time_zone.rb +592 -0
  264. data/lib/xero_ap_is/models/timeframe.rb +40 -0
  265. data/lib/xero_ap_is/models/tracking_categories.rb +85 -0
  266. data/lib/xero_ap_is/models/tracking_category.rb +140 -0
  267. data/lib/xero_ap_is/models/tracking_option.rb +109 -0
  268. data/lib/xero_ap_is/models/tracking_options.rb +84 -0
  269. data/lib/xero_ap_is/models/type.rb +60 -0
  270. data/lib/xero_ap_is/models/type1.rb +26 -0
  271. data/lib/xero_ap_is/models/type10.rb +36 -0
  272. data/lib/xero_ap_is/models/type11.rb +114 -0
  273. data/lib/xero_ap_is/models/type2.rb +48 -0
  274. data/lib/xero_ap_is/models/type3.rb +60 -0
  275. data/lib/xero_ap_is/models/type4.rb +44 -0
  276. data/lib/xero_ap_is/models/type5.rb +40 -0
  277. data/lib/xero_ap_is/models/type6.rb +36 -0
  278. data/lib/xero_ap_is/models/type7.rb +37 -0
  279. data/lib/xero_ap_is/models/type8.rb +36 -0
  280. data/lib/xero_ap_is/models/type9.rb +26 -0
  281. data/lib/xero_ap_is/models/unit.rb +36 -0
  282. data/lib/xero_ap_is/models/user.rb +139 -0
  283. data/lib/xero_ap_is/models/users.rb +84 -0
  284. data/lib/xero_ap_is/models/validation_error.rb +75 -0
  285. data/lib/xero_ap_is/models/version.rb +68 -0
  286. data/lib/xero_ap_is/utilities/date_time_helper.rb +11 -0
  287. data/lib/xero_ap_is/utilities/file_wrapper.rb +28 -0
  288. data/lib/xero_ap_is.rb +309 -0
  289. metadata +372 -0
@@ -0,0 +1,88 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module XeroApIs
7
+ # The starting balance of the statement
8
+ class StartBalance < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # decimal(19,4) unsigned Opening/closing balance amount.
13
+ # @return [Float]
14
+ attr_accessor :amount
15
+
16
+ # If the statement balances are credit or debit, the CreditDebitIndicator
17
+ # should be specified from the perspective of the Customer.
18
+ # @return [CreditDebitIndicator]
19
+ attr_accessor :credit_debit_indicator
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['amount'] = 'amount'
25
+ @_hash['credit_debit_indicator'] = 'creditDebitIndicator'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ %w[
32
+ amount
33
+ credit_debit_indicator
34
+ ]
35
+ end
36
+
37
+ # An array for nullable fields
38
+ def self.nullables
39
+ []
40
+ end
41
+
42
+ def initialize(amount: SKIP, credit_debit_indicator: SKIP,
43
+ additional_properties: nil)
44
+ # Add additional model properties to the instance
45
+ additional_properties = {} if additional_properties.nil?
46
+
47
+ @amount = amount unless amount == SKIP
48
+ @credit_debit_indicator = credit_debit_indicator unless credit_debit_indicator == SKIP
49
+ @additional_properties = additional_properties
50
+ end
51
+
52
+ # Creates an instance of the object from a hash.
53
+ def self.from_hash(hash)
54
+ return nil unless hash
55
+
56
+ # Extract variables from the hash.
57
+ amount = hash.key?('amount') ? hash['amount'] : SKIP
58
+ credit_debit_indicator =
59
+ hash.key?('creditDebitIndicator') ? hash['creditDebitIndicator'] : SKIP
60
+
61
+ # Create a new hash for additional properties, removing known properties.
62
+ new_hash = hash.reject { |k, _| names.value?(k) }
63
+
64
+ additional_properties = APIHelper.get_additional_properties(
65
+ new_hash, proc { |value| value }
66
+ )
67
+
68
+ # Create object from extracted values.
69
+ StartBalance.new(amount: amount,
70
+ credit_debit_indicator: credit_debit_indicator,
71
+ additional_properties: additional_properties)
72
+ end
73
+
74
+ # Provides a human-readable string representation of the object.
75
+ def to_s
76
+ class_name = self.class.name.split('::').last
77
+ "<#{class_name} amount: #{@amount}, credit_debit_indicator: #{@credit_debit_indicator},"\
78
+ " additional_properties: #{@additional_properties}>"
79
+ end
80
+
81
+ # Provides a debugging-friendly string with detailed object information.
82
+ def inspect
83
+ class_name = self.class.name.split('::').last
84
+ "<#{class_name} amount: #{@amount.inspect}, credit_debit_indicator:"\
85
+ " #{@credit_debit_indicator.inspect}, additional_properties: #{@additional_properties}>"
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,194 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module XeroApIs
7
+ # Statement Model.
8
+ class Statement < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # GUID used to identify the Statement.
13
+ # @return [UUID | String]
14
+ attr_accessor :id
15
+
16
+ # The Xero generated feed connection Id that identifies the Xero Bank
17
+ # Account Container into which the statement should be delivered. This is
18
+ # obtained by calling GET FeedConnections.
19
+ # @return [UUID | String]
20
+ attr_accessor :feed_connection_id
21
+
22
+ # Current status of statements
23
+ # @return [Status110]
24
+ attr_accessor :status
25
+
26
+ # Opening balance date (can be no older than one year from the current date)
27
+ # ISO-8601 YYYY-MM-DD
28
+ # @return [Date]
29
+ attr_accessor :start_date
30
+
31
+ # Closing balance date ISO-8601 YYYY-MM-DD
32
+ # @return [Date]
33
+ attr_accessor :end_date
34
+
35
+ # The starting balance of the statement
36
+ # @return [StartBalance]
37
+ attr_accessor :start_balance
38
+
39
+ # The StartBalance plus all the Statement Line Amounts should be equal to
40
+ # the EndBalance Amount.
41
+ # @return [EndBalance]
42
+ attr_accessor :end_balance
43
+
44
+ # The StartBalance plus all the Statement Line Amounts should be equal to
45
+ # the EndBalance Amount.
46
+ # @return [Array[StatementLine]]
47
+ attr_accessor :statement_lines
48
+
49
+ # The StartBalance plus all the Statement Line Amounts should be equal to
50
+ # the EndBalance Amount.
51
+ # @return [Array[Error2]]
52
+ attr_accessor :errors
53
+
54
+ # The StartBalance plus all the Statement Line Amounts should be equal to
55
+ # the EndBalance Amount.
56
+ # @return [Integer]
57
+ attr_accessor :statement_line_count
58
+
59
+ # A mapping from model property names to API property names.
60
+ def self.names
61
+ @_hash = {} if @_hash.nil?
62
+ @_hash['id'] = 'id'
63
+ @_hash['feed_connection_id'] = 'feedConnectionId'
64
+ @_hash['status'] = 'status'
65
+ @_hash['start_date'] = 'startDate'
66
+ @_hash['end_date'] = 'endDate'
67
+ @_hash['start_balance'] = 'startBalance'
68
+ @_hash['end_balance'] = 'endBalance'
69
+ @_hash['statement_lines'] = 'statementLines'
70
+ @_hash['errors'] = 'errors'
71
+ @_hash['statement_line_count'] = 'statementLineCount'
72
+ @_hash
73
+ end
74
+
75
+ # An array for optional fields
76
+ def self.optionals
77
+ %w[
78
+ id
79
+ feed_connection_id
80
+ status
81
+ start_date
82
+ end_date
83
+ start_balance
84
+ end_balance
85
+ statement_lines
86
+ errors
87
+ statement_line_count
88
+ ]
89
+ end
90
+
91
+ # An array for nullable fields
92
+ def self.nullables
93
+ []
94
+ end
95
+
96
+ def initialize(id: SKIP, feed_connection_id: SKIP, status: SKIP,
97
+ start_date: SKIP, end_date: SKIP, start_balance: SKIP,
98
+ end_balance: SKIP, statement_lines: SKIP, errors: SKIP,
99
+ statement_line_count: SKIP, additional_properties: nil)
100
+ # Add additional model properties to the instance
101
+ additional_properties = {} if additional_properties.nil?
102
+
103
+ @id = id unless id == SKIP
104
+ @feed_connection_id = feed_connection_id unless feed_connection_id == SKIP
105
+ @status = status unless status == SKIP
106
+ @start_date = start_date unless start_date == SKIP
107
+ @end_date = end_date unless end_date == SKIP
108
+ @start_balance = start_balance unless start_balance == SKIP
109
+ @end_balance = end_balance unless end_balance == SKIP
110
+ @statement_lines = statement_lines unless statement_lines == SKIP
111
+ @errors = errors unless errors == SKIP
112
+ @statement_line_count = statement_line_count unless statement_line_count == SKIP
113
+ @additional_properties = additional_properties
114
+ end
115
+
116
+ # Creates an instance of the object from a hash.
117
+ def self.from_hash(hash)
118
+ return nil unless hash
119
+
120
+ # Extract variables from the hash.
121
+ id = hash.key?('id') ? hash['id'] : SKIP
122
+ feed_connection_id =
123
+ hash.key?('feedConnectionId') ? hash['feedConnectionId'] : SKIP
124
+ status = hash.key?('status') ? hash['status'] : SKIP
125
+ start_date = hash.key?('startDate') ? hash['startDate'] : SKIP
126
+ end_date = hash.key?('endDate') ? hash['endDate'] : SKIP
127
+ start_balance = StartBalance.from_hash(hash['startBalance']) if hash['startBalance']
128
+ end_balance = EndBalance.from_hash(hash['endBalance']) if hash['endBalance']
129
+ # Parameter is an array, so we need to iterate through it
130
+ statement_lines = nil
131
+ unless hash['statementLines'].nil?
132
+ statement_lines = []
133
+ hash['statementLines'].each do |structure|
134
+ statement_lines << (StatementLine.from_hash(structure) if structure)
135
+ end
136
+ end
137
+
138
+ statement_lines = SKIP unless hash.key?('statementLines')
139
+ # Parameter is an array, so we need to iterate through it
140
+ errors = nil
141
+ unless hash['errors'].nil?
142
+ errors = []
143
+ hash['errors'].each do |structure|
144
+ errors << (Error2.from_hash(structure) if structure)
145
+ end
146
+ end
147
+
148
+ errors = SKIP unless hash.key?('errors')
149
+ statement_line_count =
150
+ hash.key?('statementLineCount') ? hash['statementLineCount'] : SKIP
151
+
152
+ # Create a new hash for additional properties, removing known properties.
153
+ new_hash = hash.reject { |k, _| names.value?(k) }
154
+
155
+ additional_properties = APIHelper.get_additional_properties(
156
+ new_hash, proc { |value| value }
157
+ )
158
+
159
+ # Create object from extracted values.
160
+ Statement.new(id: id,
161
+ feed_connection_id: feed_connection_id,
162
+ status: status,
163
+ start_date: start_date,
164
+ end_date: end_date,
165
+ start_balance: start_balance,
166
+ end_balance: end_balance,
167
+ statement_lines: statement_lines,
168
+ errors: errors,
169
+ statement_line_count: statement_line_count,
170
+ additional_properties: additional_properties)
171
+ end
172
+
173
+ # Provides a human-readable string representation of the object.
174
+ def to_s
175
+ class_name = self.class.name.split('::').last
176
+ "<#{class_name} id: #{@id}, feed_connection_id: #{@feed_connection_id}, status: #{@status},"\
177
+ " start_date: #{@start_date}, end_date: #{@end_date}, start_balance: #{@start_balance},"\
178
+ " end_balance: #{@end_balance}, statement_lines: #{@statement_lines}, errors: #{@errors},"\
179
+ " statement_line_count: #{@statement_line_count}, additional_properties:"\
180
+ " #{@additional_properties}>"
181
+ end
182
+
183
+ # Provides a debugging-friendly string with detailed object information.
184
+ def inspect
185
+ class_name = self.class.name.split('::').last
186
+ "<#{class_name} id: #{@id.inspect}, feed_connection_id: #{@feed_connection_id.inspect},"\
187
+ " status: #{@status.inspect}, start_date: #{@start_date.inspect}, end_date:"\
188
+ " #{@end_date.inspect}, start_balance: #{@start_balance.inspect}, end_balance:"\
189
+ " #{@end_balance.inspect}, statement_lines: #{@statement_lines.inspect}, errors:"\
190
+ " #{@errors.inspect}, statement_line_count: #{@statement_line_count.inspect},"\
191
+ " additional_properties: #{@additional_properties}>"
192
+ end
193
+ end
194
+ end
@@ -0,0 +1,162 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module XeroApIs
7
+ # the lines details for a statement
8
+ class StatementLine < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The date that the transaction was processed or cleared as seen in internet
13
+ # banking ISO-8601 YYYY-MM-DD
14
+ # @return [Date]
15
+ attr_accessor :posted_date
16
+
17
+ # Transaction description
18
+ # @return [String]
19
+ attr_accessor :description
20
+
21
+ # Transaction amount
22
+ # @return [Float]
23
+ attr_accessor :amount
24
+
25
+ # If the statement balances are credit or debit, the CreditDebitIndicator
26
+ # should be specified from the perspective of the Customer.
27
+ # @return [CreditDebitIndicator]
28
+ attr_accessor :credit_debit_indicator
29
+
30
+ # Financial institute's internal transaction identifier. If provided this
31
+ # field is factored into duplicate detection.
32
+ # @return [String]
33
+ attr_accessor :transaction_id
34
+
35
+ # Typically the merchant or payee name
36
+ # @return [String]
37
+ attr_accessor :payee_name
38
+
39
+ # Optional field to enhance the Description
40
+ # @return [String]
41
+ attr_accessor :reference
42
+
43
+ # The cheque/check number
44
+ # @return [String]
45
+ attr_accessor :cheque_number
46
+
47
+ # Descriptive transaction type
48
+ # @return [String]
49
+ attr_accessor :transaction_type
50
+
51
+ # A mapping from model property names to API property names.
52
+ def self.names
53
+ @_hash = {} if @_hash.nil?
54
+ @_hash['posted_date'] = 'postedDate'
55
+ @_hash['description'] = 'description'
56
+ @_hash['amount'] = 'amount'
57
+ @_hash['credit_debit_indicator'] = 'creditDebitIndicator'
58
+ @_hash['transaction_id'] = 'transactionId'
59
+ @_hash['payee_name'] = 'payeeName'
60
+ @_hash['reference'] = 'reference'
61
+ @_hash['cheque_number'] = 'chequeNumber'
62
+ @_hash['transaction_type'] = 'transactionType'
63
+ @_hash
64
+ end
65
+
66
+ # An array for optional fields
67
+ def self.optionals
68
+ %w[
69
+ posted_date
70
+ description
71
+ amount
72
+ credit_debit_indicator
73
+ transaction_id
74
+ payee_name
75
+ reference
76
+ cheque_number
77
+ transaction_type
78
+ ]
79
+ end
80
+
81
+ # An array for nullable fields
82
+ def self.nullables
83
+ []
84
+ end
85
+
86
+ def initialize(posted_date: SKIP, description: SKIP, amount: SKIP,
87
+ credit_debit_indicator: SKIP, transaction_id: SKIP,
88
+ payee_name: SKIP, reference: SKIP, cheque_number: SKIP,
89
+ transaction_type: SKIP, additional_properties: nil)
90
+ # Add additional model properties to the instance
91
+ additional_properties = {} if additional_properties.nil?
92
+
93
+ @posted_date = posted_date unless posted_date == SKIP
94
+ @description = description unless description == SKIP
95
+ @amount = amount unless amount == SKIP
96
+ @credit_debit_indicator = credit_debit_indicator unless credit_debit_indicator == SKIP
97
+ @transaction_id = transaction_id unless transaction_id == SKIP
98
+ @payee_name = payee_name unless payee_name == SKIP
99
+ @reference = reference unless reference == SKIP
100
+ @cheque_number = cheque_number unless cheque_number == SKIP
101
+ @transaction_type = transaction_type unless transaction_type == SKIP
102
+ @additional_properties = additional_properties
103
+ end
104
+
105
+ # Creates an instance of the object from a hash.
106
+ def self.from_hash(hash)
107
+ return nil unless hash
108
+
109
+ # Extract variables from the hash.
110
+ posted_date = hash.key?('postedDate') ? hash['postedDate'] : SKIP
111
+ description = hash.key?('description') ? hash['description'] : SKIP
112
+ amount = hash.key?('amount') ? hash['amount'] : SKIP
113
+ credit_debit_indicator =
114
+ hash.key?('creditDebitIndicator') ? hash['creditDebitIndicator'] : SKIP
115
+ transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP
116
+ payee_name = hash.key?('payeeName') ? hash['payeeName'] : SKIP
117
+ reference = hash.key?('reference') ? hash['reference'] : SKIP
118
+ cheque_number = hash.key?('chequeNumber') ? hash['chequeNumber'] : SKIP
119
+ transaction_type =
120
+ hash.key?('transactionType') ? hash['transactionType'] : SKIP
121
+
122
+ # Create a new hash for additional properties, removing known properties.
123
+ new_hash = hash.reject { |k, _| names.value?(k) }
124
+
125
+ additional_properties = APIHelper.get_additional_properties(
126
+ new_hash, proc { |value| value }
127
+ )
128
+
129
+ # Create object from extracted values.
130
+ StatementLine.new(posted_date: posted_date,
131
+ description: description,
132
+ amount: amount,
133
+ credit_debit_indicator: credit_debit_indicator,
134
+ transaction_id: transaction_id,
135
+ payee_name: payee_name,
136
+ reference: reference,
137
+ cheque_number: cheque_number,
138
+ transaction_type: transaction_type,
139
+ additional_properties: additional_properties)
140
+ end
141
+
142
+ # Provides a human-readable string representation of the object.
143
+ def to_s
144
+ class_name = self.class.name.split('::').last
145
+ "<#{class_name} posted_date: #{@posted_date}, description: #{@description}, amount:"\
146
+ " #{@amount}, credit_debit_indicator: #{@credit_debit_indicator}, transaction_id:"\
147
+ " #{@transaction_id}, payee_name: #{@payee_name}, reference: #{@reference}, cheque_number:"\
148
+ " #{@cheque_number}, transaction_type: #{@transaction_type}, additional_properties:"\
149
+ " #{@additional_properties}>"
150
+ end
151
+
152
+ # Provides a debugging-friendly string with detailed object information.
153
+ def inspect
154
+ class_name = self.class.name.split('::').last
155
+ "<#{class_name} posted_date: #{@posted_date.inspect}, description: #{@description.inspect},"\
156
+ " amount: #{@amount.inspect}, credit_debit_indicator: #{@credit_debit_indicator.inspect},"\
157
+ " transaction_id: #{@transaction_id.inspect}, payee_name: #{@payee_name.inspect}, reference:"\
158
+ " #{@reference.inspect}, cheque_number: #{@cheque_number.inspect}, transaction_type:"\
159
+ " #{@transaction_type.inspect}, additional_properties: #{@additional_properties}>"
160
+ end
161
+ end
162
+ end
@@ -0,0 +1,94 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module XeroApIs
7
+ # Statements Model.
8
+ class Statements < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Pagination]
14
+ attr_accessor :pagination
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Array[Statement]]
18
+ attr_accessor :items
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['pagination'] = 'pagination'
24
+ @_hash['items'] = 'items'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ pagination
32
+ items
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(pagination: SKIP, items: SKIP, additional_properties: nil)
42
+ # Add additional model properties to the instance
43
+ additional_properties = {} if additional_properties.nil?
44
+
45
+ @pagination = pagination unless pagination == SKIP
46
+ @items = items unless items == SKIP
47
+ @additional_properties = additional_properties
48
+ end
49
+
50
+ # Creates an instance of the object from a hash.
51
+ def self.from_hash(hash)
52
+ return nil unless hash
53
+
54
+ # Extract variables from the hash.
55
+ pagination = Pagination.from_hash(hash['pagination']) if hash['pagination']
56
+ # Parameter is an array, so we need to iterate through it
57
+ items = nil
58
+ unless hash['items'].nil?
59
+ items = []
60
+ hash['items'].each do |structure|
61
+ items << (Statement.from_hash(structure) if structure)
62
+ end
63
+ end
64
+
65
+ items = SKIP unless hash.key?('items')
66
+
67
+ # Create a new hash for additional properties, removing known properties.
68
+ new_hash = hash.reject { |k, _| names.value?(k) }
69
+
70
+ additional_properties = APIHelper.get_additional_properties(
71
+ new_hash, proc { |value| value }
72
+ )
73
+
74
+ # Create object from extracted values.
75
+ Statements.new(pagination: pagination,
76
+ items: items,
77
+ additional_properties: additional_properties)
78
+ end
79
+
80
+ # Provides a human-readable string representation of the object.
81
+ def to_s
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} pagination: #{@pagination}, items: #{@items}, additional_properties:"\
84
+ " #{@additional_properties}>"
85
+ end
86
+
87
+ # Provides a debugging-friendly string with detailed object information.
88
+ def inspect
89
+ class_name = self.class.name.split('::').last
90
+ "<#{class_name} pagination: #{@pagination.inspect}, items: #{@items.inspect},"\
91
+ " additional_properties: #{@additional_properties}>"
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,41 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module XeroApIs
7
+ # Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account
8
+ # Status Codes
9
+ class Status
10
+ STATUS = [
11
+ # TODO: Write general description for ACTIVE
12
+ ACTIVE = 'ACTIVE'.freeze,
13
+
14
+ # TODO: Write general description for ARCHIVED
15
+ ARCHIVED = 'ARCHIVED'.freeze,
16
+
17
+ # TODO: Write general description for DELETED
18
+ DELETED = 'DELETED'.freeze
19
+ ].freeze
20
+
21
+ def self.validate(value)
22
+ return false if value.nil?
23
+
24
+ STATUS.include?(value)
25
+ end
26
+
27
+ def self.from_value(value, default_value = ACTIVE)
28
+ return default_value if value.nil?
29
+
30
+ str = value.to_s.strip
31
+
32
+ case str.downcase
33
+ when 'active' then ACTIVE
34
+ when 'archived' then ARCHIVED
35
+ when 'deleted' then DELETED
36
+ else
37
+ default_value
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,38 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module XeroApIs
7
+ # The Status of a contact group. To delete a contact group update the status
8
+ # to DELETED. Only contact groups with a status of ACTIVE are returned on
9
+ # GETs.
10
+ class Status1
11
+ STATUS1 = [
12
+ # TODO: Write general description for ACTIVE
13
+ ACTIVE = 'ACTIVE'.freeze,
14
+
15
+ # TODO: Write general description for DELETED
16
+ DELETED = 'DELETED'.freeze
17
+ ].freeze
18
+
19
+ def self.validate(value)
20
+ return false if value.nil?
21
+
22
+ STATUS1.include?(value)
23
+ end
24
+
25
+ def self.from_value(value, default_value = ACTIVE)
26
+ return default_value if value.nil?
27
+
28
+ str = value.to_s.strip
29
+
30
+ case str.downcase
31
+ when 'active' then ACTIVE
32
+ when 'deleted' then DELETED
33
+ else
34
+ default_value
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,40 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module XeroApIs
7
+ # The status of a tracking option
8
+ class Status10
9
+ STATUS10 = [
10
+ # TODO: Write general description for ACTIVE
11
+ ACTIVE = 'ACTIVE'.freeze,
12
+
13
+ # TODO: Write general description for ARCHIVED
14
+ ARCHIVED = 'ARCHIVED'.freeze,
15
+
16
+ # TODO: Write general description for DELETED
17
+ DELETED = 'DELETED'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ STATUS10.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = ACTIVE)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'active' then ACTIVE
33
+ when 'archived' then ARCHIVED
34
+ when 'deleted' then DELETED
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ end