xero-ruby 3.9.0 → 7.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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/xero-ruby/api/accounting_api.rb +1136 -46
  4. data/lib/xero-ruby/api/app_store_api.rb +244 -0
  5. data/lib/xero-ruby/api/asset_api.rb +16 -6
  6. data/lib/xero-ruby/api/files_api.rb +156 -20
  7. data/lib/xero-ruby/api/payroll_au_api.rb +326 -30
  8. data/lib/xero-ruby/api/payroll_nz_api.rb +87 -0
  9. data/lib/xero-ruby/api/payroll_uk_api.rb +81 -0
  10. data/lib/xero-ruby/api/project_api.rb +286 -2
  11. data/lib/xero-ruby/api_client.rb +9 -3
  12. data/lib/xero-ruby/models/accounting/account.rb +1 -1
  13. data/lib/xero-ruby/models/accounting/account_type.rb +0 -4
  14. data/lib/xero-ruby/models/accounting/allocation.rb +21 -1
  15. data/lib/xero-ruby/models/accounting/batch_payment.rb +2 -2
  16. data/lib/xero-ruby/models/accounting/batch_payment_delete.rb +244 -0
  17. data/lib/xero-ruby/models/accounting/batch_payment_delete_by_url_param.rb +229 -0
  18. data/lib/xero-ruby/models/accounting/contact.rb +1 -11
  19. data/lib/xero-ruby/models/accounting/currency_code.rb +10 -8
  20. data/lib/xero-ruby/models/accounting/journal_line.rb +1 -1
  21. data/lib/xero-ruby/models/accounting/line_item.rb +2 -2
  22. data/lib/xero-ruby/models/accounting/organisation.rb +6 -2
  23. data/lib/xero-ruby/models/accounting/payment.rb +26 -4
  24. data/lib/xero-ruby/models/accounting/repeating_invoice.rb +53 -5
  25. data/lib/xero-ruby/models/accounting/tax_rate.rb +23 -5
  26. data/lib/xero-ruby/models/accounting/tax_type.rb +60 -3
  27. data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +75 -4
  28. data/lib/xero-ruby/models/accounting/time_zone.rb +123 -91
  29. data/lib/xero-ruby/models/app_store/create_usage_record.rb +243 -0
  30. data/lib/xero-ruby/models/app_store/update_usage_record.rb +228 -0
  31. data/lib/xero-ruby/models/app_store/usage_record.rb +332 -0
  32. data/lib/xero-ruby/models/app_store/usage_records_list.rb +230 -0
  33. data/lib/xero-ruby/models/files/association.rb +31 -1
  34. data/lib/xero-ruby/models/finance/problem_type.rb +1 -0
  35. data/lib/xero-ruby/models/finance/statement_line_response.rb +11 -1
  36. data/lib/xero-ruby/models/finance/statement_response.rb +24 -4
  37. data/lib/xero-ruby/models/payroll_au/allowance_type.rb +0 -1
  38. data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +284 -0
  39. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +21 -1
  40. data/lib/xero-ruby/models/payroll_au/earnings_type.rb +2 -0
  41. data/lib/xero-ruby/models/payroll_au/employee.rb +42 -2
  42. data/lib/xero-ruby/models/payroll_au/employment_basis.rb +1 -0
  43. data/lib/xero-ruby/models/payroll_au/employment_type.rb +36 -0
  44. data/lib/xero-ruby/models/payroll_au/income_type.rb +39 -0
  45. data/lib/xero-ruby/models/payroll_au/leave_application.rb +11 -1
  46. data/lib/xero-ruby/models/payroll_au/leave_category_code.rb +46 -0
  47. data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +14 -4
  48. data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +0 -1
  49. data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +2 -0
  50. data/lib/xero-ruby/models/payroll_au/leave_type.rb +24 -4
  51. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +16 -4
  52. data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -0
  53. data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -0
  54. data/lib/xero-ruby/models/payroll_au/senior_marital_status.rb +37 -0
  55. data/lib/xero-ruby/models/payroll_au/settings.rb +14 -4
  56. data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +51 -1
  57. data/lib/xero-ruby/models/payroll_au/tax_scale_type.rb +40 -0
  58. data/lib/xero-ruby/models/payroll_au/work_condition.rb +37 -0
  59. data/lib/xero-ruby/models/payroll_nz/employee.rb +14 -4
  60. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -3
  61. data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
  62. data/lib/xero-ruby/models/projects/task.rb +6 -6
  63. data/lib/xero-ruby/models/projects/task_create_or_update.rb +1 -1
  64. data/lib/xero-ruby/version.rb +2 -2
  65. data/lib/xero-ruby/where.rb +2 -0
  66. data/lib/xero-ruby.rb +15 -0
  67. metadata +30 -15
