xero-ruby 3.2.1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -1
  3. data/lib/xero-ruby/api/accounting_api.rb +11 -2
  4. data/lib/xero-ruby/api/app_store_api.rb +87 -0
  5. data/lib/xero-ruby/api/finance_api.rb +866 -0
  6. data/lib/xero-ruby/api/payroll_au_api.rb +14 -14
  7. data/lib/xero-ruby/api/payroll_nz_api.rb +18 -12
  8. data/lib/xero-ruby/api/payroll_uk_api.rb +14 -2
  9. data/lib/xero-ruby/api_client.rb +21 -3
  10. data/lib/xero-ruby/configuration.rb +4 -0
  11. data/lib/xero-ruby/models/accounting/account.rb +34 -34
  12. data/lib/xero-ruby/models/accounting/account_type.rb +22 -22
  13. data/lib/xero-ruby/models/accounting/action.rb +2 -2
  14. data/lib/xero-ruby/models/accounting/address.rb +2 -2
  15. data/lib/xero-ruby/models/accounting/address_for_organisation.rb +3 -3
  16. data/lib/xero-ruby/models/accounting/bank_transaction.rb +11 -11
  17. data/lib/xero-ruby/models/accounting/bank_transfer.rb +35 -1
  18. data/lib/xero-ruby/models/accounting/batch_payment.rb +4 -4
  19. data/lib/xero-ruby/models/accounting/branding_theme.rb +1 -1
  20. data/lib/xero-ruby/models/accounting/budget.rb +2 -2
  21. data/lib/xero-ruby/models/accounting/budget_balance.rb +2 -2
  22. data/lib/xero-ruby/models/accounting/contact.rb +89 -4
  23. data/lib/xero-ruby/models/accounting/contact_group.rb +2 -2
  24. data/lib/xero-ruby/models/accounting/country_code.rb +240 -240
  25. data/lib/xero-ruby/models/accounting/credit_note.rb +8 -8
  26. data/lib/xero-ruby/models/accounting/currency_code.rb +166 -166
  27. data/lib/xero-ruby/models/accounting/employee.rb +4 -4
  28. data/lib/xero-ruby/models/accounting/expense_claim.rb +5 -5
  29. data/lib/xero-ruby/models/accounting/external_link.rb +5 -5
  30. data/lib/xero-ruby/models/accounting/invoice.rb +14 -14
  31. data/lib/xero-ruby/models/accounting/journal.rb +25 -25
  32. data/lib/xero-ruby/models/accounting/line_amount_types.rb +3 -3
  33. data/lib/xero-ruby/models/accounting/linked_transaction.rb +8 -8
  34. data/lib/xero-ruby/models/accounting/manual_journal.rb +5 -5
  35. data/lib/xero-ruby/models/accounting/organisation.rb +70 -70
  36. data/lib/xero-ruby/models/accounting/overpayment.rb +6 -6
  37. data/lib/xero-ruby/models/accounting/payment.rb +21 -11
  38. data/lib/xero-ruby/models/accounting/payment_term_type.rb +4 -4
  39. data/lib/xero-ruby/models/accounting/phone.rb +5 -5
  40. data/lib/xero-ruby/models/accounting/prepayment.rb +7 -7
  41. data/lib/xero-ruby/models/accounting/purchase_order.rb +5 -5
  42. data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +3 -3
  43. data/lib/xero-ruby/models/accounting/quote_status_codes.rb +6 -6
  44. data/lib/xero-ruby/models/accounting/receipt.rb +5 -5
  45. data/lib/xero-ruby/models/accounting/repeating_invoice.rb +5 -5
  46. data/lib/xero-ruby/models/accounting/report.rb +1 -1
  47. data/lib/xero-ruby/models/accounting/row_type.rb +4 -4
  48. data/lib/xero-ruby/models/accounting/schedule.rb +8 -8
  49. data/lib/xero-ruby/models/accounting/tax_rate.rb +78 -78
  50. data/lib/xero-ruby/models/accounting/tax_type.rb +59 -59
  51. data/lib/xero-ruby/models/accounting/time_zone.rb +109 -108
  52. data/lib/xero-ruby/models/accounting/tracking_category.rb +3 -3
  53. data/lib/xero-ruby/models/accounting/tracking_option.rb +3 -3
  54. data/lib/xero-ruby/models/accounting/user.rb +7 -7
  55. data/lib/xero-ruby/models/app_store/plan.rb +311 -0
  56. data/lib/xero-ruby/models/app_store/price.rb +257 -0
  57. data/lib/xero-ruby/models/app_store/problem_details.rb +272 -0
  58. data/lib/xero-ruby/models/app_store/product.rb +288 -0
  59. data/lib/xero-ruby/models/app_store/subscription.rb +361 -0
  60. data/lib/xero-ruby/models/app_store/subscription_item.rb +344 -0
  61. data/lib/xero-ruby/models/assets/asset_status.rb +3 -3
  62. data/lib/xero-ruby/models/assets/asset_status_query_param.rb +3 -3
  63. data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +11 -11
  64. data/lib/xero-ruby/models/files/object_group.rb +12 -11
  65. data/lib/xero-ruby/models/files/object_type.rb +56 -55
  66. data/lib/xero-ruby/models/finance/account_usage.rb +342 -0
  67. data/lib/xero-ruby/models/finance/account_usage_response.rb +254 -0
  68. data/lib/xero-ruby/models/finance/balance_sheet_account_detail.rb +262 -0
  69. data/lib/xero-ruby/models/finance/balance_sheet_account_group.rb +234 -0
  70. data/lib/xero-ruby/models/finance/balance_sheet_account_type.rb +244 -0
  71. data/lib/xero-ruby/models/finance/balance_sheet_response.rb +252 -0
  72. data/lib/xero-ruby/models/finance/bank_statement_response.rb +232 -0
  73. data/lib/xero-ruby/models/finance/cash_account_response.rb +262 -0
  74. data/lib/xero-ruby/models/finance/cash_balance.rb +242 -0
  75. data/lib/xero-ruby/models/finance/cash_validation_response.rb +262 -0
  76. data/lib/xero-ruby/models/finance/cashflow_account.rb +282 -0
  77. data/lib/xero-ruby/models/finance/cashflow_activity.rb +244 -0
  78. data/lib/xero-ruby/models/finance/cashflow_response.rb +254 -0
  79. data/lib/xero-ruby/models/finance/cashflow_type.rb +244 -0
  80. data/lib/xero-ruby/models/finance/contact_detail.rb +274 -0
  81. data/lib/xero-ruby/models/finance/contact_total_detail.rb +242 -0
  82. data/lib/xero-ruby/models/finance/contact_total_other.rb +252 -0
  83. data/lib/xero-ruby/models/finance/current_statement_response.rb +272 -0
  84. data/lib/xero-ruby/models/finance/data_source_response.rb +362 -0
  85. data/lib/xero-ruby/models/finance/history_record_response.rb +262 -0
  86. data/lib/xero-ruby/models/finance/income_by_contact_response.rb +284 -0
  87. data/lib/xero-ruby/models/finance/lock_history_model.rb +242 -0
  88. data/lib/xero-ruby/models/finance/lock_history_response.rb +244 -0
  89. data/lib/xero-ruby/models/finance/manual_journal_total.rb +222 -0
  90. data/lib/xero-ruby/models/finance/pnl_account.rb +272 -0
  91. data/lib/xero-ruby/models/finance/pnl_account_class.rb +234 -0
  92. data/lib/xero-ruby/models/finance/pnl_account_type.rb +244 -0
  93. data/lib/xero-ruby/models/finance/practice_response.rb +262 -0
  94. data/lib/xero-ruby/models/finance/problem.rb +252 -0
  95. data/lib/xero-ruby/models/finance/problem_type.rb +39 -0
  96. data/lib/xero-ruby/models/finance/profit_and_loss_response.rb +262 -0
  97. data/lib/xero-ruby/models/finance/report_history_model.rb +242 -0
  98. data/lib/xero-ruby/models/finance/report_history_response.rb +244 -0
  99. data/lib/xero-ruby/models/finance/statement_balance_response.rb +232 -0
  100. data/lib/xero-ruby/models/finance/statement_lines_response.rb +382 -0
  101. data/lib/xero-ruby/models/finance/total_detail.rb +242 -0
  102. data/lib/xero-ruby/models/finance/total_other.rb +242 -0
  103. data/lib/xero-ruby/models/finance/trial_balance_account.rb +312 -0
  104. data/lib/xero-ruby/models/finance/trial_balance_entry.rb +232 -0
  105. data/lib/xero-ruby/models/finance/trial_balance_movement.rb +252 -0
  106. data/lib/xero-ruby/models/finance/trial_balance_response.rb +244 -0
  107. data/lib/xero-ruby/models/finance/user_activities_response.rb +244 -0
  108. data/lib/xero-ruby/models/finance/user_response.rb +336 -0
  109. data/lib/xero-ruby/models/payroll_au/account_type.rb +23 -23
  110. data/lib/xero-ruby/models/payroll_au/allowance_category.rb +41 -0
  111. data/lib/xero-ruby/models/payroll_au/allowance_type.rb +10 -7
  112. data/lib/xero-ruby/models/payroll_au/calendar_type.rb +6 -6
  113. data/lib/xero-ruby/models/payroll_au/deduction_type.rb +3 -3
  114. data/lib/xero-ruby/models/payroll_au/deduction_type_calculation_type.rb +3 -3
  115. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +14 -4
  116. data/lib/xero-ruby/models/payroll_au/earnings_rate_calculation_type.rb +3 -3
  117. data/lib/xero-ruby/models/payroll_au/earnings_type.rb +12 -10
  118. data/lib/xero-ruby/models/payroll_au/employee.rb +34 -5
  119. data/lib/xero-ruby/models/payroll_au/employee_status.rb +2 -2
  120. data/lib/xero-ruby/models/payroll_au/employment_basis.rb +5 -5
  121. data/lib/xero-ruby/models/payroll_au/employment_termination_payment_type.rb +2 -2
  122. data/lib/xero-ruby/models/payroll_au/entitlement_final_pay_payout_type.rb +2 -2
  123. data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +5 -5
  124. data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +2 -2
  125. data/lib/xero-ruby/models/payroll_au/leave_type_contribution_type.rb +4 -4
  126. data/lib/xero-ruby/models/payroll_au/manual_tax_type.rb +6 -5
  127. data/lib/xero-ruby/models/payroll_au/pay_run_status.rb +2 -2
  128. data/lib/xero-ruby/models/payroll_au/payment_frequency_type.rb +7 -7
  129. data/lib/xero-ruby/models/payroll_au/payroll_calendar.rb +11 -1
  130. data/lib/xero-ruby/models/payroll_au/rate_type.rb +3 -3
  131. data/lib/xero-ruby/models/payroll_au/residency_status.rb +3 -3
  132. data/lib/xero-ruby/models/payroll_au/state.rb +8 -8
  133. data/lib/xero-ruby/models/payroll_au/super_fund_type.rb +2 -2
  134. data/lib/xero-ruby/models/payroll_au/superannuation_calculation_type.rb +3 -3
  135. data/lib/xero-ruby/models/payroll_au/superannuation_contribution_type.rb +4 -4
  136. data/lib/xero-ruby/models/payroll_au/tfn_exemption_type.rb +4 -4
  137. data/lib/xero-ruby/models/payroll_au/timesheet_status.rb +5 -5
  138. data/lib/xero-ruby/models/payroll_nz/account.rb +4 -4
  139. data/lib/xero-ruby/models/payroll_nz/bank_account.rb +2 -2
  140. data/lib/xero-ruby/models/payroll_nz/benefit.rb +5 -5
  141. data/lib/xero-ruby/models/payroll_nz/calendar_type.rb +7 -7
  142. data/lib/xero-ruby/models/payroll_nz/deduction.rb +4 -4
  143. data/lib/xero-ruby/models/payroll_nz/earnings_rate.rb +18 -18
  144. data/lib/xero-ruby/models/payroll_nz/employee.rb +2 -2
  145. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +4 -4
  146. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance.rb +6 -6
  147. data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_summary.rb +8 -8
  148. data/lib/xero-ruby/models/payroll_nz/employee_tax.rb +5 -5
  149. data/lib/xero-ruby/models/payroll_nz/leave_period.rb +2 -2
  150. data/lib/xero-ruby/models/payroll_nz/pay_run.rb +5 -5
  151. data/lib/xero-ruby/models/payroll_nz/pay_slip.rb +3 -3
  152. data/lib/xero-ruby/models/payroll_nz/payment_method.rb +3 -3
  153. data/lib/xero-ruby/models/payroll_nz/reimbursement.rb +8 -8
  154. data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +5 -5
  155. data/lib/xero-ruby/models/payroll_nz/statutory_deduction_category.rb +11 -11
  156. data/lib/xero-ruby/models/payroll_nz/tax_code.rb +19 -19
  157. data/lib/xero-ruby/models/payroll_nz/tax_settings.rb +2 -2
  158. data/lib/xero-ruby/models/payroll_nz/timesheet.rb +4 -4
  159. data/lib/xero-ruby/models/payroll_uk/account.rb +7 -7
  160. data/lib/xero-ruby/models/payroll_uk/benefit.rb +4 -4
  161. data/lib/xero-ruby/models/payroll_uk/deduction.rb +12 -12
  162. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +28 -28
  163. data/lib/xero-ruby/models/payroll_uk/employee.rb +2 -2
  164. data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +4 -4
  165. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance.rb +6 -6
  166. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +8 -8
  167. data/lib/xero-ruby/models/payroll_uk/employment.rb +8 -8
  168. data/lib/xero-ruby/models/payroll_uk/leave_period.rb +2 -2
  169. data/lib/xero-ruby/models/payroll_uk/pay_run.rb +11 -11
  170. data/lib/xero-ruby/models/payroll_uk/pay_run_calendar.rb +6 -6
  171. data/lib/xero-ruby/models/payroll_uk/payment_method.rb +3 -3
  172. data/lib/xero-ruby/models/payroll_uk/payslip.rb +3 -3
  173. data/lib/xero-ruby/models/payroll_uk/salary_and_wage.rb +5 -5
  174. data/lib/xero-ruby/models/payroll_uk/statutory_deduction_category.rb +14 -14
  175. data/lib/xero-ruby/models/payroll_uk/timesheet.rb +3 -3
  176. data/lib/xero-ruby/models/projects/charge_type.rb +3 -3
  177. data/lib/xero-ruby/models/projects/currency_code.rb +164 -164
  178. data/lib/xero-ruby/models/projects/project_status.rb +2 -2
  179. data/lib/xero-ruby/models/projects/task.rb +3 -3
  180. data/lib/xero-ruby/models/projects/time_entry.rb +3 -3
  181. data/lib/xero-ruby/version.rb +2 -2
  182. data/lib/xero-ruby.rb +52 -0
  183. data/spec/api_client_spec.rb +3 -0
  184. data/spec/app_store/api/app_store_api_spec.rb +45 -0
  185. data/spec/app_store/models/plan_spec.rb +62 -0
  186. data/spec/app_store/models/price_spec.rb +52 -0
  187. data/spec/app_store/models/problem_details_spec.rb +70 -0
  188. data/spec/app_store/models/product_spec.rb +56 -0
  189. data/spec/app_store/models/subscription_item_spec.rb +70 -0
  190. data/spec/app_store/models/subscription_spec.rb +82 -0
  191. data/spec/configuration_spec.rb +1 -0
  192. data/spec/finance/api/finance_api_spec.rb +156 -0
  193. data/spec/finance/models/account_usage_response_spec.rb +58 -0
  194. data/spec/finance/models/account_usage_spec.rb +112 -0
  195. data/spec/finance/models/balance_sheet_account_detail_spec.rb +64 -0
  196. data/spec/finance/models/balance_sheet_account_group_spec.rb +46 -0
  197. data/spec/finance/models/balance_sheet_account_type_spec.rb +52 -0
  198. data/spec/finance/models/balance_sheet_response_spec.rb +58 -0
  199. data/spec/finance/models/bank_statement_response_spec.rb +46 -0
  200. data/spec/finance/models/cash_account_response_spec.rb +64 -0
  201. data/spec/finance/models/cash_balance_spec.rb +52 -0
  202. data/spec/finance/models/cash_validation_response_spec.rb +64 -0
  203. data/spec/finance/models/cashflow_account_spec.rb +76 -0
  204. data/spec/finance/models/cashflow_activity_spec.rb +52 -0
  205. data/spec/finance/models/cashflow_response_spec.rb +58 -0
  206. data/spec/finance/models/cashflow_type_spec.rb +52 -0
  207. data/spec/finance/models/current_statement_response_spec.rb +70 -0
  208. data/spec/finance/models/data_source_response_spec.rb +124 -0
  209. data/spec/finance/models/history_record_response_spec.rb +64 -0
  210. data/spec/finance/models/lock_history_model_spec.rb +52 -0
  211. data/spec/finance/models/lock_history_response_spec.rb +52 -0
  212. data/spec/finance/models/pnl_account_class_spec.rb +46 -0
  213. data/spec/finance/models/pnl_account_spec.rb +70 -0
  214. data/spec/finance/models/pnl_account_type_spec.rb +52 -0
  215. data/spec/finance/models/practice_response_spec.rb +64 -0
  216. data/spec/finance/models/problem_spec.rb +58 -0
  217. data/spec/finance/models/problem_type_spec.rb +34 -0
  218. data/spec/finance/models/profit_and_loss_response_spec.rb +64 -0
  219. data/spec/finance/models/report_history_model_spec.rb +52 -0
  220. data/spec/finance/models/report_history_response_spec.rb +52 -0
  221. data/spec/finance/models/statement_balance_response_spec.rb +46 -0
  222. data/spec/finance/models/statement_lines_response_spec.rb +136 -0
  223. data/spec/finance/models/trial_balance_account_spec.rb +94 -0
  224. data/spec/finance/models/trial_balance_entry_spec.rb +46 -0
  225. data/spec/finance/models/trial_balance_movement_spec.rb +58 -0
  226. data/spec/finance/models/trial_balance_response_spec.rb +52 -0
  227. data/spec/finance/models/user_activities_response_spec.rb +52 -0
  228. data/spec/finance/models/user_response_spec.rb +106 -0
  229. metadata +143 -3
