xero-ruby 12.0.0 → 16.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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xero-ruby/api/accounting_api.rb +6 -319
  3. data/lib/xero-ruby/api/files_api.rb +2 -2
  4. data/lib/xero-ruby/api/finance_api.rb +0 -299
  5. data/lib/xero-ruby/api/payroll_au_v2_api.rb +751 -0
  6. data/lib/xero-ruby/api/payroll_nz_api.rb +0 -86
  7. data/lib/xero-ruby/api/payroll_uk_api.rb +0 -86
  8. data/lib/xero-ruby/models/accounting/contact.rb +27 -1
  9. data/lib/xero-ruby/models/accounting/organisation.rb +23 -6
  10. data/lib/xero-ruby/models/accounting/overpayment.rb +11 -1
  11. data/lib/xero-ruby/models/accounting/prepayment.rb +21 -1
  12. data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +54 -4
  13. data/lib/xero-ruby/models/files/association.rb +21 -1
  14. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +11 -1
  15. data/lib/xero-ruby/models/payroll_au/employee.rb +1 -13
  16. data/lib/xero-ruby/models/payroll_au/leave_line.rb +11 -1
  17. data/lib/xero-ruby/models/payroll_au/leave_type.rb +14 -4
  18. data/lib/xero-ruby/models/payroll_au/opening_balance_leave_line.rb +232 -0
  19. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +1 -1
  20. data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +14 -4
  21. data/lib/xero-ruby/models/payroll_au_v2/invalid_field.rb +232 -0
  22. data/lib/xero-ruby/models/payroll_au_v2/pagination.rb +252 -0
  23. data/lib/xero-ruby/models/payroll_au_v2/problem.rb +275 -0
  24. data/lib/xero-ruby/models/payroll_au_v2/timesheet.rb +361 -0
  25. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line.rb +277 -0
  26. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line_object.rb +242 -0
  27. data/lib/xero-ruby/models/payroll_au_v2/timesheet_object.rb +242 -0
  28. data/lib/xero-ruby/models/payroll_au_v2/timesheets.rb +244 -0
  29. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +1 -21
  30. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +3 -13
  31. data/lib/xero-ruby/models/payroll_nz/employee_pay_template.rb +5 -0
  32. data/lib/xero-ruby/models/payroll_uk/contract_type.rb +38 -0
  33. data/lib/xero-ruby/models/payroll_uk/contracts.rb +297 -0
  34. data/lib/xero-ruby/models/payroll_uk/developmental_role_details.rb +267 -0
  35. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -2
  36. data/lib/xero-ruby/models/payroll_uk/employee.rb +16 -4
  37. data/lib/xero-ruby/models/payroll_uk/employee_pay_template.rb +5 -0
  38. data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +3 -2
  39. data/lib/xero-ruby/models/payroll_uk/employment.rb +16 -4
  40. data/lib/xero-ruby/models/payroll_uk/employment_status.rb +37 -0
  41. data/lib/xero-ruby/version.rb +2 -2
  42. data/lib/xero-ruby.rb +14 -10
  43. data/spec/finance/api/finance_api_spec.rb +0 -53
  44. metadata +374 -380
  45. data/spec/finance/models/account_usage_response_spec.rb +0 -58
  46. data/spec/finance/models/account_usage_spec.rb +0 -112
  47. data/spec/finance/models/history_record_response_spec.rb +0 -64
  48. data/spec/finance/models/lock_history_model_spec.rb +0 -52
  49. data/spec/finance/models/lock_history_response_spec.rb +0 -52
  50. data/spec/finance/models/practice_response_spec.rb +0 -64
  51. data/spec/finance/models/report_history_model_spec.rb +0 -52
  52. data/spec/finance/models/report_history_response_spec.rb +0 -52
  53. data/spec/finance/models/user_activities_response_spec.rb +0 -52
  54. data/spec/finance/models/user_response_spec.rb +0 -106
@@ -31,6 +31,7 @@ module XeroRuby::PayrollUk
31
31
  SHAREDPARENTAL ||= "Sharedparental".freeze
32
32
  BEREAVEMENT ||= "Bereavement".freeze
33
33
  NEONATAL_CARE ||= "NeonatalCare".freeze
34
+ BEREAVEMENT_NIRE ||= "BereavementNire".freeze
34
35
 
35
36
  # The date when the leave starts
36
37
  attr_accessor :start_date
@@ -149,7 +150,7 @@ module XeroRuby::PayrollUk
149
150
  # Check to see if the all the properties in the model are valid
150
151
  # @return true if the model is valid
151
152
  def valid?
152
- type_validator = EnumAttributeValidator.new('String', ["Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement", "NeonatalCare"])
153
+ type_validator = EnumAttributeValidator.new('String', ["Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement", "NeonatalCare", "BereavementNire"])
153
154
  return false unless type_validator.valid?(@type)