@@ -0,0 +1,284 @@
1
+ =begin
2
+ #Xero Payroll AU API
3
+
4
+ #This is the Xero Payroll API for orgs in Australia 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::PayrollAu
16
+ class CountryOfResidence
17
+ AF ||= "AF".freeze
18
+ AX ||= "AX".freeze
19
+ AL ||= "AL".freeze
20
+ DZ ||= "DZ".freeze
21
+ AS ||= "AS".freeze
22
+ AD ||= "AD".freeze
23
+ AO ||= "AO".freeze
24
+ AI ||= "AI".freeze
25
+ AQ ||= "AQ".freeze
26
+ AG ||= "AG".freeze
27
+ AR ||= "AR".freeze
28
+ AM ||= "AM".freeze
29
+ AW ||= "AW".freeze
30
+ AU ||= "AU".freeze
31
+ AT ||= "AT".freeze
32
+ AZ ||= "AZ".freeze
33
+ BS ||= "BS".freeze
34
+ BH ||= "BH".freeze
35
+ BD ||= "BD".freeze
36
+ BB ||= "BB".freeze
37
+ BY ||= "BY".freeze
38
+ BE ||= "BE".freeze
39
+ BZ ||= "BZ".freeze
40
+ BJ ||= "BJ".freeze
41
+ BM ||= "BM".freeze
42
+ BT ||= "BT".freeze
43
+ BO ||= "BO".freeze
44
+ BA ||= "BA".freeze
45
+ BW ||= "BW".freeze
46
+ BV ||= "BV".freeze
47
+ BR ||= "BR".freeze
48
+ IO ||= "IO".freeze
49
+ BN ||= "BN".freeze
50
+ BG ||= "BG".freeze
51
+ BF ||= "BF".freeze
52
+ BI ||= "BI".freeze
53
+ KH ||= "KH".freeze
54
+ CM ||= "CM".freeze
55
+ CA ||= "CA".freeze
56
+ CV ||= "CV".freeze
57
+ KY ||= "KY".freeze
58
+ CF ||= "CF".freeze
59
+ TD ||= "TD".freeze
60
+ CL ||= "CL".freeze
61
+ CN ||= "CN".freeze
62
+ CX ||= "CX".freeze
63
+ CC ||= "CC".freeze
64
+ CO ||= "CO".freeze
65
+ KM ||= "KM".freeze
66
+ CG ||= "CG".freeze
67
+ CD ||= "CD".freeze
68
+ CK ||= "CK".freeze
69
+ CR ||= "CR".freeze
70
+ CI ||= "CI".freeze
71
+ HR ||= "HR".freeze
72
+ CU ||= "CU".freeze
73
+ CY ||= "CY".freeze
74
+ CZ ||= "CZ".freeze
75
+ DK ||= "DK".freeze
76
+ DJ ||= "DJ".freeze
77
+ DM ||= "DM".freeze
78
+ DO ||= "DO".freeze
79
+ EC ||= "EC".freeze
80
+ EG ||= "EG".freeze
81
+ SV ||= "SV".freeze
82
+ GQ ||= "GQ".freeze
83
+ ER ||= "ER".freeze
84
+ EE ||= "EE".freeze
85
+ ET ||= "ET".freeze
86
+ FK ||= "FK".freeze
87
+ FO ||= "FO".freeze
88
+ FJ ||= "FJ".freeze
89
+ FI ||= "FI".freeze
90
+ FR ||= "FR".freeze
91
+ GF ||= "GF".freeze
92
+ PF ||= "PF".freeze
93
+ TF ||= "TF".freeze
94
+ GA ||= "GA".freeze
95
+ GM ||= "GM".freeze
96
+ GE ||= "GE".freeze
97
+ DE ||= "DE".freeze
98
+ GH ||= "GH".freeze
99
+ GI ||= "GI".freeze
100
+ GR ||= "GR".freeze
101
+ GL ||= "GL".freeze
102
+ GD ||= "GD".freeze
103
+ GP ||= "GP".freeze
104
+ GU ||= "GU".freeze
105
+ GT ||= "GT".freeze
106
+ GG ||= "GG".freeze
107
+ GN ||= "GN".freeze
108
+ GW ||= "GW".freeze
109
+ GY ||= "GY".freeze
110
+ HT ||= "HT".freeze
111
+ HM ||= "HM".freeze
112
+ VA ||= "VA".freeze
113
+ HN ||= "HN".freeze
114
+ HK ||= "HK".freeze
115
+ HU ||= "HU".freeze
116
+ IS ||= "IS".freeze
117
+ IN ||= "IN".freeze
118
+ ID ||= "ID".freeze
119
+ IR ||= "IR".freeze
120
+ IQ ||= "IQ".freeze
121
+ IE ||= "IE".freeze
122
+ IM ||= "IM".freeze
123
+ IL ||= "IL".freeze
124
+ IT ||= "IT".freeze
125
+ JM ||= "JM".freeze
126
+ JP ||= "JP".freeze
127
+ JE ||= "JE".freeze
128
+ JO ||= "JO".freeze
129
+ KZ ||= "KZ".freeze
130
+ KE ||= "KE".freeze
131
+ KI ||= "KI".freeze
132
+ KP ||= "KP".freeze
133
+ KR ||= "KR".freeze
134
+ KW ||= "KW".freeze
135
+ KG ||= "KG".freeze
136
+ LA ||= "LA".freeze
137
+ LV ||= "LV".freeze
138
+ LB ||= "LB".freeze
139
+ LS ||= "LS".freeze
140
+ LR ||= "LR".freeze
141
+ LY ||= "LY".freeze
142
+ LI ||= "LI".freeze
143
+ LT ||= "LT".freeze
144
+ LU ||= "LU".freeze
145
+ MO ||= "MO".freeze
146
+ MK ||= "MK".freeze
147
+ MG ||= "MG".freeze
148
+ MW ||= "MW".freeze
149
+ MY ||= "MY".freeze
150
+ MV ||= "MV".freeze
151
+ ML ||= "ML".freeze
152
+ MT ||= "MT".freeze
153
+ MH ||= "MH".freeze
154
+ MQ ||= "MQ".freeze
155
+ MR ||= "MR".freeze
156
+ MU ||= "MU".freeze
157
+ YT ||= "YT".freeze
158
+ MX ||= "MX".freeze
159
+ FM ||= "FM".freeze
160
+ MD ||= "MD".freeze
161
+ MC ||= "MC".freeze
162
+ MN ||= "MN".freeze
163
+ ME ||= "ME".freeze
164
+ MS ||= "MS".freeze
165
+ MA ||= "MA".freeze
166
+ MZ ||= "MZ".freeze
167
+ MM ||= "MM".freeze
168
+ NA ||= "NA".freeze
169
+ NR ||= "NR".freeze
170
+ NP ||= "NP".freeze
171
+ NL ||= "NL".freeze
172
+ AN ||= "AN".freeze
173
+ NC ||= "NC".freeze
174
+ NZ ||= "NZ".freeze
175
+ NI ||= "NI".freeze
176
+ NE ||= "NE".freeze
177
+ NG ||= "NG".freeze
178
+ NU ||= "NU".freeze
179
+ NF ||= "NF".freeze
180
+ MP ||= "MP".freeze
181
+ NO ||= "NO".freeze
182
+ OM ||= "OM".freeze
183
+ PK ||= "PK".freeze
184
+ PW ||= "PW".freeze
185
+ PS ||= "PS".freeze
186
+ PA ||= "PA".freeze
187
+ PG ||= "PG".freeze
188
+ PY ||= "PY".freeze
189
+ PE ||= "PE".freeze
190
+ PH ||= "PH".freeze
191
+ PN ||= "PN".freeze
192
+ PL ||= "PL".freeze
193
+ PT ||= "PT".freeze
194
+ PR ||= "PR".freeze
195
+ QA ||= "QA".freeze
196
+ RE ||= "RE".freeze
197
+ RO ||= "RO".freeze
198
+ RU ||= "RU".freeze
199
+ RW ||= "RW".freeze
200
+ BL ||= "BL".freeze
201
+ SH ||= "SH".freeze
202
+ KN ||= "KN".freeze
203
+ LC ||= "LC".freeze
204
+ MF ||= "MF".freeze
205
+ PM ||= "PM".freeze
206
+ VC ||= "VC".freeze
207
+ WS ||= "WS".freeze
208
+ SM ||= "SM".freeze
209
+ ST ||= "ST".freeze
210
+ SA ||= "SA".freeze
211
+ SN ||= "SN".freeze
212
+ RS ||= "RS".freeze
213
+ SC ||= "SC".freeze
214
+ SL ||= "SL".freeze
215
+ SG ||= "SG".freeze
216
+ SK ||= "SK".freeze
217
+ SI ||= "SI".freeze
218
+ SB ||= "SB".freeze
219
+ SO ||= "SO".freeze
220
+ ZA ||= "ZA".freeze
221
+ GS ||= "GS".freeze
222
+ ES ||= "ES".freeze
223
+ LK ||= "LK".freeze
224
+ SD ||= "SD".freeze
225
+ SR ||= "SR".freeze
226
+ SJ ||= "SJ".freeze
227
+ SZ ||= "SZ".freeze
228
+ SE ||= "SE".freeze
229
+ CH ||= "CH".freeze
230
+ SY ||= "SY".freeze
231
+ TW ||= "TW".freeze
232
+ TJ ||= "TJ".freeze
233
+ TZ ||= "TZ".freeze
234
+ TH ||= "TH".freeze
235
+ TL ||= "TL".freeze
236
+ TG ||= "TG".freeze
237
+ TK ||= "TK".freeze
238
+ TO ||= "TO".freeze
239
+ TT ||= "TT".freeze
240
+ TN ||= "TN".freeze
241
+ TR ||= "TR".freeze
242
+ TM ||= "TM".freeze
243
+ TC ||= "TC".freeze
244
+ TV ||= "TV".freeze
245
+ UG ||= "UG".freeze
246
+ UA ||= "UA".freeze
247
+ AE ||= "AE".freeze
248
+ GB ||= "GB".freeze
249
+ US ||= "US".freeze
250
+ UM ||= "UM".freeze
251
+ UY ||= "UY".freeze
252
+ UZ ||= "UZ".freeze
253
+ VU ||= "VU".freeze
254
+ VE ||= "VE".freeze
255
+ VN ||= "VN".freeze
256
+ VG ||= "VG".freeze
257
+ VI ||= "VI".freeze
258
+ WF ||= "WF".freeze
259
+ EH ||= "EH".freeze
260
+ YE ||= "YE".freeze
261
+ ZM ||= "ZM".freeze
262
+ ZW ||= "ZW".freeze
263
+ BQ ||= "BQ".freeze
264
+ CW ||= "CW".freeze
265
+ SX ||= "SX".freeze
266
+ SS ||= "SS".freeze
267
+
268
+ # Builds the enum from string
269
+ # @param [String] The enum value in the form of the string
270
+ # @return [String] The enum value
271
+ def self.build_from_hash(value)
272
+ new.build_from_hash(value)
273
+ end
274
+
275
+ # Builds the enum from string
276
+ # @param [String] The enum value in the form of the string
277
+ # @return [String] The enum value
278
+ def build_from_hash(value)
279
+ constantValues = CountryOfResidence.constants.select { |c| CountryOfResidence::const_get(c) == value }
280
+ raise "Invalid ENUM value #{value} for class #CountryOfResidence" if constantValues.empty?
281
+ value
282
+ end
283
+ end
284
+ end
@@ -34,6 +34,12 @@ module XeroRuby::PayrollAu
34
34
  # Boolean to determine if the earnings rate is reportable or exempt from W1