@@ -633,7 +633,7 @@ module XeroRuby
633
633
  # Searches payroll employees
634
634
  # @param xero_tenant_id [String] Xero identifier for Tenant
635
635
  # @param [Hash] opts the optional parameters
636
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
636
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
637
637
  # @option opts [String] :where Filter by an any element
638
638
  # @option opts [String] :order Order by an any element
639
639
  # @option opts [Integer] :page e.g. page=1 – Up to 100 employees will be returned in a single API call
@@ -646,7 +646,7 @@ module XeroRuby
646
646
  # Searches payroll employees
647
647
  # @param xero_tenant_id [String] Xero identifier for Tenant
648
648
  # @param [Hash] opts the optional parameters
649
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
649
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
650
650
  # @option opts [String] :where Filter by an any element
651
651
  # @option opts [String] :order Order by an any element
652
652
  # @option opts [Integer] :page e.g. page=1 – Up to 100 employees will be returned in a single API call
@@ -789,7 +789,7 @@ module XeroRuby
789
789
  # Retrieves leave applications
790
790
  # @param xero_tenant_id [String] Xero identifier for Tenant
791
791
  # @param [Hash] opts the optional parameters
792
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
792
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
793
793
  # @option opts [String] :where Filter by an any element
794
794
  # @option opts [String] :order Order by an any element
