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,318 @@
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
+ # TenNinetyNineContact Model.
8
+ class TenNinetyNineContact < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Box 1 on 1099 Form
13
+ # @return [Float]
14
+ attr_accessor :box1
15
+
16
+ # Box 2 on 1099 Form
17
+ # @return [Float]
18
+ attr_accessor :box2
19
+
20
+ # Box 3 on 1099 Form
21
+ # @return [Float]
22
+ attr_accessor :box3
23
+
24
+ # Box 4 on 1099 Form
25
+ # @return [Float]
26
+ attr_accessor :box4
27
+
28
+ # Box 5 on 1099 Form
29
+ # @return [Float]
30
+ attr_accessor :box5
31
+
32
+ # Box 6 on 1099 Form
33
+ # @return [Float]
34
+ attr_accessor :box6
35
+
36
+ # Box 7 on 1099 Form
37
+ # @return [Float]
38
+ attr_accessor :box7
39
+
40
+ # Box 8 on 1099 Form
41
+ # @return [Float]
42
+ attr_accessor :box8
43
+
44
+ # Box 9 on 1099 Form
45
+ # @return [Float]
46
+ attr_accessor :box9
47
+
48
+ # Box 10 on 1099 Form
49
+ # @return [Float]
50
+ attr_accessor :box10
51
+
52
+ # Box 11 on 1099 Form
53
+ # @return [Float]
54
+ attr_accessor :box11
55
+
56
+ # Box 13 on 1099 Form
57
+ # @return [Float]
58
+ attr_accessor :box13
59
+
60
+ # Box 14 on 1099 Form
61
+ # @return [Float]
62
+ attr_accessor :box14
63
+
64
+ # Contact name on 1099 Form
65
+ # @return [String]
66
+ attr_accessor :name
67
+
68
+ # Contact Fed Tax ID type
69
+ # @return [String]
70
+ attr_accessor :federal_tax_id_type
71
+
72
+ # Contact city on 1099 Form
73
+ # @return [String]
74
+ attr_accessor :city
75
+
76
+ # Contact zip on 1099 Form
77
+ # @return [String]
78
+ attr_accessor :zip
79
+
80
+ # Contact State on 1099 Form
81
+ # @return [String]
82
+ attr_accessor :state
83
+
84
+ # Contact email on 1099 Form
85
+ # @return [String]
86
+ attr_accessor :email
87
+
88
+ # Contact address on 1099 Form
89
+ # @return [String]
90
+ attr_accessor :street_address
91
+
92
+ # Contact tax id on 1099 Form
93
+ # @return [String]
94
+ attr_accessor :tax_id
95
+
96
+ # Contact contact id
97
+ # @return [UUID | String]
98
+ attr_accessor :contact_id
99
+
100
+ # Contact legal name
101
+ # @return [String]
102
+ attr_accessor :legal_name
103
+
104
+ # Contact business name
105
+ # @return [String]
106
+ attr_accessor :business_name
107
+
108
+ # Contact federal tax classification
109
+ # @return [FederalTaxClassification]
110
+ attr_accessor :federal_tax_classification
111
+
112
+ # A mapping from model property names to API property names.
113
+ def self.names
114
+ @_hash = {} if @_hash.nil?
115
+ @_hash['box1'] = 'Box1'
116
+ @_hash['box2'] = 'Box2'
117
+ @_hash['box3'] = 'Box3'
118
+ @_hash['box4'] = 'Box4'
119
+ @_hash['box5'] = 'Box5'
120
+ @_hash['box6'] = 'Box6'
121
+ @_hash['box7'] = 'Box7'
122
+ @_hash['box8'] = 'Box8'
123
+ @_hash['box9'] = 'Box9'
124
+ @_hash['box10'] = 'Box10'
125
+ @_hash['box11'] = 'Box11'
126
+ @_hash['box13'] = 'Box13'
127
+ @_hash['box14'] = 'Box14'
128
+ @_hash['name'] = 'Name'
129
+ @_hash['federal_tax_id_type'] = 'FederalTaxIDType'
130
+ @_hash['city'] = 'City'
131
+ @_hash['zip'] = 'Zip'
132
+ @_hash['state'] = 'State'
133
+ @_hash['email'] = 'Email'
134
+ @_hash['street_address'] = 'StreetAddress'
135
+ @_hash['tax_id'] = 'TaxID'
136
+ @_hash['contact_id'] = 'ContactId'
137
+ @_hash['legal_name'] = 'LegalName'
138
+ @_hash['business_name'] = 'BusinessName'
139
+ @_hash['federal_tax_classification'] = 'FederalTaxClassification'
140
+ @_hash
141
+ end
142
+
143
+ # An array for optional fields
144
+ def self.optionals
145
+ %w[
146
+ box1
147
+ box2
148
+ box3
149
+ box4
150
+ box5
151
+ box6
152
+ box7
153
+ box8
154
+ box9
155
+ box10
156
+ box11
157
+ box13
158
+ box14
159
+ name
160
+ federal_tax_id_type
161
+ city
162
+ zip
163
+ state
164
+ email
165
+ street_address
166
+ tax_id
167
+ contact_id
168
+ legal_name
169
+ business_name
170
+ federal_tax_classification
171
+ ]
172
+ end
173
+
174
+ # An array for nullable fields
175
+ def self.nullables
176
+ []
177
+ end
178
+
179
+ def initialize(box1: SKIP, box2: SKIP, box3: SKIP, box4: SKIP, box5: SKIP,
180
+ box6: SKIP, box7: SKIP, box8: SKIP, box9: SKIP, box10: SKIP,
181
+ box11: SKIP, box13: SKIP, box14: SKIP, name: SKIP,
182
+ federal_tax_id_type: SKIP, city: SKIP, zip: SKIP,
183
+ state: SKIP, email: SKIP, street_address: SKIP, tax_id: SKIP,
184
+ contact_id: SKIP, legal_name: SKIP, business_name: SKIP,
185
+ federal_tax_classification: SKIP, additional_properties: nil)
186
+ # Add additional model properties to the instance
187
+ additional_properties = {} if additional_properties.nil?
188
+
189
+ @box1 = box1 unless box1 == SKIP
190
+ @box2 = box2 unless box2 == SKIP
191
+ @box3 = box3 unless box3 == SKIP
192
+ @box4 = box4 unless box4 == SKIP
193
+ @box5 = box5 unless box5 == SKIP
194
+ @box6 = box6 unless box6 == SKIP
195
+ @box7 = box7 unless box7 == SKIP
196
+ @box8 = box8 unless box8 == SKIP
197
+ @box9 = box9 unless box9 == SKIP
198
+ @box10 = box10 unless box10 == SKIP
199
+ @box11 = box11 unless box11 == SKIP
200
+ @box13 = box13 unless box13 == SKIP
201
+ @box14 = box14 unless box14 == SKIP
202
+ @name = name unless name == SKIP
203
+ @federal_tax_id_type = federal_tax_id_type unless federal_tax_id_type == SKIP
204
+ @city = city unless city == SKIP
205
+ @zip = zip unless zip == SKIP
206
+ @state = state unless state == SKIP
207
+ @email = email unless email == SKIP
208
+ @street_address = street_address unless street_address == SKIP
209
+ @tax_id = tax_id unless tax_id == SKIP
210
+ @contact_id = contact_id unless contact_id == SKIP
211
+ @legal_name = legal_name unless legal_name == SKIP
212
+ @business_name = business_name unless business_name == SKIP
213
+ unless federal_tax_classification == SKIP
214
+ @federal_tax_classification =
215
+ federal_tax_classification
216
+ end
217
+ @additional_properties = additional_properties
218
+ end
219
+
220
+ # Creates an instance of the object from a hash.
221
+ def self.from_hash(hash)
222
+ return nil unless hash
223
+
224
+ # Extract variables from the hash.
225
+ box1 = hash.key?('Box1') ? hash['Box1'] : SKIP
226
+ box2 = hash.key?('Box2') ? hash['Box2'] : SKIP
227
+ box3 = hash.key?('Box3') ? hash['Box3'] : SKIP
228
+ box4 = hash.key?('Box4') ? hash['Box4'] : SKIP
229
+ box5 = hash.key?('Box5') ? hash['Box5'] : SKIP
230
+ box6 = hash.key?('Box6') ? hash['Box6'] : SKIP
231
+ box7 = hash.key?('Box7') ? hash['Box7'] : SKIP
232
+ box8 = hash.key?('Box8') ? hash['Box8'] : SKIP
233
+ box9 = hash.key?('Box9') ? hash['Box9'] : SKIP
234
+ box10 = hash.key?('Box10') ? hash['Box10'] : SKIP
235
+ box11 = hash.key?('Box11') ? hash['Box11'] : SKIP
236
+ box13 = hash.key?('Box13') ? hash['Box13'] : SKIP
237
+ box14 = hash.key?('Box14') ? hash['Box14'] : SKIP
238
+ name = hash.key?('Name') ? hash['Name'] : SKIP
239
+ federal_tax_id_type =
240
+ hash.key?('FederalTaxIDType') ? hash['FederalTaxIDType'] : SKIP
241
+ city = hash.key?('City') ? hash['City'] : SKIP
242
+ zip = hash.key?('Zip') ? hash['Zip'] : SKIP
243
+ state = hash.key?('State') ? hash['State'] : SKIP
244
+ email = hash.key?('Email') ? hash['Email'] : SKIP
245
+ street_address = hash.key?('StreetAddress') ? hash['StreetAddress'] : SKIP
246
+ tax_id = hash.key?('TaxID') ? hash['TaxID'] : SKIP
247
+ contact_id = hash.key?('ContactId') ? hash['ContactId'] : SKIP
248
+ legal_name = hash.key?('LegalName') ? hash['LegalName'] : SKIP
249
+ business_name = hash.key?('BusinessName') ? hash['BusinessName'] : SKIP
250
+ federal_tax_classification =
251
+ hash.key?('FederalTaxClassification') ? hash['FederalTaxClassification'] : SKIP
252
+
253
+ # Create a new hash for additional properties, removing known properties.
254
+ new_hash = hash.reject { |k, _| names.value?(k) }
255
+
256
+ additional_properties = APIHelper.get_additional_properties(
257
+ new_hash, proc { |value| value }
258
+ )
259
+
260
+ # Create object from extracted values.
261
+ TenNinetyNineContact.new(box1: box1,
262
+ box2: box2,
263
+ box3: box3,
264
+ box4: box4,
265
+ box5: box5,
266
+ box6: box6,
267
+ box7: box7,
268
+ box8: box8,
269
+ box9: box9,
270
+ box10: box10,
271
+ box11: box11,
272
+ box13: box13,
273
+ box14: box14,
274
+ name: name,
275
+ federal_tax_id_type: federal_tax_id_type,
276
+ city: city,
277
+ zip: zip,
278
+ state: state,
279
+ email: email,
280
+ street_address: street_address,
281
+ tax_id: tax_id,
282
+ contact_id: contact_id,
283
+ legal_name: legal_name,
284
+ business_name: business_name,
285
+ federal_tax_classification: federal_tax_classification,
286
+ additional_properties: additional_properties)
287
+ end
288
+
289
+ # Provides a human-readable string representation of the object.
290
+ def to_s
291
+ class_name = self.class.name.split('::').last
292
+ "<#{class_name} box1: #{@box1}, box2: #{@box2}, box3: #{@box3}, box4: #{@box4}, box5:"\
293
+ " #{@box5}, box6: #{@box6}, box7: #{@box7}, box8: #{@box8}, box9: #{@box9}, box10:"\
294
+ " #{@box10}, box11: #{@box11}, box13: #{@box13}, box14: #{@box14}, name: #{@name},"\
295
+ " federal_tax_id_type: #{@federal_tax_id_type}, city: #{@city}, zip: #{@zip}, state:"\
296
+ " #{@state}, email: #{@email}, street_address: #{@street_address}, tax_id: #{@tax_id},"\
297
+ " contact_id: #{@contact_id}, legal_name: #{@legal_name}, business_name: #{@business_name},"\
298
+ " federal_tax_classification: #{@federal_tax_classification}, additional_properties:"\
299
+ " #{@additional_properties}>"
300
+ end
301
+
302
+ # Provides a debugging-friendly string with detailed object information.
303
+ def inspect
304
+ class_name = self.class.name.split('::').last
305
+ "<#{class_name} box1: #{@box1.inspect}, box2: #{@box2.inspect}, box3: #{@box3.inspect},"\
306
+ " box4: #{@box4.inspect}, box5: #{@box5.inspect}, box6: #{@box6.inspect}, box7:"\
307
+ " #{@box7.inspect}, box8: #{@box8.inspect}, box9: #{@box9.inspect}, box10:"\
308
+ " #{@box10.inspect}, box11: #{@box11.inspect}, box13: #{@box13.inspect}, box14:"\
309
+ " #{@box14.inspect}, name: #{@name.inspect}, federal_tax_id_type:"\
310
+ " #{@federal_tax_id_type.inspect}, city: #{@city.inspect}, zip: #{@zip.inspect}, state:"\
311
+ " #{@state.inspect}, email: #{@email.inspect}, street_address: #{@street_address.inspect},"\
312
+ " tax_id: #{@tax_id.inspect}, contact_id: #{@contact_id.inspect}, legal_name:"\
313
+ " #{@legal_name.inspect}, business_name: #{@business_name.inspect},"\
314
+ " federal_tax_classification: #{@federal_tax_classification.inspect}, additional_properties:"\
315
+ " #{@additional_properties}>"
316
+ end
317
+ end
318
+ 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
+ # TimeEntries Model.
8
+ class TimeEntries < 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[TimeEntry]]
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 << (TimeEntry.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
+ TimeEntries.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,179 @@
1
+ # xero_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module XeroApIs
8
+ # TimeEntry Model.
9
+ class TimeEntry < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Identifier of the time entry.
14
+ # @return [UUID | String]
15
+ attr_accessor :time_entry_id
16
+
17
+ # The xero user identifier of the person who logged time.
18
+ # @return [UUID | String]
19
+ attr_accessor :user_id
20
+
21
+ # Identifier of the project, that the task (which the time entry is logged
22
+ # against) belongs to.
23
+ # @return [UUID | String]
24
+ attr_accessor :project_id
25
+
26
+ # Identifier of the task that time entry is logged against.
27
+ # @return [UUID | String]
28
+ attr_accessor :task_id
29
+
30
+ # The date time that time entry is logged on. UTC Date Time in ISO-8601
31
+ # format.
32
+ # @return [DateTime]
33
+ attr_accessor :date_utc
34
+
35
+ # The date time that time entry is created. UTC Date Time in ISO-8601
36
+ # format. By default it is set to server time.
37
+ # @return [DateTime]
38
+ attr_accessor :date_entered_utc
39
+
40
+ # The duration of logged minutes.
41
+ # @return [Integer]
42
+ attr_accessor :duration
43
+
44
+ # A description of the time entry.
45
+ # @return [String]
46
+ attr_accessor :description
47
+
48
+ # Status of the time entry. By default a time entry is created with status
49
+ # of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently
50
+ # changing state (for example being invoiced). Updates are not allowed when
51
+ # in this state. It will have a status of INVOICED once it is invoiced.
52
+ # @return [Status111]
53
+ attr_accessor :status
54
+
55
+ # A mapping from model property names to API property names.
56
+ def self.names
57
+ @_hash = {} if @_hash.nil?
58
+ @_hash['time_entry_id'] = 'timeEntryId'
59
+ @_hash['user_id'] = 'userId'
60
+ @_hash['project_id'] = 'projectId'
61
+ @_hash['task_id'] = 'taskId'
62
+ @_hash['date_utc'] = 'dateUtc'
63
+ @_hash['date_entered_utc'] = 'dateEnteredUtc'
64
+ @_hash['duration'] = 'duration'
65
+ @_hash['description'] = 'description'
66
+ @_hash['status'] = 'status'
67
+ @_hash
68
+ end
69
+
70
+ # An array for optional fields
71
+ def self.optionals
72
+ %w[
73
+ time_entry_id
74
+ user_id
75
+ project_id
76
+ task_id
77
+ date_utc
78
+ date_entered_utc
79
+ duration
80
+ description
81
+ status
82
+ ]
83
+ end
84
+
85
+ # An array for nullable fields
86
+ def self.nullables
87
+ []
88
+ end
89
+
90
+ def initialize(time_entry_id: SKIP, user_id: SKIP, project_id: SKIP,
91
+ task_id: SKIP, date_utc: SKIP, date_entered_utc: SKIP,
92
+ duration: SKIP, description: SKIP, status: SKIP,
93
+ additional_properties: nil)
94
+ # Add additional model properties to the instance
95
+ additional_properties = {} if additional_properties.nil?
96
+
97
+ @time_entry_id = time_entry_id unless time_entry_id == SKIP
98
+ @user_id = user_id unless user_id == SKIP
99
+ @project_id = project_id unless project_id == SKIP
100
+ @task_id = task_id unless task_id == SKIP
101
+ @date_utc = date_utc unless date_utc == SKIP
102
+ @date_entered_utc = date_entered_utc unless date_entered_utc == SKIP
103
+ @duration = duration unless duration == SKIP
104
+ @description = description unless description == SKIP
105
+ @status = status unless status == SKIP
106
+ @additional_properties = additional_properties
107
+ end
108
+
109
+ # Creates an instance of the object from a hash.
110
+ def self.from_hash(hash)
111
+ return nil unless hash
112
+
113
+ # Extract variables from the hash.
114
+ time_entry_id = hash.key?('timeEntryId') ? hash['timeEntryId'] : SKIP
115
+ user_id = hash.key?('userId') ? hash['userId'] : SKIP
116
+ project_id = hash.key?('projectId') ? hash['projectId'] : SKIP
117
+ task_id = hash.key?('taskId') ? hash['taskId'] : SKIP
118
+ date_utc = if hash.key?('dateUtc')
119
+ (DateTimeHelper.from_rfc3339(hash['dateUtc']) if hash['dateUtc'])
120
+ else
121
+ SKIP
122
+ end
123
+ date_entered_utc = if hash.key?('dateEnteredUtc')
124
+ (DateTimeHelper.from_rfc3339(hash['dateEnteredUtc']) if hash['dateEnteredUtc'])
125
+ else
126
+ SKIP
127
+ end
128
+ duration = hash.key?('duration') ? hash['duration'] : SKIP
129
+ description = hash.key?('description') ? hash['description'] : SKIP
130
+ status = hash.key?('status') ? hash['status'] : SKIP
131
+
132
+ # Create a new hash for additional properties, removing known properties.
133
+ new_hash = hash.reject { |k, _| names.value?(k) }
134
+
135
+ additional_properties = APIHelper.get_additional_properties(
136
+ new_hash, proc { |value| value }
137
+ )
138
+
139
+ # Create object from extracted values.
140
+ TimeEntry.new(time_entry_id: time_entry_id,
141
+ user_id: user_id,
142
+ project_id: project_id,
143
+ task_id: task_id,
144
+ date_utc: date_utc,
145
+ date_entered_utc: date_entered_utc,
146
+ duration: duration,
147
+ description: description,
148
+ status: status,
149
+ additional_properties: additional_properties)
150
+ end
151
+
152
+ def to_custom_date_utc
153
+ DateTimeHelper.to_rfc3339(date_utc)
154
+ end
155
+
156
+ def to_custom_date_entered_utc
157
+ DateTimeHelper.to_rfc3339(date_entered_utc)
158
+ end
159
+
160
+ # Provides a human-readable string representation of the object.
161
+ def to_s
162
+ class_name = self.class.name.split('::').last
163
+ "<#{class_name} time_entry_id: #{@time_entry_id}, user_id: #{@user_id}, project_id:"\
164
+ " #{@project_id}, task_id: #{@task_id}, date_utc: #{@date_utc}, date_entered_utc:"\
165
+ " #{@date_entered_utc}, duration: #{@duration}, description: #{@description}, status:"\
166
+ " #{@status}, additional_properties: #{@additional_properties}>"
167
+ end
168
+
169
+ # Provides a debugging-friendly string with detailed object information.
170
+ def inspect
171
+ class_name = self.class.name.split('::').last
172
+ "<#{class_name} time_entry_id: #{@time_entry_id.inspect}, user_id: #{@user_id.inspect},"\
173
+ " project_id: #{@project_id.inspect}, task_id: #{@task_id.inspect}, date_utc:"\
174
+ " #{@date_utc.inspect}, date_entered_utc: #{@date_entered_utc.inspect}, duration:"\
175
+ " #{@duration.inspect}, description: #{@description.inspect}, status: #{@status.inspect},"\
176
+ " additional_properties: #{@additional_properties}>"
177
+ end
178
+ end
179
+ end