154
155
  status_validator = EnumAttributeValidator.new('String', ["Pending", "In-Progress", "Completed"])
155
156
  return false unless status_validator.valid?(@status)
@@ -159,7 +160,7 @@ module XeroRuby::PayrollUk
159
160
  # Custom attribute writer method checking allowed values (enum).
160
161
  # @param [Object] type Object to be assigned
161
162
  def type=(type)
162
- validator = EnumAttributeValidator.new('String', ["Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement", "NeonatalCare"])
163
+ validator = EnumAttributeValidator.new('String', ["Sick", "Adoption", "Maternity", "Paternity", "Sharedparental", "Bereavement", "NeonatalCare", "BereavementNire"])
163
164
  unless validator.valid?(type)
164
165
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
165
166
  end
@@ -31,6 +31,9 @@ module XeroRuby::PayrollUk
31
31
  # The employee's NI categories
32
32
  attr_accessor :ni_categories
33
33
 
34
+ # The employee's contracts
35
+ attr_accessor :contracts
36
+
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
35
38
  def self.attribute_map
36
39
  {
@@ -38,7 +41,8 @@ module XeroRuby::PayrollUk
38
41
  :'start_date' => :'startDate',
39
42
  :'employee_number' => :'employeeNumber',
40
43
  :'ni_category' => :'niCategory',
41
- :'ni_categories' => :'niCategories'
44
+ :'ni_categories' => :'niCategories',
45
+ :'contracts' => :'contracts'
42
46
  }
43
47
  end
44
48
 
@@ -49,7 +53,8 @@ module XeroRuby::PayrollUk
49
53
  :'start_date' => :'Date',
50
54
  :'employee_number' => :'String',
51
55
  :'ni_category' => :'NICategoryLetter',
52
- :'ni_categories' => :'Array<NICategory>'
56
+ :'ni_categories' => :'Array<NICategory>',
57
+ :'contracts' => :'Array<Contracts>'
53
58
  }
54
59
  end
55
60
 
@@ -89,6 +94,12 @@ module XeroRuby::PayrollUk
89
94
  self.ni_categories = value
90
95
  end
91
96
  end
97
+
98
+ if attributes.key?(:'contracts')
99
+ if (value = attributes[:'contracts']).is_a?(Array)
100
+ self.contracts = value
101
+ end
102
+ end
92
103
  end
93
104
 
94
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -133,7 +144,8 @@ module XeroRuby::PayrollUk
133
144
  start_date == o.start_date &&
134
145
  employee_number == o.employee_number &&
135
146
  ni_category == o.ni_category &&
136
- ni_categories == o.ni_categories
147
+ ni_categories == o.ni_categories &&
148
+ contracts == o.contracts
137
149
  end
138
150
 
139
151
  # @see the `==` method
@@ -145,7 +157,7 @@ module XeroRuby::PayrollUk
145
157
  # Calculates hash code according to all attributes.
146
158
  # @return [Integer] Hash code
147
159
  def hash
148
- [payroll_calendar_id, start_date, employee_number, ni_category, ni_categories].hash
160
+ [payroll_calendar_id, start_date, employee_number, ni_category, ni_categories, contracts].hash
149
161
  end
150
162
 
151
163
  # Builds the object from hash
