xero-ruby 18.2.0 → 18.4.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.
- checksums.yaml +4 -4
- data/lib/xero-ruby/api/account_data_api.rb +419 -0
- data/lib/xero-ruby/api/payroll_nz_api.rb +2 -0
- data/lib/xero-ruby/api_client.rb +10 -0
- data/lib/xero-ruby/configuration.rb +2 -0
- data/lib/xero-ruby/models/account_data/account.rb +351 -0
- data/lib/xero-ruby/models/account_data/account_balance.rb +287 -0
- data/lib/xero-ruby/models/account_data/account_balances_response.rb +229 -0
- data/lib/xero-ruby/models/account_data/account_movement.rb +347 -0
- data/lib/xero-ruby/models/account_data/account_movements_response.rb +229 -0
- data/lib/xero-ruby/models/account_data/account_transaction_line.rb +359 -0
- data/lib/xero-ruby/models/account_data/account_transactions_response.rb +269 -0
- data/lib/xero-ruby/models/account_data/account_transactions_response_pagination.rb +243 -0
- data/lib/xero-ruby/models/account_data/accounting_date_range.rb +242 -0
- data/lib/xero-ruby/models/account_data/field_problem.rb +273 -0
- data/lib/xero-ruby/models/account_data/gateway_problem.rb +285 -0
- data/lib/xero-ruby/models/account_data/ledger_decimal.rb +278 -0
- data/lib/xero-ruby/models/account_data/line_source.rb +273 -0
- data/lib/xero-ruby/models/account_data/line_tax_rate.rb +243 -0
- data/lib/xero-ruby/models/account_data/problem_details.rb +273 -0
- data/lib/xero-ruby/models/account_data/tracking_item_details.rb +257 -0
- data/lib/xero-ruby/models/account_data/transaction_account.rb +366 -0
- data/lib/xero-ruby/models/account_data/validation_problem.rb +275 -0
- data/lib/xero-ruby/models/accounting/account.rb +11 -1
- data/lib/xero-ruby/models/payroll_nz/employee_tax.rb +44 -6
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +19 -0
- metadata +385 -366
|
@@ -25,13 +25,13 @@ module XeroRuby::PayrollNz
|
|
|
25
25
|
# Special tax rate percentage.
|
|
26
26
|
attr_accessor :special_tax_rate_percentage
|
|
27
27
|
|
|
28
|
-
# Does the employee
|
|
28
|
+
# Does the employee have a special student loan rate?
|
|
29
29
|
attr_accessor :has_special_student_loan_rate
|
|
30
30
|
|
|
31
31
|
# The employee student loan rate percentage.
|
|
32
32
|
attr_accessor :special_student_loan_rate_percentage
|
|
33
33
|
|
|
34
|
-
# The employee eligibility for KiwiSaver.
|
|
34
|
+
# The employee eligibility for KiwiSaver. Deprecated, replaced by kiwiSaverStatus. Omit this field from POST requests.
|
|
35
35
|
attr_accessor :is_eligible_for_kiwi_saver
|
|
36
36
|
|
|
37
37
|
# Employer superannuation contribution tax rate.
|
|
@@ -45,6 +45,15 @@ module XeroRuby::PayrollNz
|
|
|
45
45
|
ON_A_SAVINGS_SUSPENSION ||= "OnASavingsSuspension".freeze
|
|
46
46
|
NOT_CURRENTLY_A_KIWI_SAVER_MEMBER ||= "NotCurrentlyAKiwiSaverMember".freeze
|
|
47
47
|
|
|
48
|
+
# KiwiSaver eligibility. Required in POST requests for all tax codes except WT and NSW.
|
|
49
|
+
attr_accessor :kiwi_saver_status
|
|
50
|
+
ACTIVE_KIWI_SAVER_MEMBER ||= "ActiveKiwiSaverMember".freeze
|
|
51
|
+
AUTOMATICALLY_ENROLLED_INTO_KIWI_SAVER ||= "AutomaticallyEnrolledIntoKiwiSaver".freeze
|
|
52
|
+
EMPLOYED_FOR_LESS_THAN28_DAYS ||= "EmployedForLessThan28Days".freeze
|
|
53
|
+
NOT_REQUIRED_TO_BE_AUTOMATICALLY_ENROLLED ||= "NotRequiredToBeAutomaticallyEnrolled".freeze
|
|
54
|
+
OPTED_INTO_KIWI_SAVER ||= "OptedIntoKiwiSaver".freeze
|
|
55
|
+
NOT_ELIGIBLE_FOR_KIWI_SAVER ||= "NotEligibleForKiwiSaver".freeze
|
|
56
|
+
|
|
48
57
|
# Employee Contribution percentage.
|
|
49
58
|
attr_accessor :kiwi_saver_employee_contribution_rate_percentage
|
|
50
59
|
|
|
@@ -69,6 +78,9 @@ module XeroRuby::PayrollNz
|
|
|
69
78
|
# The date of the letter from IR.
|
|
70
79
|
attr_accessor :student_loan_as_at
|
|
71
80
|
|
|
81
|
+
# Is the employee registered for GST? Required in POST requests when taxCode is WT.
|
|
82
|
+
attr_accessor :registered_for_gst
|
|
83
|
+
|
|
72
84
|
class EnumAttributeValidator
|
|
73
85
|
attr_reader :datatype
|
|
74
86
|
attr_reader :allowable_values
|
|
@@ -102,6 +114,7 @@ module XeroRuby::PayrollNz
|
|
|
102
114
|
:'is_eligible_for_kiwi_saver' => :'isEligibleForKiwiSaver',
|
|
103
115
|
:'esct_rate_percentage' => :'esctRatePercentage',
|
|
104
116
|
:'kiwi_saver_contributions' => :'kiwiSaverContributions',
|
|
117
|
+
:'kiwi_saver_status' => :'kiwiSaverStatus',
|
|
105
118
|
:'kiwi_saver_employee_contribution_rate_percentage' => :'kiwiSaverEmployeeContributionRatePercentage',
|
|
106
119
|
:'kiwi_saver_employer_contribution_rate_percentage' => :'kiwiSaverEmployerContributionRatePercentage',
|
|
107
120
|
:'kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage' => :'kiwiSaverEmployerSalarySacrificeContributionRatePercentage',
|
|
@@ -109,7 +122,8 @@ module XeroRuby::PayrollNz
|
|
|
109
122
|
:'kiwi_saver_contribution_holiday_end_date' => :'kiwiSaverContributionHolidayEndDate',
|
|
110
123
|
:'has_student_loan_balance' => :'hasStudentLoanBalance',
|
|
111
124
|
:'student_loan_balance' => :'studentLoanBalance',
|
|
112
|
-
:'student_loan_as_at' => :'studentLoanAsAt'
|
|
125
|
+
:'student_loan_as_at' => :'studentLoanAsAt',
|
|
126
|
+
:'registered_for_gst' => :'registeredForGST'
|
|
113
127
|
}
|
|
114
128
|
end
|
|
115
129
|
|
|
@@ -124,6 +138,7 @@ module XeroRuby::PayrollNz
|
|
|
124
138
|
:'is_eligible_for_kiwi_saver' => :'Boolean',
|
|
125
139
|
:'esct_rate_percentage' => :'BigDecimal',
|
|
126
140
|
:'kiwi_saver_contributions' => :'String',
|
|
141
|
+
:'kiwi_saver_status' => :'String',
|
|
127
142
|
:'kiwi_saver_employee_contribution_rate_percentage' => :'BigDecimal',
|
|
128
143
|
:'kiwi_saver_employer_contribution_rate_percentage' => :'BigDecimal',
|
|
129
144
|
:'kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage' => :'BigDecimal',
|
|
@@ -131,7 +146,8 @@ module XeroRuby::PayrollNz
|
|
|
131
146
|
:'kiwi_saver_contribution_holiday_end_date' => :'Date',
|
|
132
147
|
:'has_student_loan_balance' => :'Boolean',
|
|
133
148
|
:'student_loan_balance' => :'BigDecimal',
|
|
134
|
-
:'student_loan_as_at' => :'Date'
|
|
149
|
+
:'student_loan_as_at' => :'Date',
|
|
150
|
+
:'registered_for_gst' => :'Boolean'
|
|
135
151
|
}
|
|
136
152
|
end
|
|
137
153
|
|
|
@@ -182,6 +198,10 @@ module XeroRuby::PayrollNz
|
|
|
182
198
|
self.kiwi_saver_contributions = attributes[:'kiwi_saver_contributions']
|
|
183
199
|
end
|
|
184
200
|
|
|
201
|
+
if attributes.key?(:'kiwi_saver_status')
|
|
202
|
+
self.kiwi_saver_status = attributes[:'kiwi_saver_status']
|
|
203
|
+
end
|
|
204
|
+
|
|
185
205
|
if attributes.key?(:'kiwi_saver_employee_contribution_rate_percentage')
|
|
186
206
|
self.kiwi_saver_employee_contribution_rate_percentage = attributes[:'kiwi_saver_employee_contribution_rate_percentage']
|
|
187
207
|
end
|
|
@@ -213,6 +233,10 @@ module XeroRuby::PayrollNz
|
|
|
213
233
|
if attributes.key?(:'student_loan_as_at')
|
|
214
234
|
self.student_loan_as_at = attributes[:'student_loan_as_at']
|
|
215
235
|
end
|
|
236
|
+
|
|
237
|
+
if attributes.key?(:'registered_for_gst')
|
|
238
|
+
self.registered_for_gst = attributes[:'registered_for_gst']
|
|
239
|
+
end
|
|
216
240
|
end
|
|
217
241
|
|
|
218
242
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -227,6 +251,8 @@ module XeroRuby::PayrollNz
|
|
|
227
251
|
def valid?
|
|
228
252
|
kiwi_saver_contributions_validator = EnumAttributeValidator.new('String', ["MakeContributions", "OptOut", "OnAContributionsHoliday", "OnASavingsSuspension", "NotCurrentlyAKiwiSaverMember"])
|
|
229
253
|
return false unless kiwi_saver_contributions_validator.valid?(@kiwi_saver_contributions)
|
|
254
|
+
kiwi_saver_status_validator = EnumAttributeValidator.new('String', ["ActiveKiwiSaverMember", "AutomaticallyEnrolledIntoKiwiSaver", "EmployedForLessThan28Days", "NotRequiredToBeAutomaticallyEnrolled", "OptedIntoKiwiSaver", "NotEligibleForKiwiSaver"])
|
|
255
|
+
return false unless kiwi_saver_status_validator.valid?(@kiwi_saver_status)
|
|
230
256
|
true
|
|
231
257
|
end
|
|
232
258
|
|
|
@@ -240,6 +266,16 @@ module XeroRuby::PayrollNz
|
|
|
240
266
|
@kiwi_saver_contributions = kiwi_saver_contributions
|
|
241
267
|
end
|
|
242
268
|
|
|
269
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
270
|
+
# @param [Object] kiwi_saver_status Object to be assigned
|
|
271
|
+
def kiwi_saver_status=(kiwi_saver_status)
|
|
272
|
+
validator = EnumAttributeValidator.new('String', ["ActiveKiwiSaverMember", "AutomaticallyEnrolledIntoKiwiSaver", "EmployedForLessThan28Days", "NotRequiredToBeAutomaticallyEnrolled", "OptedIntoKiwiSaver", "NotEligibleForKiwiSaver"])
|
|
273
|
+
unless validator.valid?(kiwi_saver_status)
|
|
274
|
+
fail ArgumentError, "invalid value for \"kiwi_saver_status\", must be one of #{validator.allowable_values}."
|
|
275
|
+
end
|
|
276
|
+
@kiwi_saver_status = kiwi_saver_status
|
|
277
|
+
end
|
|
278
|
+
|
|
243
279
|
# Checks equality by comparing each attribute.
|
|
244
280
|
# @param [Object] Object to be compared
|
|
245
281
|
def ==(o)
|
|
@@ -253,6 +289,7 @@ module XeroRuby::PayrollNz
|
|
|
253
289
|
is_eligible_for_kiwi_saver == o.is_eligible_for_kiwi_saver &&
|
|
254
290
|
esct_rate_percentage == o.esct_rate_percentage &&
|
|
255
291
|
kiwi_saver_contributions == o.kiwi_saver_contributions &&
|
|
292
|
+
kiwi_saver_status == o.kiwi_saver_status &&
|
|
256
293
|
kiwi_saver_employee_contribution_rate_percentage == o.kiwi_saver_employee_contribution_rate_percentage &&
|
|
257
294
|
kiwi_saver_employer_contribution_rate_percentage == o.kiwi_saver_employer_contribution_rate_percentage &&
|
|
258
295
|
kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage == o.kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage &&
|
|
@@ -260,7 +297,8 @@ module XeroRuby::PayrollNz
|
|
|
260
297
|
kiwi_saver_contribution_holiday_end_date == o.kiwi_saver_contribution_holiday_end_date &&
|
|
261
298
|
has_student_loan_balance == o.has_student_loan_balance &&
|
|
262
299
|
student_loan_balance == o.student_loan_balance &&
|
|
263
|
-
student_loan_as_at == o.student_loan_as_at
|
|
300
|
+
student_loan_as_at == o.student_loan_as_at &&
|
|
301
|
+
registered_for_gst == o.registered_for_gst
|
|
264
302
|
end
|
|
265
303
|
|
|
266
304
|
# @see the `==` method
|
|
@@ -272,7 +310,7 @@ module XeroRuby::PayrollNz
|
|
|
272
310
|
# Calculates hash code according to all attributes.
|
|
273
311
|
# @return [Integer] Hash code
|
|
274
312
|
def hash
|
|
275
|
-
[ird_number, tax_code, special_tax_rate_percentage, has_special_student_loan_rate, special_student_loan_rate_percentage, is_eligible_for_kiwi_saver, esct_rate_percentage, kiwi_saver_contributions, kiwi_saver_employee_contribution_rate_percentage, kiwi_saver_employer_contribution_rate_percentage, kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage, kiwi_saver_opt_out_date, kiwi_saver_contribution_holiday_end_date, has_student_loan_balance, student_loan_balance, student_loan_as_at].hash
|
|
313
|
+
[ird_number, tax_code, special_tax_rate_percentage, has_special_student_loan_rate, special_student_loan_rate_percentage, is_eligible_for_kiwi_saver, esct_rate_percentage, kiwi_saver_contributions, kiwi_saver_status, kiwi_saver_employee_contribution_rate_percentage, kiwi_saver_employer_contribution_rate_percentage, kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage, kiwi_saver_opt_out_date, kiwi_saver_contribution_holiday_end_date, has_student_loan_balance, student_loan_balance, student_loan_as_at, registered_for_gst].hash
|
|
276
314
|
end
|
|
277
315
|
|
|
278
316
|
# Builds the object from hash
|
data/lib/xero-ruby/version.rb
CHANGED
|
@@ -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:
|
|
10
|
+
The version of the XeroOpenAPI document: 20.0.1
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module XeroRuby
|
|
14
|
-
VERSION = '18.
|
|
14
|
+
VERSION = '18.4.0'
|
|
15
15
|
end
|
data/lib/xero-ruby.rb
CHANGED
|
@@ -18,6 +18,24 @@ require 'xero-ruby/version'
|
|
|
18
18
|
require 'xero-ruby/configuration'
|
|
19
19
|
|
|
20
20
|
# Models
|
|
21
|
+
require 'xero-ruby/models/account_data/account'
|
|
22
|
+
require 'xero-ruby/models/account_data/account_balance'
|
|
23
|
+
require 'xero-ruby/models/account_data/account_balances_response'
|
|
24
|
+
require 'xero-ruby/models/account_data/account_movement'
|
|
25
|
+
require 'xero-ruby/models/account_data/account_movements_response'
|
|
26
|
+
require 'xero-ruby/models/account_data/account_transaction_line'
|
|
27
|
+
require 'xero-ruby/models/account_data/account_transactions_response'
|
|
28
|
+
require 'xero-ruby/models/account_data/account_transactions_response_pagination'
|
|
29
|
+
require 'xero-ruby/models/account_data/accounting_date_range'
|
|
30
|
+
require 'xero-ruby/models/account_data/field_problem'
|
|
31
|
+
require 'xero-ruby/models/account_data/gateway_problem'
|
|
32
|
+
require 'xero-ruby/models/account_data/ledger_decimal'
|
|
33
|
+
require 'xero-ruby/models/account_data/line_source'
|
|
34
|
+
require 'xero-ruby/models/account_data/line_tax_rate'
|
|
35
|
+
require 'xero-ruby/models/account_data/problem_details'
|
|
36
|
+
require 'xero-ruby/models/account_data/tracking_item_details'
|
|
37
|
+
require 'xero-ruby/models/account_data/transaction_account'
|
|
38
|
+
require 'xero-ruby/models/account_data/validation_problem'
|
|
21
39
|
require 'xero-ruby/models/finance/balance_sheet_account_detail'
|
|
22
40
|
require 'xero-ruby/models/finance/balance_sheet_account_group'
|
|
23
41
|
require 'xero-ruby/models/finance/balance_sheet_account_type'
|
|
@@ -553,6 +571,7 @@ require 'xero-ruby/models/accounting/users'
|
|
|
553
571
|
require 'xero-ruby/models/accounting/validation_error'
|
|
554
572
|
|
|
555
573
|
# APIs
|
|
574
|
+
require 'xero-ruby/api/account_data_api'
|
|
556
575
|
require 'xero-ruby/api/finance_api'
|
|
557
576
|
require 'xero-ruby/api/app_store_api'
|
|
558
577
|
require 'xero-ruby/api/payroll_uk_api'
|