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
@@ -18,7 +18,6 @@ module XeroRuby::PayrollAu
18
18
  FIXEDAMOUNTEACHPERIOD ||= "FIXEDAMOUNTEACHPERIOD".freeze
19
19
  ENTERRATEINPAYTEMPLATE ||= "ENTERRATEINPAYTEMPLATE".freeze
20
20
  BASEDONORDINARYEARNINGS ||= "BASEDONORDINARYEARNINGS".freeze
21
- EMPTY ||= "".freeze
22
21
 
23
22
  # Builds the enum from string
24
23
  # @param [String] The enum value in the form of the string
@@ -16,6 +16,8 @@ module XeroRuby::PayrollAu
16
16
  class LeavePeriodStatus
17
17
  SCHEDULED ||= "SCHEDULED".freeze
18
18
  PROCESSED ||= "PROCESSED".freeze
19
+ REQUESTED ||= "REQUESTED".freeze
20
+ REJECTED ||= "REJECTED".freeze
19
21
 
20
22
  # Builds the enum from string
21
23
  # @param [String] The enum value in the form of the string
@@ -43,6 +43,12 @@ module XeroRuby::PayrollAu
43
43
  # Is the current record
44
44
  attr_accessor :current_record
45
45
 
46
+
47
+ attr_accessor :leave_category_code
48
+
49
+ # Set this to indicate that the leave type is exempt from superannuation guarantee contribution
50
+ attr_accessor :sgc_exempt
51
+
46
52
  # Attribute mapping from ruby-style variable name to JSON key.
47
53
  def self.attribute_map
48
54
  {
@@ -54,7 +60,9 @@ module XeroRuby::PayrollAu
54
60
  :'updated_date_utc' => :'UpdatedDateUTC',
55
61
  :'is_paid_leave' => :'IsPaidLeave',
56
62
  :'show_on_payslip' => :'ShowOnPayslip',
57
- :'current_record' => :'CurrentRecord'
63
+ :'current_record' => :'CurrentRecord',
64
+ :'leave_category_code' => :'LeaveCategoryCode',
65
+ :'sgc_exempt' => :'SGCExempt'
58
66
  }
59
67
  end
60
68
 
@@ -69,7 +77,9 @@ module XeroRuby::PayrollAu
69
77
  :'updated_date_utc' => :'DateTime',
70
78
  :'is_paid_leave' => :'Boolean',
71
79
  :'show_on_payslip' => :'Boolean',
72
- :'current_record' => :'Boolean'
80
+ :'current_record' => :'Boolean',
81
+ :'leave_category_code' => :'LeaveCategoryCode',
82
+ :'sgc_exempt' => :'Boolean'
73
83
  }
74
84
  end
75
85
 
@@ -123,6 +133,14 @@ module XeroRuby::PayrollAu
123
133
  if attributes.key?(:'current_record')
124
134
  self.current_record = attributes[:'current_record']
125
135
  end
136
+
137
+ if attributes.key?(:'leave_category_code')
138
+ self.leave_category_code = attributes[:'leave_category_code']
139
+ end
140
+
141
+ if attributes.key?(:'sgc_exempt')
142
+ self.sgc_exempt = attributes[:'sgc_exempt']
143
+ end
126
144
  end
127
145
 
128
146
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -166,7 +184,9 @@ module XeroRuby::PayrollAu
166
184
  updated_date_utc == o.updated_date_utc &&
167
185
  is_paid_leave == o.is_paid_leave &&
168
186
  show_on_payslip == o.show_on_payslip &&
169
- current_record == o.current_record
187
+ current_record == o.current_record &&
188
+ leave_category_code == o.leave_category_code &&
189
+ sgc_exempt == o.sgc_exempt
170
190
  end
171
191
 
172
192
  # @see the `==` method
@@ -178,7 +198,7 @@ module XeroRuby::PayrollAu
178
198
  # Calculates hash code according to all attributes.
179
199
  # @return [Integer] Hash code
180
200
  def hash
