xero-ruby 3.16.0 → 10.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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xero-ruby/api/accounting_api.rb +645 -3
  3. data/lib/xero-ruby/api/app_store_api.rb +6 -0
  4. data/lib/xero-ruby/api/asset_api.rb +16 -6
  5. data/lib/xero-ruby/api/files_api.rb +156 -20
  6. data/lib/xero-ruby/api/payroll_au_api.rb +326 -30
  7. data/lib/xero-ruby/api/payroll_nz_api.rb +417 -7
  8. data/lib/xero-ruby/api/payroll_uk_api.rb +81 -0
  9. data/lib/xero-ruby/api/project_api.rb +21 -0
  10. data/lib/xero-ruby/api_client.rb +7 -7
  11. data/lib/xero-ruby/models/accounting/account_type.rb +0 -4
  12. data/lib/xero-ruby/models/accounting/allocation.rb +21 -1
  13. data/lib/xero-ruby/models/accounting/bank_transactions.rb +23 -1
  14. data/lib/xero-ruby/models/accounting/contact.rb +1 -11
  15. data/lib/xero-ruby/models/accounting/contacts.rb +23 -1
  16. data/lib/xero-ruby/models/accounting/credit_note.rb +17 -5
  17. data/lib/xero-ruby/models/accounting/credit_notes.rb +23 -1
  18. data/lib/xero-ruby/models/accounting/currency_code.rb +10 -8
  19. data/lib/xero-ruby/models/accounting/invoice.rb +16 -4
  20. data/lib/xero-ruby/models/accounting/invoice_address.rb +338 -0
  21. data/lib/xero-ruby/models/accounting/invoices.rb +23 -1
  22. data/lib/xero-ruby/models/accounting/journals.rb +13 -1
  23. data/lib/xero-ruby/models/accounting/line_item.rb +75 -4
  24. data/lib/xero-ruby/models/accounting/manual_journals.rb +23 -1
  25. data/lib/xero-ruby/models/accounting/organisation.rb +9 -2
  26. data/lib/xero-ruby/models/accounting/overpayments.rb +23 -1
  27. data/lib/xero-ruby/models/accounting/pagination.rb +252 -0
  28. data/lib/xero-ruby/models/accounting/payment.rb +16 -4
  29. data/lib/xero-ruby/models/accounting/payments.rb +23 -1
  30. data/lib/xero-ruby/models/accounting/prepayments.rb +23 -1
  31. data/lib/xero-ruby/models/accounting/purchase_orders.rb +23 -1
  32. data/lib/xero-ruby/models/accounting/tax_breakdown_component.rb +351 -0
  33. data/lib/xero-ruby/models/accounting/tax_rate.rb +13 -6
  34. data/lib/xero-ruby/models/accounting/tax_type.rb +45 -4
  35. data/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb +75 -4
  36. data/lib/xero-ruby/models/files/association.rb +31 -1
  37. data/lib/xero-ruby/models/finance/current_statement_response.rb +1 -1
  38. data/lib/xero-ruby/models/finance/data_source_response.rb +13 -43
  39. data/lib/xero-ruby/models/finance/problem_type.rb +1 -0
  40. data/lib/xero-ruby/models/finance/statement_line_response.rb +11 -1
  41. data/lib/xero-ruby/models/finance/statement_response.rb +24 -4
  42. data/lib/xero-ruby/models/payroll_au/allowance_type.rb +0 -1
  43. data/lib/xero-ruby/models/payroll_au/country_of_residence.rb +0 -1
  44. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +21 -1
  45. data/lib/xero-ruby/models/payroll_au/leave_application.rb +11 -1
  46. data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +14 -4
  47. data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +0 -1
  48. data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +2 -0
  49. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +16 -4
  50. data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -0
  51. data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -0
  52. data/lib/xero-ruby/models/payroll_nz/employee.rb +34 -4
  53. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +56 -6
  54. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +47 -7
  55. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern.rb +242 -0
  56. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks.rb +254 -0
  57. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_object.rb +242 -0
  58. data/lib/xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_request.rb +244 -0
  59. data/lib/xero-ruby/models/payroll_nz/employee_working_patterns_object.rb +244 -0
  60. data/lib/xero-ruby/models/payroll_nz/employment.rb +24 -4
  61. data/lib/xero-ruby/models/payroll_nz/leave_period.rb +35 -4
  62. data/lib/xero-ruby/models/payroll_nz/leave_type.rb +24 -4
  63. data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +28 -4
  64. data/lib/xero-ruby/models/payroll_nz/working_week.rb +317 -0
  65. data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +3 -3
  66. data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +14 -4
  67. data/lib/xero-ruby/models/projects/currency_code.rb +0 -1
  68. data/lib/xero-ruby/version.rb +2 -2
  69. data/lib/xero-ruby/where.rb +37 -37
  70. data/lib/xero-ruby.rb +11 -0
  71. data/spec/api_client_spec.rb +56 -56
  72. data/spec/api_error_spec.rb +1 -1
  73. data/spec/configuration_spec.rb +2 -2
  74. data/spec/helper_methods_spec.rb +3 -3
  75. data/spec/where_spec.rb +2 -2
  76. metadata +38 -27