795
795
  # @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
@@ -802,7 +802,7 @@ module XeroRuby
802
802
  # Retrieves leave applications
803
803
  # @param xero_tenant_id [String] Xero identifier for Tenant
804
804
  # @param [Hash] opts the optional parameters
805
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
805
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
806
806
  # @option opts [String] :where Filter by an any element
807
807
  # @option opts [String] :order Order by an any element
808
808
  # @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
@@ -870,7 +870,7 @@ module XeroRuby
870
870
  # Retrieves pay items
871
871
  # @param xero_tenant_id [String] Xero identifier for Tenant
872
872
  # @param [Hash] opts the optional parameters
873
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
873
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
874
874
  # @option opts [String] :where Filter by an any element
875
875
  # @option opts [String] :order Order by an any element
876
876
  # @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
@@ -883,7 +883,7 @@ module XeroRuby
883
883
  # Retrieves pay items
884
884
  # @param xero_tenant_id [String] Xero identifier for Tenant
885
885
  # @param [Hash] opts the optional parameters
886
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
886
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
887
887
  # @option opts [String] :where Filter by an any element
888
888
  # @option opts [String] :order Order by an any element
889
889
  # @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
@@ -1026,7 +1026,7 @@ module XeroRuby
1026
1026
  # Retrieves pay runs