35
35
  attr_accessor :is_reportable_as_w1
36
36
 
37
+ # Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT
38
+ attr_accessor :allowance_contributes_to_annual_leave_rate
39
+
40
+ # Boolean to determine if the allowance earnings rate contributes towards overtime allowance rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT
41
+ attr_accessor :allowance_contributes_to_overtime_rate
42
+
37
43
 
38
44
  attr_accessor :earnings_type
39
45
 
@@ -79,6 +85,8 @@ module XeroRuby::PayrollAu
79
85
  :'is_exempt_from_tax' => :'IsExemptFromTax',
80
86
  :'is_exempt_from_super' => :'IsExemptFromSuper',
81
87
  :'is_reportable_as_w1' => :'IsReportableAsW1',
88
+ :'allowance_contributes_to_annual_leave_rate' => :'AllowanceContributesToAnnualLeaveRate',
89
+ :'allowance_contributes_to_overtime_rate' => :'AllowanceContributesToOvertimeRate',
82
90
  :'earnings_type' => :'EarningsType',
83
91
  :'earnings_rate_id' => :'EarningsRateID',
84
92
  :'rate_type' => :'RateType',
@@ -103,6 +111,8 @@ module XeroRuby::PayrollAu
103
111
  :'is_exempt_from_tax' => :'Boolean',