@@ -0,0 +1,317 @@
1
+ =begin
2
+ #Xero Payroll NZ
3
+
4
+ #This is the Xero Payroll API for orgs in the NZ 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::PayrollNz
16
+ require 'bigdecimal'
17
+
18
+ class WorkingWeek
19
+ # The number of hours worked on a Monday
20
+ attr_accessor :monday
21
+
22
+ # The number of hours worked on a Tuesday
23
+ attr_accessor :tuesday
24
+
25
+ # The number of hours worked on a Wednesday
26
+ attr_accessor :wednesday
27
+
28
+ # The number of hours worked on a Thursday
29
+ attr_accessor :thursday
30
+
31
+ # The number of hours worked on a Friday
32
+ attr_accessor :friday
33
+
34
+ # The number of hours worked on a Saturday
35
+ attr_accessor :saturday
36
+
37
+ # The number of hours worked on a Sunday
38
+ attr_accessor :sunday
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'monday' => :'monday',
44
+ :'tuesday' => :'tuesday',
45
+ :'wednesday' => :'wednesday',
46
+ :'thursday' => :'thursday',
47
+ :'friday' => :'friday',
48
+ :'saturday' => :'saturday',
49
+ :'sunday' => :'sunday'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'monday' => :'BigDecimal',
57
+ :'tuesday' => :'BigDecimal',
58
+ :'wednesday' => :'BigDecimal',
59
+ :'thursday' => :'BigDecimal',
60
+ :'friday' => :'BigDecimal',
61
+ :'saturday' => :'BigDecimal',
62
+ :'sunday' => :'BigDecimal'
63
+ }
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::PayrollNz::WorkingWeek` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::PayrollNz::WorkingWeek`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'monday')
82
+ self.monday = attributes[:'monday']
83
+ end
84
+
85
+ if attributes.key?(:'tuesday')
86
+ self.tuesday = attributes[:'tuesday']
87
+ end
88
+
89
+ if attributes.key?(:'wednesday')
90
+ self.wednesday = attributes[:'wednesday']
91
+ end
92
+
93
+ if attributes.key?(:'thursday')
94
+ self.thursday = attributes[:'thursday']
95
+ end
96
+
97
+ if attributes.key?(:'friday')
98
+ self.friday = attributes[:'friday']
99
+ end
100
+
101
+ if attributes.key?(:'saturday')
102
+ self.saturday = attributes[:'saturday']
103
+ end
104
+
105
+ if attributes.key?(:'sunday')
106
+ self.sunday = attributes[:'sunday']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = Array.new
114
+ if @monday.nil?
115
+ invalid_properties.push('invalid value for "monday", monday cannot be nil.')
116
+ end
117
+
118
+ if @tuesday.nil?
119
+ invalid_properties.push('invalid value for "tuesday", tuesday cannot be nil.')
120
+ end
121
+
122
+ if @wednesday.nil?
123
+ invalid_properties.push('invalid value for "wednesday", wednesday cannot be nil.')
124
+ end
125
+
126
+ if @thursday.nil?
127
+ invalid_properties.push('invalid value for "thursday", thursday cannot be nil.')
128
+ end
129
+
130
+ if @friday.nil?
131
+ invalid_properties.push('invalid value for "friday", friday cannot be nil.')
132
+ end
133
+
134
+ if @saturday.nil?
135
+ invalid_properties.push('invalid value for "saturday", saturday cannot be nil.')
136
+ end
137
+
138
+ if @sunday.nil?
139
+ invalid_properties.push('invalid value for "sunday", sunday cannot be nil.')
140
+ end
141
+
142
+ invalid_properties
143
+ end
144
+
145
+ # Check to see if the all the properties in the model are valid
146
+ # @return true if the model is valid
147
+ def valid?
148
+ return false if @monday.nil?
149
+ return false if @tuesday.nil?
150
+ return false if @wednesday.nil?
151
+ return false if @thursday.nil?
152
+ return false if @friday.nil?
153
+ return false if @saturday.nil?
154
+ return false if @sunday.nil?
155
+ true
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ monday == o.monday &&
164
+ tuesday == o.tuesday &&
165
+ wednesday == o.wednesday &&
166
+ thursday == o.thursday &&
167
+ friday == o.friday &&
168
+ saturday == o.saturday &&
169
+ sunday == o.sunday
170
+ end
171
+
172
+ # @see the `==` method
173
+ # @param [Object] Object to be compared
174
+ def eql?(o)
175
+ self == o
176
+ end
177
+
178
+ # Calculates hash code according to all attributes.
179
+ # @return [Integer] Hash code
180
+ def hash
181
+ [monday, tuesday, wednesday, thursday, friday, saturday, sunday].hash
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def self.build_from_hash(attributes)
188
+ new.build_from_hash(attributes)
189
+ end
190
+
191
+ # Builds the object from hash
192
+ # @param [Hash] attributes Model attributes in the form of hash
193
+ # @return [Object] Returns the model itself
194
+ def build_from_hash(attributes)
195
+ return nil unless attributes.is_a?(Hash)
196
+ self.class.openapi_types.each_pair do |key, type|
197
+ if type =~ /\AArray<(.*)>/i
198
+ # check to ensure the input is an array given that the attribute
199
+ # is documented as an array but the input is not
200
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
201
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
202
+ end
203
+ elsif !attributes[self.class.attribute_map[key]].nil?
204
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
205
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
206
+ end
207
+
208
+ self
209
+ end
210
+
211
+ # Deserializes the data based on type
212
+ # @param string type Data type
213
+ # @param string value Value to be deserialized
214
+ # @return [Object] Deserialized data
215
+ def _deserialize(type, value)
216
+ case type.to_sym
217
+ when :DateTime
218
+ DateTime.parse(parse_date(value))
219
+ when :Date
220
+ Date.parse(parse_date(value))
221
+ when :String
222
+ value.to_s
223
+ when :Integer
224
+ value.to_i
225
+ when :Float
226
+ value.to_f
227
+ when :BigDecimal
228
+ BigDecimal(value.to_s)
229
+ when :Boolean
230
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
231
+ true
232
+ else
233
+ false
234
+ end
235
+ when :Object
236
+ # generic object (usually a Hash), return directly
237
+ value
238
+ when /\AArray<(?<inner_type>.+)>\z/
239
+ inner_type = Regexp.last_match[:inner_type]
240
+ value.map { |v| _deserialize(inner_type, v) }
241
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
242
+ k_type = Regexp.last_match[:k_type]
243
+ v_type = Regexp.last_match[:v_type]
244
+ {}.tap do |hash|
245
+ value.each do |k, v|
246
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
247
+ end
248
+ end
249
+ else # model
250
+ XeroRuby::PayrollNz.const_get(type).build_from_hash(value)
251
+ end
252
+ end
253
+
254
+ # Returns the string representation of the object
255
+ # @return [String] String presentation of the object
256
+ def to_s
257
+ to_hash.to_s
258
+ end
259
+
260
+ # to_body is an alias to to_hash (backward compatibility)
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_body
263
+ to_hash
264
+ end
265
+
266
+ # Returns the object in the form of hash
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_hash(downcase: false)
269
+ hash = {}
270
+ self.class.attribute_map.each_pair do |attr, param|
271
+ value = self.send(attr)
272
+ next if value.nil?
273
+ key = downcase ? attr : param
274
+ hash[key] = _to_hash(value, downcase: downcase)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Returns the object in the form of hash with snake_case
280
+ def to_attributes
281
+ to_hash(downcase: true)
282
+ end
283
+
284
+ # Outputs non-array value in the form of hash
285
+ # For object, use to_hash. Otherwise, just return the value
286
+ # @param [Object] value Any valid value
287
+ # @return [Hash] Returns the value in the form of hash
288
+ def _to_hash(value, downcase: false)
289
+ if value.is_a?(Array)
290
+ value.map do |v|
291
+ v.to_hash(downcase: downcase)
292
+ end
293
+ elsif value.is_a?(Hash)
294
+ {}.tap do |hash|
295
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
296
+ end
297
+ elsif value.respond_to? :to_hash
298
+ value.to_hash(downcase: downcase)
299
+ else
300
+ value
301
+ end
302
+ end
303
+
304
+ def parse_date(datestring)
305
+ if datestring.include?('Date')
306
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
307
+ original, date, timezone = *date_pattern.match(datestring)
308
+ date = (date.to_i / 1000)
309
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
310
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
311
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
312
+ else # handle date 'types' for small subset of payroll API's
313
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
314
+ end
315
+ end
316
+ end
317
+ end
@@ -25,7 +25,7 @@ module XeroRuby::PayrollUk
25
25
  # Indicates how an employee will be paid when taking this type of earning
