xero-ruby 4.0.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xero-ruby/api/files_api.rb +80 -2
- data/lib/xero-ruby/api_client.rb +1 -1
- data/lib/xero-ruby/models/accounting/currency_code.rb +10 -7
- data/lib/xero-ruby/models/accounting/tax_rate.rb +6 -6
- data/lib/xero-ruby/models/accounting/tax_type.rb +8 -4
- data/lib/xero-ruby/models/finance/statement_response.rb +1 -1
- data/lib/xero-ruby/models/payroll_au/leave_application.rb +11 -1
- data/lib/xero-ruby/models/payroll_au/leave_earnings_line.rb +14 -4
- data/lib/xero-ruby/models/payroll_au/opening_balances.rb +16 -4
- data/lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb +272 -0
- data/lib/xero-ruby/models/payroll_au/pay_out_type.rb +36 -0
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +2 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 905a869a65da3308bb07b94e7b61aa2cebd74444f121f432d26b7d4e8ebf25e9
|
4
|
+
data.tar.gz: 87cfe9e2dcc151494c4e5556def1d8ca8605a08016c91c1fb76daa7cdf5af7c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 132629b56901b36eb7e70fab58a4145288d68999c459d1d5ac88d62edfa807db5d31e4c1f5a4e7d7b1b8e5f82e553b20f357b0031261c7953be3949632819a97
|
7
|
+
data.tar.gz: 6e579931fe5cb8792420e6e90bb684695e27e1a9858bfc8b90cb39afac1e876f37f8d4c818fac26f2df2af05c5cbec499680101732c5391ad3dd30b85e78aced
|
@@ -404,7 +404,7 @@ module XeroRuby
|
|
404
404
|
end
|
405
405
|
|
406
406
|
# Retrieves an association object using a unique object ID
|
407
|
-
# By passing in the appropriate options,
|
407
|
+
# By passing in the appropriate options, you can retrieve an association
|
408
408
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
409
409
|
# @param object_id [String] Object id for single object
|
410
410
|
# @param [Hash] opts the optional parameters
|
@@ -415,7 +415,7 @@ module XeroRuby
|
|
415
415
|
end
|
416
416
|
|
417
417
|
# Retrieves an association object using a unique object ID
|
418
|
-
# By passing in the appropriate options,
|
418
|
+
# By passing in the appropriate options, you can retrieve an association
|
419
419
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
420
420
|
# @param object_id [String] Object id for single object
|
421
421
|
# @param [Hash] opts the optional parameters
|
@@ -480,6 +480,84 @@ module XeroRuby
|
|
480
480
|
return data, status_code, headers
|
481
481
|
end
|
482
482
|
|
483
|
+
# Retrieves a count of associations for a list of objects.
|
484
|
+
# By passing in the appropriate options, you can retrieve the association count for objects
|
485
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
486
|
+
# @param object_ids [Array<String>] A comma-separated list of object ids
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @return [Object]
|
489
|
+
def get_associations_count(xero_tenant_id, object_ids, opts = {})
|
490
|
+
data, _status_code, _headers = get_associations_count_with_http_info(xero_tenant_id, object_ids, opts)
|
491
|
+
data
|
492
|
+
end
|
493
|
+
|
494
|
+
# Retrieves a count of associations for a list of objects.
|
495
|
+
# By passing in the appropriate options, you can retrieve the association count for objects
|
496
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
497
|
+
# @param object_ids [Array<String>] A comma-separated list of object ids
|
498
|
+
# @param [Hash] opts the optional parameters
|
499
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
500
|
+
def get_associations_count_with_http_info(xero_tenant_id, object_ids, options = {})
|
501
|
+
opts = options.dup
|
502
|
+
if @api_client.config.debugging
|
503
|
+
@api_client.config.logger.debug 'Calling API: FilesApi.get_associations_count ...'
|
504
|
+
end
|
505
|
+
# verify the required parameter 'xero_tenant_id' is set
|
506
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
507
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling FilesApi.get_associations_count"
|
508
|
+
end
|
509
|
+
# verify the required parameter 'object_ids' is set
|
510
|
+
if @api_client.config.client_side_validation && object_ids.nil?
|
511
|
+
fail ArgumentError, "Missing the required parameter 'object_ids' when calling FilesApi.get_associations_count"
|
512
|
+
end
|
513
|
+
# resource path
|
514
|
+
local_var_path = '/Associations/Count'
|
515
|
+
|
516
|
+
# camelize keys of incoming `where` opts
|
517
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
518
|
+
|
519
|
+
# query parameters
|
520
|
+
query_params = opts[:query_params] || {}
|
521
|
+
query_params[:'ObjectIds'] = @api_client.build_collection_param(object_ids, :multi)
|
522
|
+
|
523
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
524
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
525
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
526
|
+
|
527
|
+
# header parameters
|
528
|
+
header_params = opts[:header_params] || {}
|
529
|
+
# HTTP header 'Accept' (if needed)
|
530
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
531
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
532
|
+
|
533
|
+
# form parameters
|
534
|
+
form_params = opts[:form_params] || {}
|
535
|
+
|
536
|
+
# http body (model)
|
537
|
+
post_body = opts[:body]
|
538
|
+
|
539
|
+
# return_type
|
540
|
+
return_type = opts[:return_type] || 'Object'
|
541
|
+
|
542
|
+
# auth_names
|
543
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
544
|
+
|
545
|
+
new_options = opts.merge(
|
546
|
+
:header_params => header_params,
|
547
|
+
:query_params => query_params,
|
548
|
+
:form_params => form_params,
|
549
|
+
:body => post_body,
|
550
|
+
:auth_names => auth_names,
|
551
|
+
:return_type => return_type
|
552
|
+
)
|
553
|
+
|
554
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "FilesApi", new_options)
|
555
|
+
if @api_client.config.debugging
|
556
|
+
@api_client.config.logger.debug "API called: FilesApi#get_associations_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
557
|
+
end
|
558
|
+
return data, status_code, headers
|
559
|
+
end
|
560
|
+
|
483
561
|
# Retrieves a file by a unique file ID
|
484
562
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
485
563
|
# @param file_id [String] File id for single object
|
data/lib/xero-ruby/api_client.rb
CHANGED
@@ -257,7 +257,7 @@ module XeroRuby
|
|
257
257
|
end
|
258
258
|
|
259
259
|
def last_connection
|
260
|
-
connections.sort { |a,b| DateTime.parse(a['updatedDateUtc']) <=> DateTime.parse(b['updatedDateUtc'])}.
|
260
|
+
connections.sort { |a,b| DateTime.parse(a['updatedDateUtc']) <=> DateTime.parse(b['updatedDateUtc'])}.last
|
261
261
|
end
|
262
262
|
|
263
263
|
def disconnect(connection_id)
|
@@ -43,6 +43,7 @@ module XeroRuby::Accounting
|
|
43
43
|
CAD ||= "CAD".freeze
|
44
44
|
CDF ||= "CDF".freeze
|
45
45
|
CHF ||= "CHF".freeze
|
46
|
+
CLF ||= "CLF".freeze
|
46
47
|
CLP ||= "CLP".freeze
|
47
48
|
CNY ||= "CNY".freeze
|
48
49
|
COP ||= "COP".freeze
|
@@ -55,6 +56,7 @@ module XeroRuby::Accounting
|
|
55
56
|
DKK ||= "DKK".freeze
|
56
57
|
DOP ||= "DOP".freeze
|
57
58
|
DZD ||= "DZD".freeze
|
59
|
+
EEK ||= "EEK".freeze
|
58
60
|
EGP ||= "EGP".freeze
|
59
61
|
ERN ||= "ERN".freeze
|
60
62
|
ETB ||= "ETB".freeze
|
@@ -63,7 +65,6 @@ module XeroRuby::Accounting
|
|
63
65
|
FKP ||= "FKP".freeze
|
64
66
|
GBP ||= "GBP".freeze
|
65
67
|
GEL ||= "GEL".freeze
|
66
|
-
GGP ||= "GGP".freeze
|
67
68
|
GHS ||= "GHS".freeze
|
68
69
|
GIP ||= "GIP".freeze
|
69
70
|
GMD ||= "GMD".freeze
|
@@ -77,12 +78,10 @@ module XeroRuby::Accounting
|
|
77
78
|
HUF ||= "HUF".freeze
|
78
79
|
IDR ||= "IDR".freeze
|
79
80
|
ILS ||= "ILS".freeze
|
80
|
-
IMP ||= "IMP".freeze
|
81
81
|
INR ||= "INR".freeze
|
82
82
|
IQD ||= "IQD".freeze
|
83
83
|
IRR ||= "IRR".freeze
|
84
84
|
ISK ||= "ISK".freeze
|
85
|
-
JEP ||= "JEP".freeze
|
86
85
|
JMD ||= "JMD".freeze
|
87
86
|
JOD ||= "JOD".freeze
|
88
87
|
JPY ||= "JPY".freeze
|
@@ -101,6 +100,7 @@ module XeroRuby::Accounting
|
|
101
100
|
LRD ||= "LRD".freeze
|
102
101
|
LSL ||= "LSL".freeze
|
103
102
|
LTL ||= "LTL".freeze
|
103
|
+
LVL ||= "LVL".freeze
|
104
104
|
LYD ||= "LYD".freeze
|
105
105
|
MAD ||= "MAD".freeze
|
106
106
|
MDL ||= "MDL".freeze
|
@@ -109,11 +109,13 @@ module XeroRuby::Accounting
|
|
109
109
|
MMK ||= "MMK".freeze
|
110
110
|
MNT ||= "MNT".freeze
|
111
111
|
MOP ||= "MOP".freeze
|
112
|
+
MRO ||= "MRO".freeze
|
112
113
|
MRU ||= "MRU".freeze
|
113
114
|
MUR ||= "MUR".freeze
|
114
115
|
MVR ||= "MVR".freeze
|
115
116
|
MWK ||= "MWK".freeze
|
116
117
|
MXN ||= "MXN".freeze
|
118
|
+
MXV ||= "MXV".freeze
|
117
119
|
MYR ||= "MYR".freeze
|
118
120
|
MZN ||= "MZN".freeze
|
119
121
|
NAD ||= "NAD".freeze
|
@@ -142,11 +144,13 @@ module XeroRuby::Accounting
|
|
142
144
|
SEK ||= "SEK".freeze
|
143
145
|
SGD ||= "SGD".freeze
|
144
146
|
SHP ||= "SHP".freeze
|
147
|
+
SKK ||= "SKK".freeze
|
148
|
+
SLE ||= "SLE".freeze
|
145
149
|
SLL ||= "SLL".freeze
|
146
150
|
SOS ||= "SOS".freeze
|
147
|
-
SPL ||= "SPL".freeze
|
148
151
|
SRD ||= "SRD".freeze
|
149
|
-
STN ||= "
|
152
|
+
STN ||= "STD".freeze
|
153
|
+
STD ||= "STN".freeze
|
150
154
|
SVC ||= "SVC".freeze
|
151
155
|
SYP ||= "SYP".freeze
|
152
156
|
SZL ||= "SZL".freeze
|
@@ -157,7 +161,6 @@ module XeroRuby::Accounting
|
|
157
161
|
TOP ||= "TOP".freeze
|
158
162
|
TRY_LIRA ||= "TRY".freeze
|
159
163
|
TTD ||= "TTD".freeze
|
160
|
-
TVD ||= "TVD".freeze
|
161
164
|
TWD ||= "TWD".freeze
|
162
165
|
TZS ||= "TZS".freeze
|
163
166
|
UAH ||= "UAH".freeze
|
@@ -166,12 +169,12 @@ module XeroRuby::Accounting
|
|
166
169
|
UYU ||= "UYU".freeze
|
167
170
|
UZS ||= "UZS".freeze
|
168
171
|
VEF ||= "VEF".freeze
|
172
|
+
VES ||= "VES".freeze
|
169
173
|
VND ||= "VND".freeze
|
170
174
|
VUV ||= "VUV".freeze
|
171
175
|
WST ||= "WST".freeze
|
172
176
|
XAF ||= "XAF".freeze
|
173
177
|
XCD ||= "XCD".freeze
|
174
|
-
XDR ||= "XDR".freeze
|
175
178
|
XOF ||= "XOF".freeze
|
176
179
|
XPF ||= "XPF".freeze
|
177
180
|
YER ||= "YER".freeze
|
@@ -112,10 +112,10 @@ module XeroRuby::Accounting
|
|
112
112
|
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
113
113
|
SROVR ||= "SROVR".freeze
|
114
114
|
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
115
|
+
TXRCN33 ||= "TXRCN33".freeze
|
116
|
+
TXRCRE ||= "TXRCRE".freeze
|
117
|
+
TXRCESS ||= "TXRCESS".freeze
|
118
|
+
TXRCTS ||= "TXRCTS".freeze
|
119
119
|
CAPEXINPUT ||= "CAPEXINPUT".freeze
|
120
120
|
UNDEFINED ||= "UNDEFINED".freeze
|
121
121
|
CAPEXOUTPUT ||= "CAPEXOUTPUT".freeze
|
@@ -284,7 +284,7 @@ module XeroRuby::Accounting
|
|
284
284
|
def valid?
|
285
285
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "DELETED", "ARCHIVED", "PENDING"])
|
286
286
|
return false unless status_validator.valid?(@status)
|
287
|
-
report_tax_type_validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "
|
287
|
+
report_tax_type_validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG"])
|
288
288
|
return false unless report_tax_type_validator.valid?(@report_tax_type)
|
289
289
|
true
|
290
290
|
end
|
@@ -302,7 +302,7 @@ module XeroRuby::Accounting
|
|
302
302
|
# Custom attribute writer method checking allowed values (enum).
|
303
303
|
# @param [Object] report_tax_type Object to be assigned
|
304
304
|
def report_tax_type=(report_tax_type)
|
305
|
-
validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "
|
305
|
+
validator = EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG"])
|
306
306
|
unless validator.valid?(report_tax_type)
|
307
307
|
fail ArgumentError, "invalid value for \"report_tax_type\", must be one of #{validator.allowable_values}."
|
308
308
|
end
|
@@ -77,10 +77,10 @@ module XeroRuby::Accounting
|
|
77
77
|
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
78
78
|
SROVR ||= "SROVR".freeze
|
79
79
|
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
80
|
+
TXRCN33 ||= "TXRCN33".freeze
|
81
|
+
TXRCRE ||= "TXRCRE".freeze
|
82
|
+
TXRCESS ||= "TXRCESS".freeze
|
83
|
+
TXRCTS ||= "TXRCTS".freeze
|
84
84
|
OUTPUTY23 ||= "OUTPUTY23".freeze
|
85
85
|
DSOUTPUTY23 ||= "DSOUTPUTY23".freeze
|
86
86
|
INPUTY23 ||= "INPUTY23".freeze
|
@@ -96,6 +96,10 @@ module XeroRuby::Accounting
|
|
96
96
|
SROVRRSY23 ||= "SROVRRSY23".freeze
|
97
97
|
SROVRLVGY23 ||= "SROVRLVGY23".freeze
|
98
98
|
SRLVGY23 ||= "SRLVGY23".freeze
|
99
|
+
TXRCN33_Y23 ||= "TXRCN33Y23".freeze
|
100
|
+
TXRCREY23 ||= "TXRCREY23".freeze
|
101
|
+
TXRCESSY23 ||= "TXRCESSY23".freeze
|
102
|
+
TXRCTSY23 ||= "TXRCTSY23".freeze
|
99
103
|
|
100
104
|
# Builds the enum from string
|
101
105
|
# @param [String] The enum value in the form of the string
|
@@ -28,7 +28,7 @@ module XeroRuby::Finance
|
|
28
28
|
# Utc date time of when the statement was imported in Xero
|
29
29
|
attr_accessor :imported_date_time_utc
|
30
30
|
|
31
|
-
#
|
31
|
+
# Identifies where the statement data in Xero was sourced, 1) direct bank feed, automatically loaded from the bank (eg STMTIMPORTSRC/CBAFEED); 2) indirect bank feed, automatically loaded from a 3rd party provider (eg STMTIMPORTSRC/YODLEE); 3) manually uploaded bank feed (eg STMTIMPORTSRC/CSV) or 4) manually entered statement data (STMTIMPORTSRC/MANUAL).
|
32
32
|
attr_accessor :import_source
|
33
33
|
|
34
34
|
# Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0.
|
@@ -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
|
@@ -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
|
@@ -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
|
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: 2.
|
10
|
+
The version of the XeroOpenAPI document: 2.37.0
|
11
11
|
=end
|
12
12
|
|
13
13
|
module XeroRuby
|
14
|
-
VERSION = '4.
|
14
|
+
VERSION = '4.2.0'
|
15
15
|
end
|
data/lib/xero-ruby.rb
CHANGED
@@ -310,8 +310,10 @@ require 'xero-ruby/models/payroll_au/leave_type'
|
|
310
310
|
require 'xero-ruby/models/payroll_au/leave_type_contribution_type'
|
311
311
|
require 'xero-ruby/models/payroll_au/manual_tax_type'
|
312
312
|
require 'xero-ruby/models/payroll_au/opening_balances'
|
313
|
+
require 'xero-ruby/models/payroll_au/paid_leave_earnings_line'
|
313
314
|
require 'xero-ruby/models/payroll_au/pay_item'
|
314
315
|
require 'xero-ruby/models/payroll_au/pay_items'
|
316
|
+
require 'xero-ruby/models/payroll_au/pay_out_type'
|
315
317
|
require 'xero-ruby/models/payroll_au/pay_run'
|
316
318
|
require 'xero-ruby/models/payroll_au/pay_run_status'
|
317
319
|
require 'xero-ruby/models/payroll_au/pay_runs'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xero-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xero API Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -368,8 +368,10 @@ files:
|
|
368
368
|
- lib/xero-ruby/models/payroll_au/leave_type_contribution_type.rb
|
369
369
|
- lib/xero-ruby/models/payroll_au/manual_tax_type.rb
|
370
370
|
- lib/xero-ruby/models/payroll_au/opening_balances.rb
|
371
|
+
- lib/xero-ruby/models/payroll_au/paid_leave_earnings_line.rb
|
371
372
|
- lib/xero-ruby/models/payroll_au/pay_item.rb
|
372
373
|
- lib/xero-ruby/models/payroll_au/pay_items.rb
|
374
|
+
- lib/xero-ruby/models/payroll_au/pay_out_type.rb
|
373
375
|
- lib/xero-ruby/models/payroll_au/pay_run.rb
|
374
376
|
- lib/xero-ruby/models/payroll_au/pay_run_status.rb
|
375
377
|
- lib/xero-ruby/models/payroll_au/pay_runs.rb
|
@@ -1105,7 +1107,7 @@ homepage: https://developer.xero.com
|
|
1105
1107
|
licenses:
|
1106
1108
|
- Unlicense
|
1107
1109
|
metadata: {}
|
1108
|
-
post_install_message:
|
1110
|
+
post_install_message:
|
1109
1111
|
rdoc_options: []
|
1110
1112
|
require_paths:
|
1111
1113
|
- lib
|
@@ -1120,8 +1122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1120
1122
|
- !ruby/object:Gem::Version
|
1121
1123
|
version: '0'
|
1122
1124
|
requirements: []
|
1123
|
-
rubygems_version: 3.
|
1124
|
-
signing_key:
|
1125
|
+
rubygems_version: 3.1.6
|
1126
|
+
signing_key:
|
1125
1127
|
specification_version: 4
|
1126
1128
|
summary: Xero Accounting API Ruby Gem
|
1127
1129
|
test_files:
|