104
112
  :'is_exempt_from_super' => :'Boolean',
105
113
  :'is_reportable_as_w1' => :'Boolean',
114
+ :'allowance_contributes_to_annual_leave_rate' => :'Boolean',
115
+ :'allowance_contributes_to_overtime_rate' => :'Boolean',
106
116
  :'earnings_type' => :'EarningsType',
107
117
  :'earnings_rate_id' => :'String',
108
118
  :'rate_type' => :'RateType',
@@ -157,6 +167,14 @@ module XeroRuby::PayrollAu
157
167
  self.is_reportable_as_w1 = attributes[:'is_reportable_as_w1']
158
168
  end
159
169
 
170
+ if attributes.key?(:'allowance_contributes_to_annual_leave_rate')
171
+ self.allowance_contributes_to_annual_leave_rate = attributes[:'allowance_contributes_to_annual_leave_rate']
172
+ end
173
+
174
+ if attributes.key?(:'allowance_contributes_to_overtime_rate')
175
+ self.allowance_contributes_to_overtime_rate = attributes[:'allowance_contributes_to_overtime_rate']
176
+ end
177
+
160
178
  if attributes.key?(:'earnings_type')
161
179
  self.earnings_type = attributes[:'earnings_type']
162
180
  end
@@ -260,6 +278,8 @@ module XeroRuby::PayrollAu
260
278
  is_exempt_from_tax == o.is_exempt_from_tax &&