26
26
  attr_accessor :earnings_type
27
27
  ALLOWANCE ||= "Allowance".freeze
28
- BACKPAY ||= "Backpay".freeze
28
+ BACK_PAY ||= "BackPay".freeze
29
29
  BONUS ||= "Bonus".freeze
30
30
  COMMISSION ||= "Commission".freeze
31
31
  LUMP_SUM ||= "LumpSum".freeze
@@ -214,7 +214,7 @@ module XeroRuby::PayrollUk
214
214
  def valid?
215
215
  return false if @name.nil?
216
216
  return false if @earnings_type.nil?
217
- earnings_type_validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay"])
217
+ earnings_type_validator = EnumAttributeValidator.new('String', ["Allowance", "BackPay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay"])
218
218
  return false unless earnings_type_validator.valid?(@earnings_type)
219
219
  return false if @rate_type.nil?
220
220
  rate_type_validator = EnumAttributeValidator.new('String', ["RatePerUnit", "MultipleOfOrdinaryEarningsRate", "FixedAmount"])
@@ -227,7 +227,7 @@ module XeroRuby::PayrollUk
227
227
  # Custom attribute writer method checking allowed values (enum).
228
228
  # @param [Object] earnings_type Object to be assigned
229
229
  def earnings_type=(earnings_type)