@@ -0,0 +1,37 @@
1
+ =begin
2
+ #Xero Payroll UK
3
+
4
+ #This is the Xero Payroll API for orgs in the UK region.
5
+
6
+ Contact: api@xero.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 4.3.1
9
+
10
+ =end
11
+
12
+ require 'time'
13
+ require 'date'
14
+
15
+ module XeroRuby::PayrollUk
16
+ class EmploymentStatus
17
+ EMPLOYEE ||= "Employee".freeze
18
+ WORKER ||= "Worker".freeze
19
+ UNSPECIFIED ||= "Unspecified".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = EmploymentStatus.constants.select { |c| EmploymentStatus::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #EmploymentStatus" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end
@@ -7,9 +7,9 @@ Contact: api@xero.com
7
7
  Generated by: https://openapi-generator.tech
8
8
  OpenAPI Generator version: 4.3.1
9
9
 
10
- The version of the XeroOpenAPI document: 9.0.0
10
+ The version of the XeroOpenAPI document: 14.0.0
11
11
  =end
12
12
 
13
13
  module XeroRuby
14
- VERSION = '12.0.0'
14
+ VERSION = '16.0.0'
15
15
  end
data/lib/xero-ruby.rb CHANGED
@@ -18,8 +18,6 @@ require 'xero-ruby/version'
18
18
  require 'xero-ruby/configuration'
19
19
 
20
20
  # Models
21
- require 'xero-ruby/models/finance/account_usage'
22
- require 'xero-ruby/models/finance/account_usage_response'
23
21
  require 'xero-ruby/models/finance/balance_sheet_account_detail'
24
22
  require 'xero-ruby/models/finance/balance_sheet_account_group'
25
23
  require 'xero-ruby/models/finance/balance_sheet_account_type'
@@ -41,25 +39,19 @@ require 'xero-ruby/models/finance/contact_total_other'
41
39
  require 'xero-ruby/models/finance/credit_note_response'
42
40
  require 'xero-ruby/models/finance/current_statement_response'
43
41
  require 'xero-ruby/models/finance/data_source_response'
44
- require 'xero-ruby/models/finance/history_record_response'
45
42
  require 'xero-ruby/models/finance/income_by_contact_response'
46
43
  require 'xero-ruby/models/finance/invoice_response'
47
44
  require 'xero-ruby/models/finance/line_item_response'
48
- require 'xero-ruby/models/finance/lock_history_model'
49
- require 'xero-ruby/models/finance/lock_history_response'
50
45
  require 'xero-ruby/models/finance/manual_journal_total'
51
46
  require 'xero-ruby/models/finance/overpayment_response'
52
47
  require 'xero-ruby/models/finance/payment_response'
53
48
  require 'xero-ruby/models/finance/pnl_account'
54
49
  require 'xero-ruby/models/finance/pnl_account_class'
55
50
  require 'xero-ruby/models/finance/pnl_account_type'
56
- require 'xero-ruby/models/finance/practice_response'
57
51
  require 'xero-ruby/models/finance/prepayment_response'
58
52
  require 'xero-ruby/models/finance/problem'
59
53
  require 'xero-ruby/models/finance/problem_type'
60
54
  require 'xero-ruby/models/finance/profit_and_loss_response'
61
- require 'xero-ruby/models/finance/report_history_model'
62
- require 'xero-ruby/models/finance/report_history_response'
63
55
  require 'xero-ruby/models/finance/statement_balance_response'
64
56
  require 'xero-ruby/models/finance/statement_line_response'
65
57
  require 'xero-ruby/models/finance/statement_lines_response'
@@ -70,8 +62,6 @@ require 'xero-ruby/models/finance/trial_balance_account'
70
62
  require 'xero-ruby/models/finance/trial_balance_entry'
71
63
  require 'xero-ruby/models/finance/trial_balance_movement'
72
64
  require 'xero-ruby/models/finance/trial_balance_response'
73
- require 'xero-ruby/models/finance/user_activities_response'
74
- require 'xero-ruby/models/finance/user_response'
75
65
  require 'xero-ruby/models/app_store/create_usage_record'
76
66
  require 'xero-ruby/models/app_store/plan'
77
67
  require 'xero-ruby/models/app_store/price'
@@ -90,11 +80,14 @@ require 'xero-ruby/models/payroll_uk/benefit'
90
80
  require 'xero-ruby/models/payroll_uk/benefit_line'
91
81
  require 'xero-ruby/models/payroll_uk/benefit_object'
92
82
  require 'xero-ruby/models/payroll_uk/benefits'
83
+ require 'xero-ruby/models/payroll_uk/contract_type'
84
+ require 'xero-ruby/models/payroll_uk/contracts'
93
85
  require 'xero-ruby/models/payroll_uk/court_order_line'
94
86
  require 'xero-ruby/models/payroll_uk/deduction'
95
87
  require 'xero-ruby/models/payroll_uk/deduction_line'
96
88
  require 'xero-ruby/models/payroll_uk/deduction_object'
97
89
  require 'xero-ruby/models/payroll_uk/deductions'
90
+ require 'xero-ruby/models/payroll_uk/developmental_role_details'
98
91
  require 'xero-ruby/models/payroll_uk/earnings_line'
99
92
  require 'xero-ruby/models/payroll_uk/earnings_order'
100
93
  require 'xero-ruby/models/payroll_uk/earnings_order_object'
@@ -131,6 +124,7 @@ require 'xero-ruby/models/payroll_uk/employee_tax_object'
131
124
  require 'xero-ruby/models/payroll_uk/employees'
132
125
  require 'xero-ruby/models/payroll_uk/employment'
133
126
  require 'xero-ruby/models/payroll_uk/employment_object'
127
+ require 'xero-ruby/models/payroll_uk/employment_status'
134
128
  require 'xero-ruby/models/payroll_uk/invalid_field'
135
129
  require 'xero-ruby/models/payroll_uk/leave_accrual_line'
136
130
  require 'xero-ruby/models/payroll_uk/leave_earnings_line'
@@ -281,6 +275,14 @@ require 'xero-ruby/models/payroll_nz/timesheets'
281
275
  require 'xero-ruby/models/payroll_nz/tracking_categories'
282
276
  require 'xero-ruby/models/payroll_nz/tracking_category'
283
277
  require 'xero-ruby/models/payroll_nz/working_week'
278
+ require 'xero-ruby/models/payroll_au_v2/invalid_field'
279
+ require 'xero-ruby/models/payroll_au_v2/pagination'
280
+ require 'xero-ruby/models/payroll_au_v2/problem'
281
+ require 'xero-ruby/models/payroll_au_v2/timesheet'
282
+ require 'xero-ruby/models/payroll_au_v2/timesheet_line'
283
+ require 'xero-ruby/models/payroll_au_v2/timesheet_line_object'
284
+ require 'xero-ruby/models/payroll_au_v2/timesheet_object'
285
+ require 'xero-ruby/models/payroll_au_v2/timesheets'
284
286
  require 'xero-ruby/models/payroll_au/api_exception'
285
287
  require 'xero-ruby/models/payroll_au/account'
286
288
  require 'xero-ruby/models/payroll_au/account_type'
@@ -319,6 +321,7 @@ require 'xero-ruby/models/payroll_au/leave_period_status'
319
321
  require 'xero-ruby/models/payroll_au/leave_type'
320
322
  require 'xero-ruby/models/payroll_au/leave_type_contribution_type'
321
323
  require 'xero-ruby/models/payroll_au/manual_tax_type'
324
+ require 'xero-ruby/models/payroll_au/opening_balance_leave_line'
322
325
  require 'xero-ruby/models/payroll_au/opening_balances'
323
326
  require 'xero-ruby/models/payroll_au/paid_leave_earnings_line'
324
327
  require 'xero-ruby/models/payroll_au/pay_item'
@@ -550,6 +553,7 @@ require 'xero-ruby/api/finance_api'
550
553
  require 'xero-ruby/api/app_store_api'
551
554
  require 'xero-ruby/api/payroll_uk_api'
552
555
  require 'xero-ruby/api/payroll_nz_api'
556
+ require 'xero-ruby/api/payroll_au_v2_api'
553
557
  require 'xero-ruby/api/payroll_au_api'
554
558
  require 'xero-ruby/api/files_api'
555
559
  require 'xero-ruby/api/project_api'
@@ -31,59 +31,6 @@ describe 'FinanceApi' do
31
31
  end
32
32
  end
33
33
 
34
- # unit tests for get_accounting_activity_account_usage
35
- # Get account usage
36
- # A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments.
37
- # @param xero_tenant_id Xero identifier for Tenant
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :start_month date, yyyy-MM If no parameter is provided, the month 12 months prior to the end month will be used. Account usage for up to 12 months from this date will be returned.
40
- # @option opts [String] :end_month date, yyyy-MM If no parameter is provided, the current month will be used. Account usage for up to 12 months prior to this date will be returned.
41
- # @return [AccountUsageResponse]
42
- describe 'get_accounting_activity_account_usage test' do
43
- it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- # unit tests for get_accounting_activity_lock_history
49
- # Get lock history
50
- # Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods.
51
- # @param xero_tenant_id Xero identifier for Tenant
52
- # @param [Hash] opts the optional parameters
53
- # @option opts [String] :end_date date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a change is visible from this API.
54
- # @return [LockHistoryResponse]
55
- describe 'get_accounting_activity_lock_history test' do
56
- it 'should work' do
57
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
- end
59
- end
60
-
61
- # unit tests for get_accounting_activity_report_history
62
- # Get report history
63
- # For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight.
64
- # @param xero_tenant_id Xero identifier for Tenant
65
- # @param [Hash] opts the optional parameters
66
- # @option opts [String] :end_date date, yyyy-MM-dd If no parameter is provided, the current date will be used. Any reports that were published within the period up to 12 months before this date will be returned. Please be aware that there may be a delay of up to 3 days before a published report is visible from this API.
67
- # @return [ReportHistoryResponse]
68
- describe 'get_accounting_activity_report_history test' do
69
- it 'should work' do
70
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
- end
72
- end
73
-
74
- # unit tests for get_accounting_activity_user_activities
75
- # Get user activities
76
- # For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction.
77
- # @param xero_tenant_id Xero identifier for Tenant
78
- # @param [Hash] opts the optional parameters
79
- # @option opts [String] :data_month date, yyyy-MM The specified month must be complete (in the past); The current month cannot be specified since it is not complete. If no parameter is provided, the month immediately previous to the current month will be used. Any user activities occurring within the specified month will be returned. Please be aware that there may be a delay of up to 3 days before a user activity is visible from this API.
80
- # @return [UserActivitiesResponse]
81
- describe 'get_accounting_activity_user_activities test' do
82
- it 'should work' do
83
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
84
- end
85
- end
86
-
87
34
  # unit tests for get_cash_validation
88
35
  # Get cash validation
89
36
  # Summarizes the total cash position for each account for an org