261
279
  is_exempt_from_super == o.is_exempt_from_super &&
262
280
  is_reportable_as_w1 == o.is_reportable_as_w1 &&
281
+ allowance_contributes_to_annual_leave_rate == o.allowance_contributes_to_annual_leave_rate &&
282
+ allowance_contributes_to_overtime_rate == o.allowance_contributes_to_overtime_rate &&
263
283
  earnings_type == o.earnings_type &&
264
284
  earnings_rate_id == o.earnings_rate_id &&
265
285
  rate_type == o.rate_type &&
@@ -283,7 +303,7 @@ module XeroRuby::PayrollAu
283
303
  # Calculates hash code according to all attributes.
284
304
  # @return [Integer] Hash code
285
305
  def hash
286
- [name, account_code, type_of_units, is_exempt_from_tax, is_exempt_from_super, is_reportable_as_w1, earnings_type, earnings_rate_id, rate_type, rate_per_unit, multiplier, accrue_leave, amount, employment_termination_payment_type, updated_date_utc, current_record, allowance_type, allowance_category].hash
306
+ [name, account_code, type_of_units, is_exempt_from_tax, is_exempt_from_super, is_reportable_as_w1, allowance_contributes_to_annual_leave_rate, allowance_contributes_to_overtime_rate, earnings_type, earnings_rate_id, rate_type, rate_per_unit, multiplier, accrue_leave, amount, employment_termination_payment_type, updated_date_utc, current_record, allowance_type, allowance_category].hash
287
307
  end
288
308
 
289
309
  # Builds the object from hash
@@ -26,6 +26,8 @@ module XeroRuby::PayrollAu
26
26
  LUMPSUME ||= "LUMPSUME".freeze
27
27
  LUMPSUMW ||= "LUMPSUMW".freeze
28
28
  DIRECTORSFEES ||= "DIRECTORSFEES".freeze
29
+ PAIDPARENTALLEAVE ||= "PAIDPARENTALLEAVE".freeze
30
+ WORKERSCOMPENSATION ||= "WORKERSCOMPENSATION".freeze
29
31
 
30
32
  # Builds the enum from string
31
33
  # @param [String] The enum value in the form of the string
@@ -40,7 +40,7 @@ module XeroRuby::PayrollAu
40
40
  # The email address for the employee
41
41
  attr_accessor :email
42
42
 
43
- # The employee’s gender. See Employee Gender
43
+ # The employee’s gender. See Employee Gender
44
44
  attr_accessor :gender
45
45
  N ||= "N".freeze
46
46
  M ||= "M".freeze
@@ -106,6 +106,18 @@ module XeroRuby::PayrollAu
106
106
  attr_accessor :tax_declaration
107
107
 
108
108
 
109
+ attr_accessor :income_type
110
+
111
+
112
+ attr_accessor :employment_type
113
+
114
+
115
+ attr_accessor :country_of_residence
116
+
117
+ # Indicates if the employee has been updated for STP Phase 2 compliance. Doesn't indicate that the employee is payable.
118
+ attr_accessor :is_stp2_qualified
119
+
120
+
109
121
  attr_accessor :leave_balances