230
- validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay"])
230
+ validator = EnumAttributeValidator.new('String', ["Allowance", "BackPay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay"])
231
231
  unless validator.valid?(earnings_type)
232
232
  fail ArgumentError, "invalid value for \"earnings_type\", must be one of #{validator.allowable_values}."
233
233
  end
@@ -38,6 +38,9 @@ module XeroRuby::PayrollUk
38
38
  # The number of hours added to the leave balance for every hour worked by the employee. This is normally 0, unless the scheduleOfAccrual chosen is \"OnHourWorked\"
39
39
  attr_accessor :rate_accrued_hourly
40
40
 
41
+ # The date when an employee becomes entitled to their accrual. Only applicable when scheduleOfAccrual is \"OnAnniversaryDate\"
42
+ attr_accessor :schedule_of_accrual_date
43
+
41
44
  class EnumAttributeValidator
42
45
  attr_reader :datatype
43
46
  attr_reader :allowable_values
@@ -68,7 +71,8 @@ module XeroRuby::PayrollUk
68
71
  :'hours_accrued_annually' => :'hoursAccruedAnnually',
69
72
  :'maximum_to_accrue' => :'maximumToAccrue',
70
73
  :'opening_balance' => :'openingBalance',
71
- :'rate_accrued_hourly' => :'rateAccruedHourly'
74
+ :'rate_accrued_hourly' => :'rateAccruedHourly',
75
+ :'schedule_of_accrual_date' => :'scheduleOfAccrualDate'
72
76
  }
73
77
  end
74
78
 
@@ -80,7 +84,8 @@ module XeroRuby::PayrollUk
80
84
  :'hours_accrued_annually' => :'Float',
81
85
  :'maximum_to_accrue' => :'Float',
82
86
  :'opening_balance' => :'Float',
83
- :'rate_accrued_hourly' => :'Float'
87
+ :'rate_accrued_hourly' => :'Float',
88
+ :'schedule_of_accrual_date' => :'Date'
84
89
  }
85
90
  end
86
91
 
@@ -122,6 +127,10 @@ module XeroRuby::PayrollUk
122
127
  if attributes.key?(:'rate_accrued_hourly')
123
128
  self.rate_accrued_hourly = attributes[:'rate_accrued_hourly']
124
129
  end
130
+
131
+ if attributes.key?(:'schedule_of_accrual_date')
132
+ self.schedule_of_accrual_date = attributes[:'schedule_of_accrual_date']
133
+ end
125
134
  end
126
135
 
127
136
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -169,7 +178,8 @@ module XeroRuby::PayrollUk
169
178
  hours_accrued_annually == o.hours_accrued_annually &&