181
- [name, type_of_units, leave_type_id, normal_entitlement, leave_loading_rate, updated_date_utc, is_paid_leave, show_on_payslip, current_record].hash
201
+ [name, type_of_units, leave_type_id, normal_entitlement, leave_loading_rate, updated_date_utc, is_paid_leave, show_on_payslip, current_record, leave_category_code, sgc_exempt].hash
182
202
  end
183
203
 
184
204
  # Builds the object from hash
@@ -37,6 +37,9 @@ module XeroRuby::PayrollAu
37
37
 
38
38
  attr_accessor :leave_lines
39
39
 
40
+
41
+ attr_accessor :paid_leave_earnings_lines
42
+
40
43
  # Attribute mapping from ruby-style variable name to JSON key.
41
44
  def self.attribute_map
42
45
  {
@@ -46,7 +49,8 @@ module XeroRuby::PayrollAu
46
49
  :'deduction_lines' => :'DeductionLines',
47
50
  :'super_lines' => :'SuperLines',
48
51
  :'reimbursement_lines' => :'ReimbursementLines',
49
- :'leave_lines' => :'LeaveLines'
52
+ :'leave_lines' => :'LeaveLines',
53
+ :'paid_leave_earnings_lines' => :'PaidLeaveEarningsLines'
50
54
  }
51
55
  end
52
56
 
@@ -59,7 +63,8 @@ module XeroRuby::PayrollAu
59
63
  :'deduction_lines' => :'Array<DeductionLine>',
60
64
  :'super_lines' => :'Array<SuperLine>',
61
65
  :'reimbursement_lines' => :'Array<ReimbursementLine>',
62
- :'leave_lines' => :'Array<LeaveLine>'
66
+ :'leave_lines' => :'Array<LeaveLine>',
67
+ :'paid_leave_earnings_lines' => :'Array<PaidLeaveEarningsLine>'
63
68
  }
64
69
  end
65
70
 
@@ -115,6 +120,12 @@ module XeroRuby::PayrollAu
115
120
  self.leave_lines = value
116
121
  end
117
122
  end
123
+
124
+ if attributes.key?(:'paid_leave_earnings_lines')
125
+ if (value = attributes[:'paid_leave_earnings_lines']).is_a?(Array)
126
+ self.paid_leave_earnings_lines = value
127
+ end
128
+ end
118
129
  end
119
130
 
120
131
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -141,7 +152,8 @@ module XeroRuby::PayrollAu
141
152
  deduction_lines == o.deduction_lines &&
142
153
  super_lines == o.super_lines &&
143
154
  reimbursement_lines == o.reimbursement_lines &&
144
- leave_lines == o.leave_lines
155
+ leave_lines == o.leave_lines &&
156
+ paid_leave_earnings_lines == o.paid_leave_earnings_lines
145
157
  end
146
158
 
147
159
  # @see the `==` method
@@ -153,7 +165,7 @@ module XeroRuby::PayrollAu
153
165
  # Calculates hash code according to all attributes.
154
166
  # @return [Integer] Hash code
155
167
  def hash
156
- [opening_balance_date, tax, earnings_lines, deduction_lines, super_lines, reimbursement_lines, leave_lines].hash
168
+ [opening_balance_date, tax, earnings_lines, deduction_lines, super_lines, reimbursement_lines, leave_lines, paid_leave_earnings_lines].hash
157
169
  end
158
170
 
159
171
  # Builds the object from hash