1027
1027
  # @param xero_tenant_id [String] Xero identifier for Tenant
1028
1028
  # @param [Hash] opts the optional parameters
1029
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1029
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1030
1030
  # @option opts [String] :where Filter by an any element
1031
1031
  # @option opts [String] :order Order by an any element
1032
1032
  # @option opts [Integer] :page e.g. page=1 – Up to 100 PayRuns will be returned in a single API call
@@ -1039,7 +1039,7 @@ module XeroRuby
1039
1039
  # Retrieves pay runs
1040
1040
  # @param xero_tenant_id [String] Xero identifier for Tenant
1041
1041
  # @param [Hash] opts the optional parameters
1042
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1042
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1043
1043
  # @option opts [String] :where Filter by an any element
1044
1044
  # @option opts [String] :order Order by an any element
1045
1045
  # @option opts [Integer] :page e.g. page=1 – Up to 100 PayRuns will be returned in a single API call
@@ -1182,7 +1182,7 @@ module XeroRuby
1182
1182
  # Retrieves payroll calendars
1183
1183
  # @param xero_tenant_id [String] Xero identifier for Tenant
1184
1184
  # @param [Hash] opts the optional parameters
1185
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1185
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1186
1186
  # @option opts [String] :where Filter by an any element
1187
1187
  # @option opts [String] :order Order by an any element
1188
1188
  # @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
@@ -1195,7 +1195,7 @@ module XeroRuby
1195
1195
  # Retrieves payroll calendars
1196
1196
  # @param xero_tenant_id [String] Xero identifier for Tenant
1197
1197
  # @param [Hash] opts the optional parameters
1198
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1198
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1199
1199
  # @option opts [String] :where Filter by an any element
1200
1200
  # @option opts [String] :order Order by an any element
1201
1201
  # @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
@@ -1557,7 +1557,7 @@ module XeroRuby
1557
1557
  # Retrieves superfunds
1558
1558
  # @param xero_tenant_id [String] Xero identifier for Tenant
1559
1559
  # @param [Hash] opts the optional parameters
1560
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1560
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1561
1561
  # @option opts [String] :where Filter by an any element
1562
1562
  # @option opts [String] :order Order by an any element
1563
1563
  # @option opts [Integer] :page e.g. page=1 – Up to 100 SuperFunds will be returned in a single API call
@@ -1570,7 +1570,7 @@ module XeroRuby
1570
1570
  # Retrieves superfunds
1571
1571
  # @param xero_tenant_id [String] Xero identifier for Tenant
1572
1572
  # @param [Hash] opts the optional parameters
1573
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1573
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1574
1574
  # @option opts [String] :where Filter by an any element
1575
1575
  # @option opts [String] :order Order by an any element
1576
1576
  # @option opts [Integer] :page e.g. page=1 – Up to 100 SuperFunds will be returned in a single API call
@@ -1713,7 +1713,7 @@ module XeroRuby
1713
1713
  # Retrieves timesheets
1714
1714
  # @param xero_tenant_id [String] Xero identifier for Tenant
1715
1715
  # @param [Hash] opts the optional parameters
1716
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1716
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1717
1717
  # @option opts [String] :where Filter by an any element
1718
1718
  # @option opts [String] :order Order by an any element
1719
1719
  # @option opts [Integer] :page e.g. page=1 – Up to 100 timesheets will be returned in a single API call
@@ -1726,7 +1726,7 @@ module XeroRuby
1726
1726
  # Retrieves timesheets
1727
1727
  # @param xero_tenant_id [String] Xero identifier for Tenant
1728
1728
  # @param [Hash] opts the optional parameters
1729
- # @option opts [String] :if_modified_since Only records created or modified since this timestamp will be returned
1729
+ # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
1730
1730
  # @option opts [String] :where Filter by an any element
1731
1731
  # @option opts [String] :order Order by an any element
1732
1732
  # @option opts [Integer] :page e.g. page=1 – Up to 100 timesheets will be returned in a single API call
@@ -3150,8 +3150,7 @@ module XeroRuby
3150
3150
  # Retrieves employees
3151
3151
  # @param xero_tenant_id [String] Xero identifier for Tenant
3152
3152
  # @param [Hash] opts the optional parameters
3153
- # @option opts [String] :first_name Filter by first name
3154
- # @option opts [String] :last_name Filter by last name
3153
+ # @option opts [String] :filter Filter by first name and/or lastname
3155
3154
  # @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
3156
3155
  # @return [Employees]
3157
3156
  def get_employees(xero_tenant_id, opts = {})
@@ -3162,8 +3161,7 @@ module XeroRuby
3162
3161
  # Retrieves employees
3163
3162
  # @param xero_tenant_id [String] Xero identifier for Tenant
3164
3163
  # @param [Hash] opts the optional parameters