170
179
  maximum_to_accrue == o.maximum_to_accrue &&
171
180
  opening_balance == o.opening_balance &&
172
- rate_accrued_hourly == o.rate_accrued_hourly
181
+ rate_accrued_hourly == o.rate_accrued_hourly &&
182
+ schedule_of_accrual_date == o.schedule_of_accrual_date
173
183
  end
174
184
 
175
185
  # @see the `==` method
@@ -181,7 +191,7 @@ module XeroRuby::PayrollUk
181
191
  # Calculates hash code according to all attributes.
182
192
  # @return [Integer] Hash code
183
193
  def hash
184
- [leave_type_id, schedule_of_accrual, hours_accrued_annually, maximum_to_accrue, opening_balance, rate_accrued_hourly].hash
194
+ [leave_type_id, schedule_of_accrual, hours_accrued_annually, maximum_to_accrue, opening_balance, rate_accrued_hourly, schedule_of_accrual_date].hash
185
195
  end
186
196
 
187
197
  # Builds the object from hash
@@ -177,7 +177,6 @@ module XeroRuby::Projects
177
177
  ZMW ||= "ZMW".freeze
178
178
  ZMK ||= "ZMK".freeze
179
179
  ZWD ||= "ZWD".freeze
180
- EMPTY ||= "".freeze
181
180
 
182
181
  # Builds the enum from string
183
182
  # @param [String] The enum value in the form of the string
@@ -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: 2.33.1
10
+ The version of the XeroOpenAPI document: 7.0.0
11
11
  =end
12
12
 
13
13
  module XeroRuby
14
- VERSION = '3.16.0'
14
+ VERSION = '10.0.0'
15
15
  end
@@ -17,51 +17,51 @@ module XeroRuby
17
17
 
18
18
  private
19
19
 
20
- def parameterize_option(key, value)
21
- quoted_key = quote_key(key)
20
+ def parameterize_option(key, value)
21
+ quoted_key = quote_key(key)
22
22
 
23
- case value
24
- when Array
25
- operator, query = value
23
+ case value
24
+ when Array
25
+ operator, query = value
26
26
 
27
- if STRING_FUNCTIONS.include?(camelize_key(operator))
28
- "#{quoted_key}.#{camelize_key(operator)}(#{quote_value(query)})"
27
+ if STRING_FUNCTIONS.include?(camelize_key(operator))
28
+ "#{quoted_key}.#{camelize_key(operator)}(#{quote_value(query)})"
29
+ else
30
+ "#{quoted_key} #{operator} #{quote_value(query)}"
31
+ end
32
+ when Range
33
+ "#{quoted_key} >= #{quote_value(value.first)} AND #{quoted_key} <= #{quote_value(value.last)}"
34
+ when /^\./
35
+ "#{quoted_key}#{value}"
29
36
  else
30
- "#{quoted_key} #{operator} #{quote_value(query)}"
37
+ "#{quoted_key} #{value}"
31
38
  end
32
- when Range
33
- "#{quoted_key} >= #{quote_value(value.first)} AND #{quoted_key} <= #{quote_value(value.last)}"
34
- when /^\./
35
- "#{quoted_key}#{value}"
36
- else
37
- "#{quoted_key} #{value}"
38
39
  end
39
- end
40
40
 
41
- def quote_key(key)
42
- case key
43
- when :contact_id
44
- 'Contact.ContactID'
45
- when :contact_number
46
- 'Contact.ContactNumber'
47
- when :invoice_id
48
- 'Invoice.InvoiceId'
49
- else
50
- camelize_key(key)
41
+ def quote_key(key)
42
+ case key
43
+ when :contact_id
44
+ 'Contact.ContactID'
45
+ when :contact_number
46
+ 'Contact.ContactNumber'
47
+ when :invoice_id
48
+ 'Invoice.InvoiceId'
49
+ else
50
+ camelize_key(key)
51
+ end
51
52
  end
52
- end
53
53
 