110
122
 
111
123
 
@@ -174,6 +186,10 @@ module XeroRuby::PayrollAu
174
186
  :'pay_template' => :'PayTemplate',
175
187
  :'opening_balances' => :'OpeningBalances',
176
188
  :'tax_declaration' => :'TaxDeclaration',
189
+ :'income_type' => :'IncomeType',
190
+ :'employment_type' => :'EmploymentType',
191
+ :'country_of_residence' => :'CountryOfResidence',
192
+ :'is_stp2_qualified' => :'IsSTP2Qualified',
177
193
  :'leave_balances' => :'LeaveBalances',
178
194
  :'leave_lines' => :'LeaveLines',
179
195
  :'super_memberships' => :'SuperMemberships',
@@ -212,6 +228,10 @@ module XeroRuby::PayrollAu
212
228
  :'pay_template' => :'PayTemplate',
213
229
  :'opening_balances' => :'OpeningBalances',
214
230
  :'tax_declaration' => :'TaxDeclaration',
231
+ :'income_type' => :'IncomeType',
232
+ :'employment_type' => :'EmploymentType',
233
+ :'country_of_residence' => :'CountryOfResidence',
234
+ :'is_stp2_qualified' => :'Boolean',
215
235
  :'leave_balances' => :'Array<LeaveBalance>',
216
236
  :'leave_lines' => :'Array<LeaveLine>',
217
237
  :'super_memberships' => :'Array<SuperMembership>',
@@ -342,6 +362,22 @@ module XeroRuby::PayrollAu
342
362
  self.tax_declaration = attributes[:'tax_declaration']
343
363
  end
344
364
 
365
+ if attributes.key?(:'income_type')
366
+ self.income_type = attributes[:'income_type']
367
+ end
368
+
369
+ if attributes.key?(:'employment_type')
370
+ self.employment_type = attributes[:'employment_type']
371
+ end
372
+
373
+ if attributes.key?(:'country_of_residence')
374
+ self.country_of_residence = attributes[:'country_of_residence']
375
+ end
376
+
377
+ if attributes.key?(:'is_stp2_qualified')
378
+ self.is_stp2_qualified = attributes[:'is_stp2_qualified']
379
+ end
380
+
345
381
  if attributes.key?(:'leave_balances')
346
382
  if (value = attributes[:'leave_balances']).is_a?(Array)
347
383
  self.leave_balances = value
@@ -458,6 +494,10 @@ module XeroRuby::PayrollAu
458
494
  pay_template == o.pay_template &&
459
495
  opening_balances == o.opening_balances &&
460
496
  tax_declaration == o.tax_declaration &&
497
+ income_type == o.income_type &&
498
+ employment_type == o.employment_type &&
499
+ country_of_residence == o.country_of_residence &&
500
+ is_stp2_qualified == o.is_stp2_qualified &&
461
501
  leave_balances == o.leave_balances &&
462
502
  leave_lines == o.leave_lines &&
463
503
  super_memberships == o.super_memberships &&
@@ -475,7 +515,7 @@ module XeroRuby::PayrollAu
475
515
  # Calculates hash code according to all attributes.
476
516
  # @return [Integer] Hash code
477
517
  def hash
478
- [first_name, last_name, date_of_birth, home_address, start_date, title, middle_names, email, gender, phone, mobile, twitter_user_name, is_authorised_to_approve_leave, is_authorised_to_approve_timesheets, job_title, classification, ordinary_earnings_rate_id, payroll_calendar_id, employee_group_name, employee_id, termination_date, termination_reason, bank_accounts, pay_template, opening_balances, tax_declaration, leave_balances, leave_lines, super_memberships, status, updated_date_utc, validation_errors].hash
518
+ [first_name, last_name, date_of_birth, home_address, start_date, title, middle_names, email, gender, phone, mobile, twitter_user_name, is_authorised_to_approve_leave, is_authorised_to_approve_timesheets, job_title, classification, ordinary_earnings_rate_id, payroll_calendar_id, employee_group_name, employee_id, termination_date, termination_reason, bank_accounts, pay_template, opening_balances, tax_declaration, income_type, employment_type, country_of_residence, is_stp2_qualified, leave_balances, leave_lines, super_memberships, status, updated_date_utc, validation_errors].hash
479
519
  end
480
520
 
481
521
  # Builds the object from hash