3165
- # @option opts [String] :first_name Filter by first name
3166
- # @option opts [String] :last_name Filter by last name
3164
+ # @option opts [String] :filter Filter by first name and/or lastname
3167
3165
  # @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
3168
3166
  # @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
3169
3167
  def get_employees_with_http_info(xero_tenant_id, options = {})
@@ -3183,8 +3181,7 @@ module XeroRuby
3183
3181
 
3184
3182
  # query parameters
3185
3183
  query_params = opts[:query_params] || {}
3186
- query_params[:'firstName'] = opts[:'first_name'] if !opts[:'first_name'].nil?
3187
- query_params[:'lastName'] = opts[:'last_name'] if !opts[:'last_name'].nil?
3184
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
3188
3185
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
3189
3186
 
3190
3187
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
@@ -4419,8 +4416,11 @@ module XeroRuby
4419
4416
  # @param xero_tenant_id [String] Xero identifier for Tenant
4420
4417
  # @param [Hash] opts the optional parameters
4421
4418
  # @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
4422
- # @option opts [String] :employee_id By default get Timesheets will return the timesheets for all employees in an organization. You can add GET https://…/timesheets?filter&#x3D;employeeId&#x3D;&#x3D;{EmployeeID} to get only the timesheets of a particular employee.
4423
- # @option opts [String] :payroll_calendar_id By default get Timesheets will return all the timesheets for an organization. You can add GET https://…/timesheets?filter&#x3D;payrollCalendarId&#x3D;&#x3D;{PayrollCalendarID} to filter the timesheets by payroll calendar id
4419
+ # @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
4420
+ # @option opts [String] :status filter results by any timesheets with a matching timesheet status
4421
+ # @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
4422
+ # @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
4423
+ # @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
4424
4424
  # @return [Timesheets]
4425
4425
  def get_timesheets(xero_tenant_id, opts = {})
4426
4426
  data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
@@ -4431,8 +4431,11 @@ module XeroRuby
4431
4431
  # @param xero_tenant_id [String] Xero identifier for Tenant
4432
4432
  # @param [Hash] opts the optional parameters
4433
4433
  # @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
4434
- # @option opts [String] :employee_id By default get Timesheets will return the timesheets for all employees in an organization. You can add GET https://…/timesheets?filter&#x3D;employeeId&#x3D;&#x3D;{EmployeeID} to get only the timesheets of a particular employee.
4435
- # @option opts [String] :payroll_calendar_id By default get Timesheets will return all the timesheets for an organization. You can add GET https://…/timesheets?filter&#x3D;payrollCalendarId&#x3D;&#x3D;{PayrollCalendarID} to filter the timesheets by payroll calendar id
4434
+ # @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
4435
+ # @option opts [String] :status filter results by any timesheets with a matching timesheet status
4436
+ # @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
4437
+ # @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
4438
+ # @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
4436
4439
  # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
4437
4440
  def get_timesheets_with_http_info(xero_tenant_id, options = {})
4438
4441
  opts = options.dup
@@ -4452,8 +4455,11 @@ module XeroRuby
4452
4455
  # query parameters
4453
4456
  query_params = opts[:query_params] || {}