54
- def quote_value(value)
55
- case value
56
- when DateTime, Date, Time
57
- "DateTime(#{value.strftime("%Y,%m,%d")})"
58
- when Numeric, false, true
59
- value.to_s
60
- when UUID_REGEXP
61
- %{guid("#{value}")}
62
- else
63
- %{"#{value.to_s.gsub('"', '""')}"}
54
+ def quote_value(value)
55
+ case value
56
+ when DateTime, Date, Time
57
+ "DateTime(#{value.strftime("%Y,%m,%d")})"
58
+ when Numeric, false, true
59
+ value.to_s
60
+ when UUID_REGEXP
61
+ %{guid("#{value}")}
62
+ else
63
+ %{"#{value.to_s.gsub('"', '""')}"}
64
+ end
64
65
  end
65
- end
66
66
  end
67
67
  end
data/lib/xero-ruby.rb CHANGED
@@ -218,6 +218,11 @@ require 'xero-ruby/models/payroll_nz/employee_statutory_sick_leave_object'
218
218
  require 'xero-ruby/models/payroll_nz/employee_statutory_sick_leaves'
219
219
  require 'xero-ruby/models/payroll_nz/employee_tax'
220
220
  require 'xero-ruby/models/payroll_nz/employee_tax_object'
221
+ require 'xero-ruby/models/payroll_nz/employee_working_pattern'
222
+ require 'xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks'
223
+ require 'xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_object'
224
+ require 'xero-ruby/models/payroll_nz/employee_working_pattern_with_working_weeks_request'
225
+ require 'xero-ruby/models/payroll_nz/employee_working_patterns_object'
221
226
  require 'xero-ruby/models/payroll_nz/employees'
222
227
  require 'xero-ruby/models/payroll_nz/employment'
223
228
  require 'xero-ruby/models/payroll_nz/employment_object'
@@ -271,6 +276,7 @@ require 'xero-ruby/models/payroll_nz/timesheet_object'
271
276
  require 'xero-ruby/models/payroll_nz/timesheets'
272
277
  require 'xero-ruby/models/payroll_nz/tracking_categories'
273
278
  require 'xero-ruby/models/payroll_nz/tracking_category'
279
+ require 'xero-ruby/models/payroll_nz/working_week'
274
280
  require 'xero-ruby/models/payroll_au/api_exception'
275
281
  require 'xero-ruby/models/payroll_au/account'
276
282
  require 'xero-ruby/models/payroll_au/account_type'
@@ -310,8 +316,10 @@ require 'xero-ruby/models/payroll_au/leave_type'
310
316
  require 'xero-ruby/models/payroll_au/leave_type_contribution_type'
311
317
  require 'xero-ruby/models/payroll_au/manual_tax_type'
312
318
  require 'xero-ruby/models/payroll_au/opening_balances'
319
+ require 'xero-ruby/models/payroll_au/paid_leave_earnings_line'
313
320
  require 'xero-ruby/models/payroll_au/pay_item'
314
321
  require 'xero-ruby/models/payroll_au/pay_items'
322
+ require 'xero-ruby/models/payroll_au/pay_out_type'
315
323
  require 'xero-ruby/models/payroll_au/pay_run'
316
324
  require 'xero-ruby/models/payroll_au/pay_run_status'
317
325
  require 'xero-ruby/models/payroll_au/pay_runs'
@@ -458,6 +466,7 @@ require 'xero-ruby/models/accounting/import_summary_accounts'
458
466
  require 'xero-ruby/models/accounting/import_summary_object'
459
467
  require 'xero-ruby/models/accounting/import_summary_organisation'
460
468
  require 'xero-ruby/models/accounting/invoice'
469
+ require 'xero-ruby/models/accounting/invoice_address'
461
470
  require 'xero-ruby/models/accounting/invoice_reminder'
462
471
  require 'xero-ruby/models/accounting/invoice_reminders'
463
472
  require 'xero-ruby/models/accounting/invoices'
@@ -481,6 +490,7 @@ require 'xero-ruby/models/accounting/organisation'
481
490
  require 'xero-ruby/models/accounting/organisations'
482
491
  require 'xero-ruby/models/accounting/overpayment'
483
492
  require 'xero-ruby/models/accounting/overpayments'
493
+ require 'xero-ruby/models/accounting/pagination'
484
494
  require 'xero-ruby/models/accounting/payment'
485
495
  require 'xero-ruby/models/accounting/payment_delete'
486
496
  require 'xero-ruby/models/accounting/payment_service'
@@ -516,6 +526,7 @@ require 'xero-ruby/models/accounting/row_type'
516
526
  require 'xero-ruby/models/accounting/sales_tracking_category'
517
527
  require 'xero-ruby/models/accounting/schedule'
518
528
  require 'xero-ruby/models/accounting/setup'
529
+ require 'xero-ruby/models/accounting/tax_breakdown_component'
519
530
  require 'xero-ruby/models/accounting/tax_component'
520
531
  require 'xero-ruby/models/accounting/tax_rate'
521
532
  require 'xero-ruby/models/accounting/tax_rates'