@@ -19,6 +19,7 @@ module XeroRuby::PayrollAu
19
19
  CASUAL ||= "CASUAL".freeze
20
20
  LABOURHIRE ||= "LABOURHIRE".freeze
21
21
  SUPERINCOMESTREAM ||= "SUPERINCOMESTREAM".freeze
22
+ NONEMPLOYEE ||= "NONEMPLOYEE".freeze
22
23
 
23
24
  # Builds the enum from string
24
25
  # @param [String] The enum value in the form of the string
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Xero Payroll AU API
3
+
4
+ #This is the Xero Payroll API for orgs in Australia 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::PayrollAu
16
+ class EmploymentType
17
+ EMPLOYEE ||= "EMPLOYEE".freeze
18
+ CONTRACTOR ||= "CONTRACTOR".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = EmploymentType.constants.select { |c| EmploymentType::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #EmploymentType" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,39 @@
1
+ =begin
2
+ #Xero Payroll AU API
3
+
4
+ #This is the Xero Payroll API for orgs in Australia 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::PayrollAu
16
+ class IncomeType
17
+ SALARYANDWAGES ||= "SALARYANDWAGES".freeze
18
+ WORKINGHOLIDAYMAKER ||= "WORKINGHOLIDAYMAKER".freeze
19
+ NONEMPLOYEE ||= "NONEMPLOYEE".freeze
20
+ CLOSELYHELDPAYEES ||= "CLOSELYHELDPAYEES".freeze
21
+ LABOURHIRE ||= "LABOURHIRE".freeze
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def self.build_from_hash(value)
27
+ new.build_from_hash(value)
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ constantValues = IncomeType.constants.select { |c| IncomeType::const_get(c) == value }
35
+ raise "Invalid ENUM value #{value} for class #IncomeType" if constantValues.empty?
36
+ value
37
+ end
38
+ end
39
+ end
@@ -38,6 +38,9 @@ module XeroRuby::PayrollAu
38
38
  attr_accessor :description
39
39
 
40
40
 
41
+ attr_accessor :pay_out_type
42
+
43
+
41
44
  attr_accessor :leave_periods
42
45
 
43
46
  # Last modified timestamp
@@ -56,6 +59,7 @@ module XeroRuby::PayrollAu
56
59
  :'start_date' => :'StartDate',
57
60
  :'end_date' => :'EndDate',
58
61
  :'description' => :'Description',
62
+ :'pay_out_type' => :'PayOutType',
59
63
  :'leave_periods' => :'LeavePeriods',
60
64
  :'updated_date_utc' => :'UpdatedDateUTC',
61
65
  :'validation_errors' => :'ValidationErrors'
@@ -72,6 +76,7 @@ module XeroRuby::PayrollAu
72
76
  :'start_date' => :'Date',
73
77
  :'end_date' => :'Date',
74
78
  :'description' => :'String',
79
+ :'pay_out_type' => :'PayOutType',
75
80
  :'leave_periods' => :'Array<LeavePeriod>',
76
81
  :'updated_date_utc' => :'DateTime',
77
82
  :'validation_errors' => :'Array<ValidationError>'
@@ -121,6 +126,10 @@ module XeroRuby::PayrollAu
121
126
  self.description = attributes[:'description']
122
127
  end
123
128
 
129
+ if attributes.key?(:'pay_out_type')
130
+ self.pay_out_type = attributes[:'pay_out_type']
131
+ end
132
+
124
133
  if attributes.key?(:'leave_periods')
125
134
  if (value = attributes[:'leave_periods']).is_a?(Array)
126
135
  self.leave_periods = value
@@ -163,6 +172,7 @@ module XeroRuby::PayrollAu
163
172
  start_date == o.start_date &&
164
173
  end_date == o.end_date &&
165
174
  description == o.description &&
175
+ pay_out_type == o.pay_out_type &&
166
176
  leave_periods == o.leave_periods &&
167
177
  updated_date_utc == o.updated_date_utc &&
168
178
  validation_errors == o.validation_errors
@@ -177,7 +187,7 @@ module XeroRuby::PayrollAu
177
187
  # Calculates hash code according to all attributes.
178
188
  # @return [Integer] Hash code
179
189
  def hash
180
- [leave_application_id, employee_id, leave_type_id, title, start_date, end_date, description, leave_periods, updated_date_utc, validation_errors].hash
190
+ [leave_application_id, employee_id, leave_type_id, title, start_date, end_date, description, pay_out_type, leave_periods, updated_date_utc, validation_errors].hash
181
191
  end
182
192
 
183
193
  # Builds the object from hash
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Xero Payroll AU API
3
+
4
+ #This is the Xero Payroll API for orgs in Australia 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::PayrollAu
16
+ class LeaveCategoryCode
17
+ ANNUALLEAVE ||= "ANNUALLEAVE".freeze
18
+ LONGSERVICELEAVE ||= "LONGSERVICELEAVE".freeze
19
+ PERSONALSICKCARERSLEAVE ||= "PERSONALSICKCARERSLEAVE".freeze
20
+ ROSTEREDDAYOFF ||= "ROSTEREDDAYOFF".freeze
21
+ TIMEOFFINLIEU ||= "TIMEOFFINLIEU".freeze
22
+ COMPASSIONATEANDBEREAVEMENTLEAVE ||= "COMPASSIONATEANDBEREAVEMENTLEAVE".freeze
23
+ STUDYLEAVE ||= "STUDYLEAVE".freeze
24
+ FAMILYANDDOMESTICVIOLENCELEAVE ||= "FAMILYANDDOMESTICVIOLENCELEAVE".freeze
25
+ SPECIALPAIDLEAVE ||= "SPECIALPAIDLEAVE".freeze
26
+ COMMUNITYSERVICELEAVE ||= "COMMUNITYSERVICELEAVE".freeze
27
+ JURYDUTYLEAVE ||= "JURYDUTYLEAVE".freeze
28
+ DEFENCERESERVELEAVE ||= "DEFENCERESERVELEAVE".freeze
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def self.build_from_hash(value)
34
+ new.build_from_hash(value)
35
+ end
36
+
37
+ # Builds the enum from string
38
+ # @param [String] The enum value in the form of the string
39
+ # @return [String] The enum value
40
+ def build_from_hash(value)
41
+ constantValues = LeaveCategoryCode.constants.select { |c| LeaveCategoryCode::const_get(c) == value }
42
+ raise "Invalid ENUM value #{value} for class #LeaveCategoryCode" if constantValues.empty?
43
+ value
44
+ end
45
+ end
46
+ end
@@ -25,12 +25,16 @@ module XeroRuby::PayrollAu
25
25
  # Earnings rate number of units.
26
26
  attr_accessor :number_of_units
27
27
 
28
+
29
+ attr_accessor :pay_out_type
30
+
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
31
34
  :'earnings_rate_id' => :'EarningsRateID',
32
35
  :'rate_per_unit' => :'RatePerUnit',
33
- :'number_of_units' => :'NumberOfUnits'
36
+ :'number_of_units' => :'NumberOfUnits',
37
+ :'pay_out_type' => :'PayOutType'
34
38
  }
