xero-ruby 3.11.0 → 3.13.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/accounting_api.rb +75 -0
- data/lib/xero-ruby/api/project_api.rb +5 -5
- data/lib/xero-ruby/api_client.rb +7 -1
- data/lib/xero-ruby/models/accounting/account.rb +1 -1
- data/lib/xero-ruby/models/accounting/journal_line.rb +1 -1
- data/lib/xero-ruby/models/accounting/organisation.rb +3 -2
- data/lib/xero-ruby/models/accounting/tax_rate.rb +9 -2
- data/lib/xero-ruby/models/payroll_au/employee.rb +1 -1
- data/lib/xero-ruby/models/payroll_au/leave_category_code.rb +46 -0
- data/lib/xero-ruby/models/payroll_au/leave_type.rb +24 -4
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64166b3675aaf064c236cd859fc18a4b51a6cadd80be862894bab7b556dfd7cf
|
4
|
+
data.tar.gz: cdebb07a417fb45d1e2b1afb372ef538f8833761cd5b5be5b5af4cecb743e2a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b58cddfacc52ba933664a360e62af2d3ed061c9f561d0dbd83ed4e49084009be76a0ec4532c3aa87d8b00dfac8cbf931849d66a0f47c1d2da637b31ecf07886
|
7
|
+
data.tar.gz: a408135c0687635c65bde9a5af6cbd4d587452e34541c85f8c6c20239a34613d4352ba6b7b68021d6fb56d3c4d81c205e7a67839a2388e4fccb2aaa106ba5740
|
@@ -6886,6 +6886,81 @@ module XeroRuby
|
|
6886
6886
|
return data, status_code, headers
|
6887
6887
|
end
|
6888
6888
|
|
6889
|
+
# Retrieves a specific batch payment using a unique batch payment Id
|
6890
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6891
|
+
# @param batch_payment_id [String] Unique identifier for BatchPayment
|
6892
|
+
# @param [Hash] opts the optional parameters
|
6893
|
+
# @return [BatchPayments]
|
6894
|
+
def get_batch_payment(xero_tenant_id, batch_payment_id, opts = {})
|
6895
|
+
data, _status_code, _headers = get_batch_payment_with_http_info(xero_tenant_id, batch_payment_id, opts)
|
6896
|
+
data
|
6897
|
+
end
|
6898
|
+
|
6899
|
+
# Retrieves a specific batch payment using a unique batch payment Id
|
6900
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6901
|
+
# @param batch_payment_id [String] Unique identifier for BatchPayment
|
6902
|
+
# @param [Hash] opts the optional parameters
|
6903
|
+
# @return [Array<(BatchPayments, Integer, Hash)>] BatchPayments data, response status code and response headers
|
6904
|
+
def get_batch_payment_with_http_info(xero_tenant_id, batch_payment_id, options = {})
|
6905
|
+
opts = options.dup
|
6906
|
+
if @api_client.config.debugging
|
6907
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_batch_payment ...'
|
6908
|
+
end
|
6909
|
+
# verify the required parameter 'xero_tenant_id' is set
|
6910
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
6911
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_batch_payment"
|
6912
|
+
end
|
6913
|
+
# verify the required parameter 'batch_payment_id' is set
|
6914
|
+
if @api_client.config.client_side_validation && batch_payment_id.nil?
|
6915
|
+
fail ArgumentError, "Missing the required parameter 'batch_payment_id' when calling AccountingApi.get_batch_payment"
|
6916
|
+
end
|
6917
|
+
# resource path
|
6918
|
+
local_var_path = '/BatchPayments/{BatchPaymentID}'.sub('{' + 'BatchPaymentID' + '}', batch_payment_id.to_s)
|
6919
|
+
|
6920
|
+
# camelize keys of incoming `where` opts
|
6921
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
6922
|
+
|
6923
|
+
# query parameters
|
6924
|
+
query_params = opts[:query_params] || {}
|
6925
|
+
|
6926
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
6927
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
6928
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
6929
|
+
|
6930
|
+
# header parameters
|
6931
|
+
header_params = opts[:header_params] || {}
|
6932
|
+
# HTTP header 'Accept' (if needed)
|
6933
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
6934
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
6935
|
+
|
6936
|
+
# form parameters
|
6937
|
+
form_params = opts[:form_params] || {}
|
6938
|
+
|
6939
|
+
# http body (model)
|
6940
|
+
post_body = opts[:body]
|
6941
|
+
|
6942
|
+
# return_type
|
6943
|
+
return_type = opts[:return_type] || 'BatchPayments'
|
6944
|
+
|
6945
|
+
# auth_names
|
6946
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
6947
|
+
|
6948
|
+
new_options = opts.merge(
|
6949
|
+
:header_params => header_params,
|
6950
|
+
:query_params => query_params,
|
6951
|
+
:form_params => form_params,
|
6952
|
+
:body => post_body,
|
6953
|
+
:auth_names => auth_names,
|
6954
|
+
:return_type => return_type
|
6955
|
+
)
|
6956
|
+
|
6957
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
6958
|
+
if @api_client.config.debugging
|
6959
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_batch_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
6960
|
+
end
|
6961
|
+
return data, status_code, headers
|
6962
|
+
end
|
6963
|
+
|
6889
6964
|
# Retrieves history from a specific batch payment
|
6890
6965
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6891
6966
|
# @param batch_payment_id [String] Unique identifier for BatchPayment
|
@@ -99,10 +99,10 @@ module XeroRuby
|
|
99
99
|
# @param project_id [String] You can create a task on a specified projectId
|
100
100
|
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are creating
|
101
101
|
# @param [Hash] opts the optional parameters
|
102
|
-
# @return [
|
102
|
+
# @return [Task]
|
103
103
|
def create_task(xero_tenant_id, project_id, task_create_or_update, opts = {})
|
104
|
-
create_task_with_http_info(xero_tenant_id, project_id, task_create_or_update, opts)
|
105
|
-
|
104
|
+
data, _status_code, _headers = create_task_with_http_info(xero_tenant_id, project_id, task_create_or_update, opts)
|
105
|
+
data
|
106
106
|
end
|
107
107
|
|
108
108
|
# Allows you to create a task
|
@@ -111,7 +111,7 @@ module XeroRuby
|
|
111
111
|
# @param project_id [String] You can create a task on a specified projectId
|
112
112
|
# @param task_create_or_update [TaskCreateOrUpdate] The task object you are creating
|
113
113
|
# @param [Hash] opts the optional parameters
|
114
|
-
# @return [Array<(
|
114
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
115
115
|
def create_task_with_http_info(xero_tenant_id, project_id, task_create_or_update, options = {})
|
116
116
|
opts = options.dup
|
117
117
|
if @api_client.config.debugging
|
@@ -157,7 +157,7 @@ module XeroRuby
|
|
157
157
|
post_body = opts[:body] || @api_client.object_to_http_body(task_create_or_update)
|
158
158
|
|
159
159
|
# return_type
|
160
|
-
return_type = opts[:return_type]
|
160
|
+
return_type = opts[:return_type] || 'Task'
|
161
161
|
|
162
162
|
# auth_names
|
163
163
|
auth_names = opts[:auth_names] || ['OAuth2']
|
data/lib/xero-ruby/api_client.rb
CHANGED
@@ -196,7 +196,12 @@ module XeroRuby
|
|
196
196
|
|
197
197
|
def decode_jwt(tkn, verify=true)
|
198
198
|
if verify == true
|
199
|
-
|
199
|
+
|
200
|
+
response = Faraday.get('https://identity.xero.com/.well-known/openid-configuration/jwks') do |req|
|
201
|
+
req.headers['User-Agent'] = @user_agent
|
202
|
+
end
|
203
|
+
|
204
|
+
jwks_data = JSON.parse(response.body)
|
200
205
|
jwk_set = JSON::JWK::Set.new(jwks_data)
|
201
206
|
JSON::JWT.decode(tkn, jwk_set)
|
202
207
|
else
|
@@ -230,6 +235,7 @@ module XeroRuby
|
|
230
235
|
response = Faraday.post("#{@config.token_url}#{path}") do |req|
|
231
236
|
req.headers['Authorization'] = "Basic " + Base64.strict_encode64("#{@client_id}:#{@client_secret}")
|
232
237
|
req.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
238
|
+
req.headers['User-Agent'] = @user_agent
|
233
239
|
req.body = URI.encode_www_form(data)
|
234
240
|
end
|
235
241
|
return_error(response) unless response.success?
|
@@ -167,6 +167,7 @@ module XeroRuby::Accounting
|
|
167
167
|
GST_CASHBOOK ||= "GST_CASHBOOK".freeze
|
168
168
|
NON_GST_CASHBOOK ||= "NON_GST_CASHBOOK".freeze
|
169
169
|
ULTIMATE ||= "ULTIMATE".freeze
|
170
|
+
LITE ||= "LITE".freeze
|
170
171
|
|
171
172
|
# BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
|
172
173
|
attr_accessor :edition
|
@@ -462,7 +463,7 @@ module XeroRuby::Accounting
|
|
462
463
|
return false unless sales_tax_period_validator.valid?(@sales_tax_period)
|
463
464
|
organisation_entity_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "INDIVIDUAL", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"])
|
464
465
|
return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
|
465
|
-
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
|
466
|
+
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE"])
|
466
467
|
return false unless _class_validator.valid?(@_class)
|
467
468
|
edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
|
468
469
|
return false unless edition_validator.valid?(@edition)
|
@@ -522,7 +523,7 @@ module XeroRuby::Accounting
|
|
522
523
|
# Custom attribute writer method checking allowed values (enum).
|
523
524
|
# @param [Object] _class Object to be assigned
|
524
525
|
def _class=(_class)
|
525
|
-
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
|
526
|
+
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE"])
|
526
527
|
unless validator.valid?(_class)
|
527
528
|
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
|
528
529
|
end
|
@@ -116,6 +116,13 @@ module XeroRuby::Accounting
|
|
116
116
|
TXRCREINPUT ||= "TXRCREINPUT".freeze
|
117
117
|
TXRCESSINPUT ||= "TXRCESSINPUT".freeze
|
118
118
|
TXRCTSINPUT ||= "TXRCTSINPUT".freeze
|
119
|
+
CAPEXINPUT ||= "CAPEXINPUT".freeze
|
120
|
+
UNDEFINED ||= "UNDEFINED".freeze
|
121
|
+
CAPEXOUTPUT ||= "CAPEXOUTPUT".freeze
|
122
|
+
ZEROEXPOUTPUT ||= "ZEROEXPOUTPUT".freeze
|
123
|
+
GOODSIMPORT ||= "GOODSIMPORT".freeze
|
124
|
+
NONEINPUT ||= "NONEINPUT".freeze
|
125
|
+
NOTREPORTED ||= "NOTREPORTED".freeze
|
119
126
|
|
120
127
|
# Boolean to describe if tax rate can be used for asset accounts i.e. true,false
|
121
128
|
attr_accessor :can_apply_to_assets
|
@@ -274,7 +281,7 @@ module XeroRuby::Accounting
|
|
274
281
|
def valid?
|
275
282
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "DELETED", "ARCHIVED", "PENDING"])
|
276
283
|
return false unless status_validator.valid?(@status)
|
277
|
-
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", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT", "TXRCTSINPUT"])
|
284
|
+
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", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT", "TXRCTSINPUT", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED"])
|
278
285
|
return false unless report_tax_type_validator.valid?(@report_tax_type)
|
279
286
|
true
|
280
287
|
end
|
@@ -292,7 +299,7 @@ module XeroRuby::Accounting
|
|
292
299
|
# Custom attribute writer method checking allowed values (enum).
|
293
300
|
# @param [Object] report_tax_type Object to be assigned
|
294
301
|
def report_tax_type=(report_tax_type)
|
295
|
-
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", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT", "TXRCTSINPUT"])
|
302
|
+
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", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT", "TXRCTSINPUT", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED"])
|
296
303
|
unless validator.valid?(report_tax_type)
|
297
304
|
fail ArgumentError, "invalid value for \"report_tax_type\", must be one of #{validator.allowable_values}."
|
298
305
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
=begin
|
2
|
+
#Xero Payroll AU API
|
3
|
+
|
4
|
+
#This is the Xero Payroll API for orgs in Australia region.
|
5
|
+
|
6
|
+
Contact: api@xero.com
|
7
|
+
Generated by: https://openapi-generator.tech
|
8
|
+
OpenAPI Generator version: 4.3.1
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'time'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module XeroRuby::PayrollAu
|
16
|
+
class LeaveCategoryCode
|
17
|
+
ANNUALLEAVE ||= "ANNUALLEAVE".freeze
|
18
|
+
LONGSERVICELEAVE ||= "LONGSERVICELEAVE".freeze
|
19
|
+
PERSONALSICKCARERSLEAVE ||= "PERSONALSICKCARERSLEAVE".freeze
|
20
|
+
ROSTEREDDAYOFF ||= "ROSTEREDDAYOFF".freeze
|
21
|
+
TIMEOFFINLIEU ||= "TIMEOFFINLIEU".freeze
|
22
|
+
COMPASSIONATEANDBEREAVEMENTLEAVE ||= "COMPASSIONATEANDBEREAVEMENTLEAVE".freeze
|
23
|
+
STUDYLEAVE ||= "STUDYLEAVE".freeze
|
24
|
+
FAMILYANDDOMESTICVIOLENCELEAVE ||= "FAMILYANDDOMESTICVIOLENCELEAVE".freeze
|
25
|
+
SPECIALPAIDLEAVE ||= "SPECIALPAIDLEAVE".freeze
|
26
|
+
COMMUNITYSERVICELEAVE ||= "COMMUNITYSERVICELEAVE".freeze
|
27
|
+
JURYDUTYLEAVE ||= "JURYDUTYLEAVE".freeze
|
28
|
+
DEFENCERESERVELEAVE ||= "DEFENCERESERVELEAVE".freeze
|
29
|
+
|
30
|
+
# Builds the enum from string
|
31
|
+
# @param [String] The enum value in the form of the string
|
32
|
+
# @return [String] The enum value
|
33
|
+
def self.build_from_hash(value)
|
34
|
+
new.build_from_hash(value)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Builds the enum from string
|
38
|
+
# @param [String] The enum value in the form of the string
|
39
|
+
# @return [String] The enum value
|
40
|
+
def build_from_hash(value)
|
41
|
+
constantValues = LeaveCategoryCode.constants.select { |c| LeaveCategoryCode::const_get(c) == value }
|
42
|
+
raise "Invalid ENUM value #{value} for class #LeaveCategoryCode" if constantValues.empty?
|
43
|
+
value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -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
|
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.29.3
|
11
11
|
=end
|
12
12
|
|
13
13
|
module XeroRuby
|
14
|
-
VERSION = '3.
|
14
|
+
VERSION = '3.13.0'
|
15
15
|
end
|
data/lib/xero-ruby.rb
CHANGED
@@ -292,6 +292,7 @@ require 'xero-ruby/models/payroll_au/leave_accrual_line'
|
|
292
292
|
require 'xero-ruby/models/payroll_au/leave_application'
|
293
293
|
require 'xero-ruby/models/payroll_au/leave_applications'
|
294
294
|
require 'xero-ruby/models/payroll_au/leave_balance'
|
295
|
+
require 'xero-ruby/models/payroll_au/leave_category_code'
|
295
296
|
require 'xero-ruby/models/payroll_au/leave_earnings_line'
|
296
297
|
require 'xero-ruby/models/payroll_au/leave_line'
|
297
298
|
require 'xero-ruby/models/payroll_au/leave_line_calculation_type'
|
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: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xero API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -350,6 +350,7 @@ files:
|
|
350
350
|
- lib/xero-ruby/models/payroll_au/leave_application.rb
|
351
351
|
- lib/xero-ruby/models/payroll_au/leave_applications.rb
|
352
352
|
- lib/xero-ruby/models/payroll_au/leave_balance.rb
|
353
|
+
- lib/xero-ruby/models/payroll_au/leave_category_code.rb
|
353
354
|
- lib/xero-ruby/models/payroll_au/leave_earnings_line.rb
|
354
355
|
- lib/xero-ruby/models/payroll_au/leave_line.rb
|
355
356
|
- lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb
|
@@ -1109,7 +1110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1109
1110
|
- !ruby/object:Gem::Version
|
1110
1111
|
version: '0'
|
1111
1112
|
requirements: []
|
1112
|
-
rubygems_version: 3.
|
1113
|
+
rubygems_version: 3.1.6
|
1113
1114
|
signing_key:
|
1114
1115
|
specification_version: 4
|
1115
1116
|
summary: Xero Accounting API Ruby Gem
|