@@ -0,0 +1,272 @@
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
+ require 'bigdecimal'
17
+
18
+ class PaidLeaveEarningsLine
19
+ # Xero leave type identifier
20
+ attr_accessor :leave_type_id
21
+
22
+ # Paid leave amount
23
+ attr_accessor :amount
24
+
25
+ # The amount of leave loading applied for the leave type that is subject to Superannuation Guarantee Contributions. *Only applicable for Leave Types with Annual Leave Categories
26
+ attr_accessor :sgc_applied_leave_loading_amount
27
+
28
+ # The amount of leave loading applied for the leave type that is exempt from Superannuation Guarantee Contributions. *Only applicable for Leave Types with Annual Leave Categories
29
+ attr_accessor :sgc_exempted_leave_loading_amount
30
+
31
+ # Reset the STP categorisations for the leave type. *Only applicable for Leave Types with Annual Leave Categories
32
+ attr_accessor :reset_stp_categorisation
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'leave_type_id' => :'LeaveTypeID',
38
+ :'amount' => :'Amount',
39
+ :'sgc_applied_leave_loading_amount' => :'SGCAppliedLeaveLoadingAmount',
40
+ :'sgc_exempted_leave_loading_amount' => :'SGCExemptedLeaveLoadingAmount',
41
+ :'reset_stp_categorisation' => :'ResetSTPCategorisation'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'leave_type_id' => :'String',
49
+ :'amount' => :'BigDecimal',
50
+ :'sgc_applied_leave_loading_amount' => :'BigDecimal',
51
+ :'sgc_exempted_leave_loading_amount' => :'BigDecimal',
52
+ :'reset_stp_categorisation' => :'Boolean'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::PayrollAu::PaidLeaveEarningsLine` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::PayrollAu::PaidLeaveEarningsLine`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'leave_type_id')
72
+ self.leave_type_id = attributes[:'leave_type_id']
73
+ end
74
+
75
+ if attributes.key?(:'amount')
76
+ self.amount = attributes[:'amount']
77
+ end
78
+
79
+ if attributes.key?(:'sgc_applied_leave_loading_amount')
80
+ self.sgc_applied_leave_loading_amount = attributes[:'sgc_applied_leave_loading_amount']
81
+ end
82
+
83
+ if attributes.key?(:'sgc_exempted_leave_loading_amount')
84
+ self.sgc_exempted_leave_loading_amount = attributes[:'sgc_exempted_leave_loading_amount']
85
+ end
86
+
87
+ if attributes.key?(:'reset_stp_categorisation')
88
+ self.reset_stp_categorisation = attributes[:'reset_stp_categorisation']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ if @leave_type_id.nil?
97
+ invalid_properties.push('invalid value for "leave_type_id", leave_type_id cannot be nil.')
98
+ end
99
+
100
+ if @amount.nil?
101
+ invalid_properties.push('invalid value for "amount", amount cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ return false if @leave_type_id.nil?
111
+ return false if @amount.nil?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ leave_type_id == o.leave_type_id &&
121
+ amount == o.amount &&
122
+ sgc_applied_leave_loading_amount == o.sgc_applied_leave_loading_amount &&
123
+ sgc_exempted_leave_loading_amount == o.sgc_exempted_leave_loading_amount &&
124
+ reset_stp_categorisation == o.reset_stp_categorisation
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [leave_type_id, amount, sgc_applied_leave_loading_amount, sgc_exempted_leave_loading_amount, reset_stp_categorisation].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ self.class.openapi_types.each_pair do |key, type|
152
+ if type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
156
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
+ end
158
+ elsif !attributes[self.class.attribute_map[key]].nil?
159
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
161
+ end
162
+
163
+ self
164
+ end
165
+
166
+ # Deserializes the data based on type
167
+ # @param string type Data type
168
+ # @param string value Value to be deserialized
169
+ # @return [Object] Deserialized data
170
+ def _deserialize(type, value)
171
+ case type.to_sym
172
+ when :DateTime
173
+ DateTime.parse(parse_date(value))
174
+ when :Date
175
+ Date.parse(parse_date(value))
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :BigDecimal
183
+ BigDecimal(value.to_s)
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ XeroRuby::PayrollAu.const_get(type).build_from_hash(value)
206
+ end
207
+ end
208
+
209
+ # Returns the string representation of the object
210
+ # @return [String] String presentation of the object
211
+ def to_s
212
+ to_hash.to_s
213
+ end
214
+
215
+ # to_body is an alias to to_hash (backward compatibility)
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash(downcase: false)
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ next if value.nil?
228
+ key = downcase ? attr : param
229
+ hash[key] = _to_hash(value, downcase: downcase)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Returns the object in the form of hash with snake_case
235
+ def to_attributes
236
+ to_hash(downcase: true)
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value, downcase: false)
244
+ if value.is_a?(Array)
245
+ value.map do |v|
246
+ v.to_hash(downcase: downcase)
247
+ end
248
+ elsif value.is_a?(Hash)
249
+ {}.tap do |hash|
250
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
251
+ end
252
+ elsif value.respond_to? :to_hash
253
+ value.to_hash(downcase: downcase)
254
+ else
255
+ value
256
+ end
257
+ end
258
+
259
+ def parse_date(datestring)
260
+ if datestring.include?('Date')
261
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
262
+ original, date, timezone = *date_pattern.match(datestring)
263
+ date = (date.to_i / 1000)
264
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
265
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
266
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
267
+ else # handle date 'types' for small subset of payroll API's
268
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
269
+ end
270
+ end
271
+ end
272
+ end
@@ -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 PayOutType
17
+ DEFAULT ||= "DEFAULT".freeze
18
+ CASHED_OUT ||= "CASHED_OUT".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 = PayOutType.constants.select { |c| PayOutType::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #PayOutType" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,37 @@
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 SeniorMaritalStatus
17
+ MEMBEROFCOUPLE ||= "MEMBEROFCOUPLE".freeze
18
+ MEMBEROFILLNESSSEPARATEDCOUPLE ||= "MEMBEROFILLNESSSEPARATEDCOUPLE".freeze
19
+ SINGLE ||= "SINGLE".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 = SeniorMaritalStatus.constants.select { |c| SeniorMaritalStatus::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #SeniorMaritalStatus" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end
@@ -25,12 +25,16 @@ module XeroRuby::PayrollAu
25
25
  # Number of days in the Payroll year
26
26
  attr_accessor :days_in_payroll_year
27
27
 
28
+ # Indicates if the organisation has been enabled for STP Phase 2 editing of employees.
29
+ attr_accessor :employees_are_stp2
30
+
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
31
34
  :'accounts' => :'Accounts',
32
35
  :'tracking_categories' => :'TrackingCategories',
33
- :'days_in_payroll_year' => :'DaysInPayrollYear'
36
+ :'days_in_payroll_year' => :'DaysInPayrollYear',
37
+ :'employees_are_stp2' => :'EmployeesAreSTP2'
34
38
  }
35
39
  end
36
40
 
@@ -39,7 +43,8 @@ module XeroRuby::PayrollAu
39
43
  {
40
44
  :'accounts' => :'Array<Account>',
41
45
  :'tracking_categories' => :'SettingsTrackingCategories',
42
- :'days_in_payroll_year' => :'Integer'
46
+ :'days_in_payroll_year' => :'Integer',
47
+ :'employees_are_stp2' => :'Boolean'
43
48
  }
44
49
  end
45
50
 
@@ -71,6 +76,10 @@ module XeroRuby::PayrollAu
71
76
  if attributes.key?(:'days_in_payroll_year')
72
77
  self.days_in_payroll_year = attributes[:'days_in_payroll_year']
73
78
  end
79
+
80
+ if attributes.key?(:'employees_are_stp2')
81
+ self.employees_are_stp2 = attributes[:'employees_are_stp2']
82
+ end
74
83
  end
75
84
 
76
85
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -93,7 +102,8 @@ module XeroRuby::PayrollAu
93
102
  self.class == o.class &&
94
103
  accounts == o.accounts &&
95
104
  tracking_categories == o.tracking_categories &&
96
- days_in_payroll_year == o.days_in_payroll_year
105
+ days_in_payroll_year == o.days_in_payroll_year &&
106
+ employees_are_stp2 == o.employees_are_stp2
97
107
  end
98
108
 
99
109
  # @see the `==` method
@@ -105,7 +115,7 @@ module XeroRuby::PayrollAu
105
115
  # Calculates hash code according to all attributes.
106
116
  # @return [Integer] Hash code
107
117
  def hash
108
- [accounts, tracking_categories, days_in_payroll_year].hash
118
+ [accounts, tracking_categories, days_in_payroll_year, employees_are_stp2].hash
109
119
  end
110
120
 
111
121
  # Builds the object from hash