35
39
  end
36
40
 
@@ -39,7 +43,8 @@ module XeroRuby::PayrollAu
39
43
  {
40
44
  :'earnings_rate_id' => :'String',
41
45
  :'rate_per_unit' => :'BigDecimal',
42
- :'number_of_units' => :'BigDecimal'
46
+ :'number_of_units' => :'BigDecimal',
47
+ :'pay_out_type' => :'PayOutType'
43
48
  }
44
49
  end
45
50
 
@@ -69,6 +74,10 @@ module XeroRuby::PayrollAu
69
74
  if attributes.key?(:'number_of_units')
70
75
  self.number_of_units = attributes[:'number_of_units']
71
76
  end
77
+
78
+ if attributes.key?(:'pay_out_type')
79
+ self.pay_out_type = attributes[:'pay_out_type']
80
+ end
72
81
  end
73
82
 
74
83
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -91,7 +100,8 @@ module XeroRuby::PayrollAu
91
100
  self.class == o.class &&
92
101
  earnings_rate_id == o.earnings_rate_id &&
93
102
  rate_per_unit == o.rate_per_unit &&
94
- number_of_units == o.number_of_units
103
+ number_of_units == o.number_of_units &&
104
+ pay_out_type == o.pay_out_type
95
105
  end
96
106
 
97
107
  # @see the `==` method
@@ -103,7 +113,7 @@ module XeroRuby::PayrollAu
103
113
  # Calculates hash code according to all attributes.
104
114
  # @return [Integer] Hash code
105
115
  def hash
106
- [earnings_rate_id, rate_per_unit, number_of_units].hash
116
+ [earnings_rate_id, rate_per_unit, number_of_units, pay_out_type].hash
107
117
  end
108
118
 
109
119
  # Builds the object from hash