4454
4457
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
4455
- query_params[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_id'].nil?
4456
- query_params[:'payrollCalendarId'] = opts[:'payroll_calendar_id'] if !opts[:'payroll_calendar_id'].nil?
4458
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
4459
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
4460
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
4461
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
4462
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
4457
4463
 
4458
4464
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
4459
4465
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -4644,7 +4644,11 @@ module XeroRuby
4644
4644
  # @param xero_tenant_id [String] Xero identifier for Tenant
4645
4645
  # @param [Hash] opts the optional parameters
4646
4646
  # @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
4647
- # @option opts [String] :filter Filter by first name and/or lastname
4647
+ # @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
4648
+ # @option opts [String] :status filter results by any timesheets with a matching timesheet status
4649
+ # @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
4650
+ # @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
4651
+ # @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
4648
4652
  # @return [Timesheets]
4649
4653
  def get_timesheets(xero_tenant_id, opts = {})
4650
4654
  data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
@@ -4655,7 +4659,11 @@ module XeroRuby
4655
4659
  # @param xero_tenant_id [String] Xero identifier for Tenant
4656
4660
  # @param [Hash] opts the optional parameters
4657
4661
  # @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
4658
- # @option opts [String] :filter Filter by first name and/or lastname
4662
+ # @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
4663
+ # @option opts [String] :status filter results by any timesheets with a matching timesheet status
4664
+ # @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
4665
+ # @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
4666
+ # @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
4659
4667
  # @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
4660
4668
  def get_timesheets_with_http_info(xero_tenant_id, options = {})
4661
4669
  opts = options.dup
@@ -4676,6 +4684,10 @@ module XeroRuby
4676
4684
  query_params = opts[:query_params] || {}
4677
4685
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
4678
4686
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
4687
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
4688
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
4689
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
4690
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
4679
4691
 
4680
4692
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
4681
4693
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -57,7 +57,7 @@ module XeroRuby
57
57
  end
58
58
 
59
59
  def authorization_url
60
- url = URI.parse @config.login_url
60
+ url = URI.parse(@config.login_url)
61
61
  url.query = URI.encode_www_form(
62
62
  {
63
63
  response_type: 'code',
@@ -105,6 +105,16 @@ module XeroRuby
105
105
  XeroRuby::PayrollUkApi.new(self)
106
106
  end
107
107
 
108
+ def app_store_api
109
+ @config.base_url = @config.app_store_url
110
+ XeroRuby::AppStoreApi.new(self)
111
+ end
112
+
113
+ def finance_api
114
+ @config.base_url = @config.finance_url
115
+ XeroRuby::FinanceApi.new(self)
116
+ end
117
+
108
118
  # Token Helpers
109
119
  def token_set
110
120
  @config.token_set
@@ -178,7 +188,7 @@ module XeroRuby
178
188
  end
179
189
 
180
190
  def validate_state(params)
181
- if params[:state] != @state
191
+ if params['state'] != @state
182
192
  raise StandardError.new "WARNING: @config.state: #{@state} and OAuth callback state: #{params['state']} do not match!"
183
193
  end
184
194
  return true
@@ -279,12 +289,16 @@ module XeroRuby
279
289
  method_base_url = @config.payroll_uk_url
280
290
  when "ProjectApi"
281
291
  method_base_url = @config.project_url
292
+ when "AppStoreApi"
293
+ method_base_url = @config.app_store_url
294
+ when "FinanceApi"
295
+ method_base_url = @config.finance_url
282
296
  else
283
297
  method_base_url = @config.accounting_url
284
298
  end
285
299
 
286
300
  connection = Faraday.new(:url => method_base_url, :ssl => ssl_options) do |conn|
287
- conn.basic_auth(config.username, config.password)
301
+ conn.request(:basic_auth, config.username, config.password)
288
302
  if opts[:header_params]["Content-Type"] == "multipart/form-data"
289
303
  conn.request :multipart
290
304
  conn.request :url_encoded
@@ -501,6 +515,10 @@ module XeroRuby
501
515
  XeroRuby::PayrollNz.const_get(return_type).build_from_hash(data)
502
516
  when 'PayrollUkApi'
503
517
  XeroRuby::PayrollUk.const_get(return_type).build_from_hash(data)
518
+ when 'AppStoreApi'
519
+ XeroRuby::AppStore.const_get(return_type).build_from_hash(data)
520
+ when 'FinanceApi'
521
+ XeroRuby::Finance.const_get(return_type).build_from_hash(data)
504
522
  else
505
523
  XeroRuby::Accounting.const_get(return_type).build_from_hash(data)
506
524
  end
@@ -33,6 +33,8 @@ module XeroRuby
33
33
  attr_accessor :payroll_au_url
34
34
  attr_accessor :payroll_nz_url
35
35
  attr_accessor :payroll_uk_url
36
+ attr_accessor :app_store_url
37
+ attr_accessor :finance_url
36
38
 
37
39
  # Defines API keys used with API Key authentications.
38
40
  #
@@ -149,6 +151,8 @@ module XeroRuby
149
151
  @payroll_au_url = 'https://api.xero.com/payroll.xro/1.0/'
150
152
  @payroll_nz_url = 'https://api.xero.com/payroll.xro/2.0/'
151
153
  @payroll_uk_url = 'https://api.xero.com/payroll.xro/2.0/'
154
+ @app_store_url = 'https://api.xero.com/appstore/2.0/'
155
+ @finance_url = 'https://api.xero.com/finance.xro/1.0/'
152
156
  @access_token = nil
153
157
  @id_token = nil
154
158
  @api_key = {}
@@ -33,20 +33,20 @@ module XeroRuby::Accounting
33
33
 
34
34
  # Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
35
35
  attr_accessor :status
36
- ACTIVE = "ACTIVE".freeze
37
- ARCHIVED = "ARCHIVED".freeze
38
- DELETED = "DELETED".freeze
36
+ ACTIVE ||= "ACTIVE".freeze
37
+ ARCHIVED ||= "ARCHIVED".freeze
38
+ DELETED ||= "DELETED".freeze
39
39
 
40
40
  # Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
41
41
  attr_accessor :description
42
42
 
43
43
  # For bank accounts only. See Bank Account types
44
44
  attr_accessor :bank_account_type
45
- BANK = "BANK".freeze
46
- CREDITCARD = "CREDITCARD".freeze
47
- PAYPAL = "PAYPAL".freeze
48
- NONE = "NONE".freeze
49
- EMPTY = "".freeze
45
+ BANK ||= "BANK".freeze
46
+ CREDITCARD ||= "CREDITCARD".freeze
47
+ PAYPAL ||= "PAYPAL".freeze
48
+ NONE ||= "NONE".freeze
49
+ EMPTY ||= "".freeze
50
50
 
51
51
 
52
52
  attr_accessor :currency_code
@@ -62,35 +62,35 @@ module XeroRuby::Accounting
62
62
 
63
63
  # See Account Class Types
64
64
  attr_accessor :_class
65
- ASSET = "ASSET".freeze
66
- EQUITY = "EQUITY".freeze
67
- EXPENSE = "EXPENSE".freeze
68
- LIABILITY = "LIABILITY".freeze
69
- REVENUE = "REVENUE".freeze
65
+ ASSET ||= "ASSET".freeze
66
+ EQUITY ||= "EQUITY".freeze
67
+ EXPENSE ||= "EXPENSE".freeze
68
+ LIABILITY ||= "LIABILITY".freeze
69
+ REVENUE ||= "REVENUE".freeze
70
70
 
71
71
  # If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null.
72
72
  attr_accessor :system_account
73
- DEBTORS = "DEBTORS".freeze
74
- CREDITORS = "CREDITORS".freeze
75
- BANKCURRENCYGAIN = "BANKCURRENCYGAIN".freeze
76
- GST = "GST".freeze
77
- GSTONIMPORTS = "GSTONIMPORTS".freeze
78
- HISTORICAL = "HISTORICAL".freeze
79
- REALISEDCURRENCYGAIN = "REALISEDCURRENCYGAIN".freeze
80
- RETAINEDEARNINGS = "RETAINEDEARNINGS".freeze
81
- ROUNDING = "ROUNDING".freeze
82
- TRACKINGTRANSFERS = "TRACKINGTRANSFERS".freeze
83
- UNPAIDEXPCLM = "UNPAIDEXPCLM".freeze
84
- UNREALISEDCURRENCYGAIN = "UNREALISEDCURRENCYGAIN".freeze
85
- WAGEPAYABLES = "WAGEPAYABLES".freeze
86
- CISASSETS = "CISASSETS".freeze
87
- CISASSET = "CISASSET".freeze
88
- CISLABOUR = "CISLABOUR".freeze
89
- CISLABOUREXPENSE = "CISLABOUREXPENSE".freeze
90
- CISLABOURINCOME = "CISLABOURINCOME".freeze
91
- CISLIABILITY = "CISLIABILITY".freeze
92
- CISMATERIALS = "CISMATERIALS".freeze
93
- # EMPTY = "".freeze
73
+ DEBTORS ||= "DEBTORS".freeze
74
+ CREDITORS ||= "CREDITORS".freeze
75
+ BANKCURRENCYGAIN ||= "BANKCURRENCYGAIN".freeze
76
+ GST ||= "GST".freeze
77
+ GSTONIMPORTS ||= "GSTONIMPORTS".freeze
78
+ HISTORICAL ||= "HISTORICAL".freeze
79
+ REALISEDCURRENCYGAIN ||= "REALISEDCURRENCYGAIN".freeze
80
+ RETAINEDEARNINGS ||= "RETAINEDEARNINGS".freeze
81
+ ROUNDING ||= "ROUNDING".freeze
82
+ TRACKINGTRANSFERS ||= "TRACKINGTRANSFERS".freeze
83
+ UNPAIDEXPCLM ||= "UNPAIDEXPCLM".freeze
84
+ UNREALISEDCURRENCYGAIN ||= "UNREALISEDCURRENCYGAIN".freeze
85
+ WAGEPAYABLES ||= "WAGEPAYABLES".freeze
86
+ CISASSETS ||= "CISASSETS".freeze
87
+ CISASSET ||= "CISASSET".freeze
88
+ CISLABOUR ||= "CISLABOUR".freeze
89
+ CISLABOUREXPENSE ||= "CISLABOUREXPENSE".freeze
90
+ CISLABOURINCOME ||= "CISLABOURINCOME".freeze
91
+ CISLIABILITY ||= "CISLIABILITY".freeze
92
+ CISMATERIALS ||= "CISMATERIALS".freeze
93
+ EMPTY ||= "".freeze
94
94
 
95
95
  # Shown if set
96
96
  attr_accessor :reporting_code
@@ -14,28 +14,28 @@ require 'date'
14
14
 
15
15
  module XeroRuby::Accounting
16
16
  class AccountType
17
- BANK = "BANK".freeze
18
- CURRENT = "CURRENT".freeze
19
- CURRLIAB = "CURRLIAB".freeze
20
- DEPRECIATN = "DEPRECIATN".freeze
21
- DIRECTCOSTS = "DIRECTCOSTS".freeze
22
- EQUITY = "EQUITY".freeze
23
- EXPENSE = "EXPENSE".freeze
24
- FIXED = "FIXED".freeze
25
- INVENTORY = "INVENTORY".freeze
26
- LIABILITY = "LIABILITY".freeze
27
- NONCURRENT = "NONCURRENT".freeze
28
- OTHERINCOME = "OTHERINCOME".freeze
29
- OVERHEADS = "OVERHEADS".freeze
30
- PREPAYMENT = "PREPAYMENT".freeze
31
- REVENUE = "REVENUE".freeze
32
- SALES = "SALES".freeze
33
- TERMLIAB = "TERMLIAB".freeze
34
- PAYGLIABILITY = "PAYGLIABILITY".freeze
35
- PAYG = "PAYG".freeze
36
- SUPERANNUATIONEXPENSE = "SUPERANNUATIONEXPENSE".freeze
37
- SUPERANNUATIONLIABILITY = "SUPERANNUATIONLIABILITY".freeze
38
- WAGESEXPENSE = "WAGESEXPENSE".freeze
17
+ BANK ||= "BANK".freeze
18
+ CURRENT ||= "CURRENT".freeze
19
+ CURRLIAB ||= "CURRLIAB".freeze
20
+ DEPRECIATN ||= "DEPRECIATN".freeze
21
+ DIRECTCOSTS ||= "DIRECTCOSTS".freeze
22
+ EQUITY ||= "EQUITY".freeze
23
+ EXPENSE ||= "EXPENSE".freeze
24
+ FIXED ||= "FIXED".freeze
25
+ INVENTORY ||= "INVENTORY".freeze
26
+ LIABILITY ||= "LIABILITY".freeze
27
+ NONCURRENT ||= "NONCURRENT".freeze
28
+ OTHERINCOME ||= "OTHERINCOME".freeze
29
+ OVERHEADS ||= "OVERHEADS".freeze
30
+ PREPAYMENT ||= "PREPAYMENT".freeze
31
+ REVENUE ||= "REVENUE".freeze
32
+ SALES ||= "SALES".freeze
33
+ TERMLIAB ||= "TERMLIAB".freeze
34
+ PAYGLIABILITY ||= "PAYGLIABILITY".freeze
35
+ PAYG ||= "PAYG".freeze
36
+ SUPERANNUATIONEXPENSE ||= "SUPERANNUATIONEXPENSE".freeze
37
+ SUPERANNUATIONLIABILITY ||= "SUPERANNUATIONLIABILITY".freeze
38
+ WAGESEXPENSE ||= "WAGESEXPENSE".freeze
39
39
 
40
40
  # Builds the enum from string
41
41
  # @param [String] The enum value in the form of the string
@@ -21,8 +21,8 @@ module XeroRuby::Accounting
21
21
 
22
22
  # Status of the action for this organisation
23
23
  attr_accessor :status
24
- ALLOWED = "ALLOWED".freeze
25
- NOT_ALLOWED = "NOT-ALLOWED".freeze
24
+ ALLOWED ||= "ALLOWED".freeze
25
+ NOT_ALLOWED ||= "NOT-ALLOWED".freeze
26
26
 
27
27
  class EnumAttributeValidator
28
28
  attr_reader :datatype
@@ -18,8 +18,8 @@ module XeroRuby::Accounting
18
18
  class Address
19
19
  # define the type of address
20
20
  attr_accessor :address_type
21
- POBOX = "POBOX".freeze
22
- STREET = "STREET".freeze
21
+ POBOX ||= "POBOX".freeze
22
+ STREET ||= "STREET".freeze
23
23
 
24
24
  # max length = 500
25
25
  attr_accessor :address_line1
@@ -18,9 +18,9 @@ module XeroRuby::Accounting
18
18
  class AddressForOrganisation
19
19
  # define the type of address
20
20
  attr_accessor :address_type
21
- POBOX = "POBOX".freeze
22
- STREET = "STREET".freeze
23
- DELIVERY = "DELIVERY".freeze
21
+ POBOX ||= "POBOX".freeze
22
+ STREET ||= "STREET".freeze
23
+ DELIVERY ||= "DELIVERY".freeze
24
24
 
25
25
  # max length = 500
26
26
  attr_accessor :address_line1
@@ -18,14 +18,14 @@ module XeroRuby::Accounting
18
18
  class BankTransaction
19
19
  # See Bank Transaction Types
20
20
  attr_accessor :type
21
- RECEIVE = "RECEIVE".freeze
22
- RECEIVE_OVERPAYMENT = "RECEIVE-OVERPAYMENT".freeze
23
- RECEIVE_PREPAYMENT = "RECEIVE-PREPAYMENT".freeze
24
- SPEND = "SPEND".freeze
25
- SPEND_OVERPAYMENT = "SPEND-OVERPAYMENT".freeze
26
- SPEND_PREPAYMENT = "SPEND-PREPAYMENT".freeze
27
- RECEIVE_TRANSFER = "RECEIVE-TRANSFER".freeze
28
- SPEND_TRANSFER = "SPEND-TRANSFER".freeze
21
+ RECEIVE ||= "RECEIVE".freeze
22
+ RECEIVE_OVERPAYMENT ||= "RECEIVE-OVERPAYMENT".freeze
23
+ RECEIVE_PREPAYMENT ||= "RECEIVE-PREPAYMENT".freeze
24
+ SPEND ||= "SPEND".freeze
25
+ SPEND_OVERPAYMENT ||= "SPEND-OVERPAYMENT".freeze
26
+ SPEND_PREPAYMENT ||= "SPEND-PREPAYMENT".freeze
27
+ RECEIVE_TRANSFER ||= "RECEIVE-TRANSFER".freeze
28
+ SPEND_TRANSFER ||= "SPEND-TRANSFER".freeze
29
29
 
30
30
 
31
31
  attr_accessor :contact
@@ -56,9 +56,9 @@ module XeroRuby::Accounting
56
56
 
57
57
  # See Bank Transaction Status Codes
58
58
  attr_accessor :status
59
- AUTHORISED = "AUTHORISED".freeze
60
- DELETED = "DELETED".freeze
61
- VOIDED = "VOIDED".freeze
59
+ AUTHORISED ||= "AUTHORISED".freeze
60
+ DELETED ||= "DELETED".freeze
61
+ VOIDED ||= "VOIDED".freeze
62
62
 
63
63
 
64
64
  attr_accessor :line_amount_types
@@ -40,6 +40,15 @@ module XeroRuby::Accounting
40
40
  # The Bank Transaction ID for the destination account
41
41
  attr_accessor :to_bank_transaction_id
42
42
 
43
+ # The Bank Transaction boolean to show if it is reconciled for the source account
44
+ attr_accessor :from_is_reconciled
45
+
46
+ # The Bank Transaction boolean to show if it is reconciled for the destination account
47
+ attr_accessor :to_is_reconciled
48
+
49
+ # Reference for the transactions.
50
+ attr_accessor :reference
51
+
43
52
  # Boolean to indicate if a Bank Transfer has an attachment
44
53
  attr_accessor :has_attachments
45
54
 
@@ -60,6 +69,9 @@ module XeroRuby::Accounting
60
69
  :'currency_rate' => :'CurrencyRate',
61
70
  :'from_bank_transaction_id' => :'FromBankTransactionID',
62
71
  :'to_bank_transaction_id' => :'ToBankTransactionID',
72
+ :'from_is_reconciled' => :'FromIsReconciled',
73
+ :'to_is_reconciled' => :'ToIsReconciled',
74
+ :'reference' => :'Reference',
63
75
  :'has_attachments' => :'HasAttachments',
64
76
  :'created_date_utc' => :'CreatedDateUTC',
65
77
  :'validation_errors' => :'ValidationErrors'
@@ -77,6 +89,9 @@ module XeroRuby::Accounting
77
89
  :'currency_rate' => :'BigDecimal',
78
90
  :'from_bank_transaction_id' => :'String',
79
91
  :'to_bank_transaction_id' => :'String',
92
+ :'from_is_reconciled' => :'Boolean',
93
+ :'to_is_reconciled' => :'Boolean',
94
+ :'reference' => :'String',
80
95
  :'has_attachments' => :'Boolean',
81
96
  :'created_date_utc' => :'DateTime',
82
97
  :'validation_errors' => :'Array<ValidationError>'
@@ -130,6 +145,22 @@ module XeroRuby::Accounting
130
145
  self.to_bank_transaction_id = attributes[:'to_bank_transaction_id']
131
146
  end
132
147
 
148
+ if attributes.key?(:'from_is_reconciled')
149
+ self.from_is_reconciled = attributes[:'from_is_reconciled']
150
+ else
151
+ self.from_is_reconciled = false
152
+ end
153
+
154
+ if attributes.key?(:'to_is_reconciled')
155
+ self.to_is_reconciled = attributes[:'to_is_reconciled']
156
+ else
157
+ self.to_is_reconciled = false
158
+ end
159
+
160
+ if attributes.key?(:'reference')
161
+ self.reference = attributes[:'reference']
162
+ end
163
+
133
164
  if attributes.key?(:'has_attachments')
134
165
  self.has_attachments = attributes[:'has_attachments']
135
166
  else
@@ -188,6 +219,9 @@ module XeroRuby::Accounting
188
219
  currency_rate == o.currency_rate &&
189
220
  from_bank_transaction_id == o.from_bank_transaction_id &&
190
221
  to_bank_transaction_id == o.to_bank_transaction_id &&
222
+ from_is_reconciled == o.from_is_reconciled &&
223
+ to_is_reconciled == o.to_is_reconciled &&
224
+ reference == o.reference &&
191
225
  has_attachments == o.has_attachments &&
192
226
  created_date_utc == o.created_date_utc &&
193
227
  validation_errors == o.validation_errors
@@ -202,7 +236,7 @@ module XeroRuby::Accounting
202
236
  # Calculates hash code according to all attributes.
203
237
  # @return [Integer] Hash code
204
238
  def hash
205
- [from_bank_account, to_bank_account, amount, date, bank_transfer_id, currency_rate, from_bank_transaction_id, to_bank_transaction_id, has_attachments, created_date_utc, validation_errors].hash
239
+ [from_bank_account, to_bank_account, amount, date, bank_transfer_id, currency_rate, from_bank_transaction_id, to_bank_transaction_id, from_is_reconciled, to_is_reconciled, reference, has_attachments, created_date_utc, validation_errors].hash
206
240
  end
207
241
 
208
242
  # Builds the object from hash
@@ -51,13 +51,13 @@ module XeroRuby::Accounting
51
51
 
52
52
  # PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only)
53
53
  attr_accessor :type
54
- PAYBATCH = "PAYBATCH".freeze
55
- RECBATCH = "RECBATCH".freeze
54
+ PAYBATCH ||= "PAYBATCH".freeze
55
+ RECBATCH ||= "RECBATCH".freeze
56
56
 
57
57
  # AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API.
58
58
  attr_accessor :status
59
- AUTHORISED = "AUTHORISED".freeze
60
- DELETED = "DELETED".freeze
59
+ AUTHORISED ||= "AUTHORISED".freeze
60
+ DELETED ||= "DELETED".freeze
61
61
 
62
62
  # The total of the payments that make up the batch (read-only)
63
63
  attr_accessor :total_amount
@@ -27,7 +27,7 @@ module XeroRuby::Accounting
27
27
 
28
28
  # Always INVOICE
29
29
  attr_accessor :type
30
- INVOICE = "INVOICE".freeze
30
+ INVOICE ||= "INVOICE".freeze
31
31
 
32
32
  # Integer – ranked order of branding theme. The default branding theme has a value of 0
33
33
  attr_accessor :sort_order