xero-ruby 3.7.0 → 3.9.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/accounting_api.rb +75 -0
- data/lib/xero-ruby/models/accounting/organisation.rb +9 -6
- data/lib/xero-ruby/models/accounting/tax_rate.rb +9 -2
- data/lib/xero-ruby/models/accounting/tax_type.rb +7 -0
- data/lib/xero-ruby/models/app_store/product.rb +22 -11
- data/lib/xero-ruby/models/app_store/subscription_item.rb +11 -1
- data/lib/xero-ruby/models/finance/bank_transaction_response.rb +1 -1
- data/lib/xero-ruby/models/finance/payment_response.rb +1 -1
- data/lib/xero-ruby/models/finance/statement_line_response.rb +2 -2
- data/lib/xero-ruby/models/finance/statement_response.rb +24 -4
- data/lib/xero-ruby/models/payroll_uk/employment.rb +8 -3
- data/lib/xero-ruby/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9da0e17f450205612e5090cdb258485529efa412eadc1ead5c564050d68b51d9
|
4
|
+
data.tar.gz: f06c54f4fd72e7dd1281a6960beb82969899d9015f2e14cf737018596199cb73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 602762907bb324d2a7f308418f3789602e077d32621b5329e3d4a83154524b0981b1876f99a655cb978b40514cfcc63fd63509e5117af567c097c4affd38655e
|
7
|
+
data.tar.gz: fbaddb461ba6b3db40c906e6195012b591e076ee2dc7248d4501621e4fa5dbb3c9cefa134317a4f76d3218d909ce7a302bdcaa9449fd970cc7d43d98356c08a8
|
@@ -9952,6 +9952,81 @@ module XeroRuby
|
|
9952
9952
|
return data, status_code, headers
|
9953
9953
|
end
|
9954
9954
|
|
9955
|
+
# Retrieves a specific journal using a unique journal number.
|
9956
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
9957
|
+
# @param journal_number [Integer] Number of a Journal
|
9958
|
+
# @param [Hash] opts the optional parameters
|
9959
|
+
# @return [Journals]
|
9960
|
+
def get_journal_by_number(xero_tenant_id, journal_number, opts = {})
|
9961
|
+
data, _status_code, _headers = get_journal_by_number_with_http_info(xero_tenant_id, journal_number, opts)
|
9962
|
+
data
|
9963
|
+
end
|
9964
|
+
|
9965
|
+
# Retrieves a specific journal using a unique journal number.
|
9966
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
9967
|
+
# @param journal_number [Integer] Number of a Journal
|
9968
|
+
# @param [Hash] opts the optional parameters
|
9969
|
+
# @return [Array<(Journals, Integer, Hash)>] Journals data, response status code and response headers
|
9970
|
+
def get_journal_by_number_with_http_info(xero_tenant_id, journal_number, options = {})
|
9971
|
+
opts = options.dup
|
9972
|
+
if @api_client.config.debugging
|
9973
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_journal_by_number ...'
|
9974
|
+
end
|
9975
|
+
# verify the required parameter 'xero_tenant_id' is set
|
9976
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
9977
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_journal_by_number"
|
9978
|
+
end
|
9979
|
+
# verify the required parameter 'journal_number' is set
|
9980
|
+
if @api_client.config.client_side_validation && journal_number.nil?
|
9981
|
+
fail ArgumentError, "Missing the required parameter 'journal_number' when calling AccountingApi.get_journal_by_number"
|
9982
|
+
end
|
9983
|
+
# resource path
|
9984
|
+
local_var_path = '/Journals/{JournalNumber}'.sub('{' + 'JournalNumber' + '}', journal_number.to_s)
|
9985
|
+
|
9986
|
+
# camelize keys of incoming `where` opts
|
9987
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
9988
|
+
|
9989
|
+
# query parameters
|
9990
|
+
query_params = opts[:query_params] || {}
|
9991
|
+
|
9992
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
9993
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
9994
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
9995
|
+
|
9996
|
+
# header parameters
|
9997
|
+
header_params = opts[:header_params] || {}
|
9998
|
+
# HTTP header 'Accept' (if needed)
|
9999
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
10000
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
10001
|
+
|
10002
|
+
# form parameters
|
10003
|
+
form_params = opts[:form_params] || {}
|
10004
|
+
|
10005
|
+
# http body (model)
|
10006
|
+
post_body = opts[:body]
|
10007
|
+
|
10008
|
+
# return_type
|
10009
|
+
return_type = opts[:return_type] || 'Journals'
|
10010
|
+
|
10011
|
+
# auth_names
|
10012
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
10013
|
+
|
10014
|
+
new_options = opts.merge(
|
10015
|
+
:header_params => header_params,
|
10016
|
+
:query_params => query_params,
|
10017
|
+
:form_params => form_params,
|
10018
|
+
:body => post_body,
|
10019
|
+
:auth_names => auth_names,
|
10020
|
+
:return_type => return_type
|
10021
|
+
)
|
10022
|
+
|
10023
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
10024
|
+
if @api_client.config.debugging
|
10025
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_journal_by_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10026
|
+
end
|
10027
|
+
return data, status_code, headers
|
10028
|
+
end
|
10029
|
+
|
9955
10030
|
# Retrieves journals
|
9956
10031
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
9957
10032
|
# @param [Hash] opts the optional parameters
|
@@ -50,6 +50,7 @@ module XeroRuby::Accounting
|
|
50
50
|
COMPANY ||= "COMPANY".freeze
|
51
51
|
CHARITY ||= "CHARITY".freeze
|
52
52
|
CLUB_OR_SOCIETY ||= "CLUB_OR_SOCIETY".freeze
|
53
|
+
INDIVIDUAL ||= "INDIVIDUAL".freeze
|
53
54
|
LOOK_THROUGH_COMPANY ||= "LOOK_THROUGH_COMPANY".freeze
|
54
55
|
NOT_FOR_PROFIT ||= "NOT_FOR_PROFIT".freeze
|
55
56
|
PARTNERSHIP ||= "PARTNERSHIP".freeze
|
@@ -139,6 +140,7 @@ module XeroRuby::Accounting
|
|
139
140
|
COMPANY ||= "COMPANY".freeze
|
140
141
|
CHARITY ||= "CHARITY".freeze
|
141
142
|
CLUB_OR_SOCIETY ||= "CLUB_OR_SOCIETY".freeze
|
143
|
+
INDIVIDUAL ||= "INDIVIDUAL".freeze
|
142
144
|
LOOK_THROUGH_COMPANY ||= "LOOK_THROUGH_COMPANY".freeze
|
143
145
|
NOT_FOR_PROFIT ||= "NOT_FOR_PROFIT".freeze
|
144
146
|
PARTNERSHIP ||= "PARTNERSHIP".freeze
|
@@ -164,6 +166,7 @@ module XeroRuby::Accounting
|
|
164
166
|
LEDGER ||= "LEDGER".freeze
|
165
167
|
GST_CASHBOOK ||= "GST_CASHBOOK".freeze
|
166
168
|
NON_GST_CASHBOOK ||= "NON_GST_CASHBOOK".freeze
|
169
|
+
ULTIMATE ||= "ULTIMATE".freeze
|
167
170
|
|
168
171
|
# BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
|
169
172
|
attr_accessor :edition
|
@@ -451,15 +454,15 @@ module XeroRuby::Accounting
|
|
451
454
|
def valid?
|
452
455
|
version_validator = EnumAttributeValidator.new('String', ["AU", "NZ", "GLOBAL", "UK", "US", "AUONRAMP", "NZONRAMP", "GLOBALONRAMP", "UKONRAMP", "USONRAMP"])
|
453
456
|
return false unless version_validator.valid?(@version)
|
454
|
-
organisation_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"])
|
457
|
+
organisation_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"])
|
455
458
|
return false unless organisation_type_validator.valid?(@organisation_type)
|
456
459
|
sales_tax_basis_validator = EnumAttributeValidator.new('String', ["PAYMENTS", "INVOICE", "NONE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS"])
|
457
460
|
return false unless sales_tax_basis_validator.valid?(@sales_tax_basis)
|
458
461
|
sales_tax_period_validator = EnumAttributeValidator.new('String', ["MONTHLY", "QUARTERLY1", "QUARTERLY2", "QUARTERLY3", "ANNUALLY", "ONEMONTHS", "TWOMONTHS", "SIXMONTHS", "1MONTHLY", "2MONTHLY", "3MONTHLY", "6MONTHLY", "QUARTERLY", "YEARLY", "NONE"])
|
459
462
|
return false unless sales_tax_period_validator.valid?(@sales_tax_period)
|
460
|
-
organisation_entity_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"])
|
463
|
+
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"])
|
461
464
|
return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
|
462
|
-
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK"])
|
465
|
+
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
|
463
466
|
return false unless _class_validator.valid?(@_class)
|
464
467
|
edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
|
465
468
|
return false unless edition_validator.valid?(@edition)
|
@@ -479,7 +482,7 @@ module XeroRuby::Accounting
|
|
479
482
|
# Custom attribute writer method checking allowed values (enum).
|
480
483
|
# @param [Object] organisation_type Object to be assigned
|
481
484
|
def organisation_type=(organisation_type)
|
482
|
-
validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"])
|
485
|
+
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"])
|
483
486
|
unless validator.valid?(organisation_type)
|
484
487
|
fail ArgumentError, "invalid value for \"organisation_type\", must be one of #{validator.allowable_values}."
|
485
488
|
end
|
@@ -509,7 +512,7 @@ module XeroRuby::Accounting
|
|
509
512
|
# Custom attribute writer method checking allowed values (enum).
|
510
513
|
# @param [Object] organisation_entity_type Object to be assigned
|
511
514
|
def organisation_entity_type=(organisation_entity_type)
|
512
|
-
validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"])
|
515
|
+
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"])
|
513
516
|
unless validator.valid?(organisation_entity_type)
|
514
517
|
fail ArgumentError, "invalid value for \"organisation_entity_type\", must be one of #{validator.allowable_values}."
|
515
518
|
end
|
@@ -519,7 +522,7 @@ module XeroRuby::Accounting
|
|
519
522
|
# Custom attribute writer method checking allowed values (enum).
|
520
523
|
# @param [Object] _class Object to be assigned
|
521
524
|
def _class=(_class)
|
522
|
-
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK"])
|
525
|
+
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE"])
|
523
526
|
unless validator.valid?(_class)
|
524
527
|
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
|
525
528
|
end
|
@@ -108,6 +108,13 @@ module XeroRuby::Accounting
|
|
108
108
|
ZRINPUT ||= "ZRINPUT".freeze
|
109
109
|
BADDEBT ||= "BADDEBT".freeze
|
110
110
|
OTHERINPUT ||= "OTHERINPUT".freeze
|
111
|
+
BADDEBTRELIEF ||= "BADDEBTRELIEF".freeze
|
112
|
+
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
113
|
+
SROVR ||= "SROVR".freeze
|
114
|
+
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
115
|
+
TXRCN33_INPUT ||= "TXRCN33INPUT".freeze
|
116
|
+
TXRCREINPUT ||= "TXRCREINPUT".freeze
|
117
|
+
TXRCESSINPUT ||= "TXRCESSINPUT".freeze
|
111
118
|
|
112
119
|
# Boolean to describe if tax rate can be used for asset accounts i.e. true,false
|
113
120
|
attr_accessor :can_apply_to_assets
|
@@ -266,7 +273,7 @@ module XeroRuby::Accounting
|
|
266
273
|
def valid?
|
267
274
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "DELETED", "ARCHIVED", "PENDING"])
|
268
275
|
return false unless status_validator.valid?(@status)
|
269
|
-
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"])
|
276
|
+
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"])
|
270
277
|
return false unless report_tax_type_validator.valid?(@report_tax_type)
|
271
278
|
true
|
272
279
|
end
|
@@ -284,7 +291,7 @@ module XeroRuby::Accounting
|
|
284
291
|
# Custom attribute writer method checking allowed values (enum).
|
285
292
|
# @param [Object] report_tax_type Object to be assigned
|
286
293
|
def report_tax_type=(report_tax_type)
|
287
|
-
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"])
|
294
|
+
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"])
|
288
295
|
unless validator.valid?(report_tax_type)
|
289
296
|
fail ArgumentError, "invalid value for \"report_tax_type\", must be one of #{validator.allowable_values}."
|
290
297
|
end
|
@@ -73,6 +73,13 @@ module XeroRuby::Accounting
|
|
73
73
|
DRCHARGE20 ||= "DRCHARGE20".freeze
|
74
74
|
DRCHARGESUPPLY5 ||= "DRCHARGESUPPLY5".freeze
|
75
75
|
DRCHARGE5 ||= "DRCHARGE5".freeze
|
76
|
+
BADDEBTRELIEF ||= "BADDEBTRELIEF".freeze
|
77
|
+
IGDSINPUT3 ||= "IGDSINPUT3".freeze
|
78
|
+
SROVR ||= "SROVR".freeze
|
79
|
+
TOURISTREFUND ||= "TOURISTREFUND".freeze
|
80
|
+
TXRCN33_INPUT ||= "TXRCN33INPUT".freeze
|
81
|
+
TXRCREINPUT ||= "TXRCREINPUT".freeze
|
82
|
+
TXRCESSINPUT ||= "TXRCESSINPUT".freeze
|
76
83
|
|
77
84
|
# Builds the enum from string
|
78
85
|
# @param [String] The enum value in the form of the string
|
@@ -22,13 +22,17 @@ module XeroRuby::AppStore
|
|
22
22
|
# The name of the product
|
23
23
|
attr_accessor :name
|
24
24
|
|
25
|
-
# The
|
25
|
+
# The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc
|
26
|
+
attr_accessor :seat_unit
|
27
|
+
|
28
|
+
# The pricing model of the product: * FIXED: Customers are charged a fixed amount for each billing period * PER_SEAT: Customers are charged based on the number of units they purchase * METERED: Customers are charged per use of this product
|
26
29
|
attr_accessor :type
|
27
30
|
FIXED ||= "FIXED".freeze
|
28
31
|
PER_SEAT ||= "PER_SEAT".freeze
|
32
|
+
METERED ||= "METERED".freeze
|
29
33
|
|
30
|
-
# The unit of the
|
31
|
-
attr_accessor :
|
34
|
+
# The unit of the usage product. e.g. \"user\", \"minutes\", \"SMS\", etc
|
35
|
+
attr_accessor :usage_unit
|
32
36
|
|
33
37
|
class EnumAttributeValidator
|
34
38
|
attr_reader :datatype
|
@@ -57,8 +61,9 @@ module XeroRuby::AppStore
|
|
57
61
|
{
|
58
62
|
:'id' => :'id',
|
59
63
|
:'name' => :'name',
|
64
|
+
:'seat_unit' => :'seatUnit',
|
60
65
|
:'type' => :'type',
|
61
|
-
:'
|
66
|
+
:'usage_unit' => :'usageUnit'
|
62
67
|
}
|
63
68
|
end
|
64
69
|
|
@@ -67,8 +72,9 @@ module XeroRuby::AppStore
|
|
67
72
|
{
|
68
73
|
:'id' => :'String',
|
69
74
|
:'name' => :'String',
|
75
|
+
:'seat_unit' => :'String',
|
70
76
|
:'type' => :'String',
|
71
|
-
:'
|
77
|
+
:'usage_unit' => :'String'
|
72
78
|
}
|
73
79
|
end
|
74
80
|
|
@@ -95,12 +101,16 @@ module XeroRuby::AppStore
|
|
95
101
|
self.name = attributes[:'name']
|
96
102
|
end
|
97
103
|
|
104
|
+
if attributes.key?(:'seat_unit')
|
105
|
+
self.seat_unit = attributes[:'seat_unit']
|
106
|
+
end
|
107
|
+
|
98
108
|
if attributes.key?(:'type')
|
99
109
|
self.type = attributes[:'type']
|
100
110
|
end
|
101
111
|
|
102
|
-
if attributes.key?(:'
|
103
|
-
self.
|
112
|
+
if attributes.key?(:'usage_unit')
|
113
|
+
self.usage_unit = attributes[:'usage_unit']
|
104
114
|
end
|
105
115
|
end
|
106
116
|
|
@@ -114,7 +124,7 @@ module XeroRuby::AppStore
|
|
114
124
|
# Check to see if the all the properties in the model are valid
|
115
125
|
# @return true if the model is valid
|
116
126
|
def valid?
|
117
|
-
type_validator = EnumAttributeValidator.new('String', ["FIXED", "PER_SEAT"])
|
127
|
+
type_validator = EnumAttributeValidator.new('String', ["FIXED", "PER_SEAT", "METERED"])
|
118
128
|
return false unless type_validator.valid?(@type)
|
119
129
|
true
|
120
130
|
end
|
@@ -122,7 +132,7 @@ module XeroRuby::AppStore
|
|
122
132
|
# Custom attribute writer method checking allowed values (enum).
|
123
133
|
# @param [Object] type Object to be assigned
|
124
134
|
def type=(type)
|
125
|
-
validator = EnumAttributeValidator.new('String', ["FIXED", "PER_SEAT"])
|
135
|
+
validator = EnumAttributeValidator.new('String', ["FIXED", "PER_SEAT", "METERED"])
|
126
136
|
unless validator.valid?(type)
|
127
137
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
128
138
|
end
|
@@ -136,8 +146,9 @@ module XeroRuby::AppStore
|
|
136
146
|
self.class == o.class &&
|
137
147
|
id == o.id &&
|
138
148
|
name == o.name &&
|
149
|
+
seat_unit == o.seat_unit &&
|
139
150
|
type == o.type &&
|
140
|
-
|
151
|
+
usage_unit == o.usage_unit
|
141
152
|
end
|
142
153
|
|
143
154
|
# @see the `==` method
|
@@ -149,7 +160,7 @@ module XeroRuby::AppStore
|
|
149
160
|
# Calculates hash code according to all attributes.
|
150
161
|
# @return [Integer] Hash code
|
151
162
|
def hash
|
152
|
-
[id, name, type,
|
163
|
+
[id, name, seat_unit, type, usage_unit].hash
|
153
164
|
end
|
154
165
|
|
155
166
|
# Builds the object from hash
|
@@ -28,6 +28,9 @@ module XeroRuby::AppStore
|
|
28
28
|
|
29
29
|
attr_accessor :product
|
30
30
|
|
31
|
+
# The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a positive integer. For metered products, it is always null.
|
32
|
+
attr_accessor :quantity
|
33
|
+
|
31
34
|
# Date the subscription started, or will start. Note: this could be in the future for downgrades or reduced number of seats that haven't taken effect yet.
|
32
35
|
attr_accessor :start_date
|
33
36
|
|
@@ -69,6 +72,7 @@ module XeroRuby::AppStore
|
|
69
72
|
:'id' => :'id',
|
70
73
|
:'price' => :'price',
|
71
74
|
:'product' => :'product',
|
75
|
+
:'quantity' => :'quantity',
|
72
76
|
:'start_date' => :'startDate',
|
73
77
|
:'status' => :'status',
|
74
78
|
:'test_mode' => :'testMode'
|
@@ -82,6 +86,7 @@ module XeroRuby::AppStore
|
|
82
86
|
:'id' => :'String',
|
83
87
|
:'price' => :'Price',
|
84
88
|
:'product' => :'Product',
|
89
|
+
:'quantity' => :'Integer',
|
85
90
|
:'start_date' => :'DateTime',
|
86
91
|
:'status' => :'String',
|
87
92
|
:'test_mode' => :'Boolean'
|
@@ -119,6 +124,10 @@ module XeroRuby::AppStore
|
|
119
124
|
self.product = attributes[:'product']
|
120
125
|
end
|
121
126
|
|
127
|
+
if attributes.key?(:'quantity')
|
128
|
+
self.quantity = attributes[:'quantity']
|
129
|
+
end
|
130
|
+
|
122
131
|
if attributes.key?(:'start_date')
|
123
132
|
self.start_date = attributes[:'start_date']
|
124
133
|
end
|
@@ -191,6 +200,7 @@ module XeroRuby::AppStore
|
|
191
200
|
id == o.id &&
|
192
201
|
price == o.price &&
|
193
202
|
product == o.product &&
|
203
|
+
quantity == o.quantity &&
|
194
204
|
start_date == o.start_date &&
|
195
205
|
status == o.status &&
|
196
206
|
test_mode == o.test_mode
|
@@ -205,7 +215,7 @@ module XeroRuby::AppStore
|
|
205
215
|
# Calculates hash code according to all attributes.
|
206
216
|
# @return [Integer] Hash code
|
207
217
|
def hash
|
208
|
-
[end_date, id, price, product, start_date, status, test_mode].hash
|
218
|
+
[end_date, id, price, product, quantity, start_date, status, test_mode].hash
|
209
219
|
end
|
210
220
|
|
211
221
|
# Builds the object from hash
|
@@ -52,7 +52,7 @@ module XeroRuby::Finance
|
|
52
52
|
:'bank_transaction_id' => :'String',
|
53
53
|
:'batch_payment_id' => :'String',
|
54
54
|
:'contact' => :'ContactResponse',
|
55
|
-
:'date' => :'
|
55
|
+
:'date' => :'Date',
|
56
56
|
:'amount' => :'BigDecimal',
|
57
57
|
:'line_items' => :'Array<LineItemResponse>'
|
58
58
|
}
|
@@ -78,12 +78,12 @@ module XeroRuby::Finance
|
|
78
78
|
def self.openapi_types
|
79
79
|
{
|
80
80
|
:'statement_line_id' => :'String',
|
81
|
-
:'posted_date' => :'
|
81
|
+
:'posted_date' => :'Date',
|
82
82
|
:'reference' => :'String',
|
83
83
|
:'notes' => :'String',
|
84
84
|
:'cheque_no' => :'String',
|
85
85
|
:'amount' => :'BigDecimal',
|
86
|
-
:'transaction_date' => :'
|
86
|
+
:'transaction_date' => :'Date',
|
87
87
|
:'type' => :'String',
|
88
88
|
:'is_reconciled' => :'Boolean',
|
89
89
|
:'is_duplicate' => :'Boolean',
|
@@ -28,9 +28,15 @@ 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
|
+
# Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2) manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the direct solution, may contain the name of the financial institution.
|
32
32
|
attr_accessor :import_source
|
33
33
|
|
34
|
+
# Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied.
|
35
|
+
attr_accessor :start_balance
|
36
|
+
|
37
|
+
# Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied.
|
38
|
+
attr_accessor :end_balance
|
39
|
+
|
34
40
|
# List of statement lines
|
35
41
|
attr_accessor :statement_lines
|
36
42
|
|
@@ -42,6 +48,8 @@ module XeroRuby::Finance
|
|
42
48
|
:'end_date' => :'endDate',
|
43
49
|
:'imported_date_time_utc' => :'importedDateTimeUtc',
|
44
50
|
:'import_source' => :'importSource',
|
51
|
+
:'start_balance' => :'startBalance',
|
52
|
+
:'end_balance' => :'endBalance',
|
45
53
|
:'statement_lines' => :'statementLines'
|
46
54
|
}
|
47
55
|
end
|
@@ -50,10 +58,12 @@ module XeroRuby::Finance
|
|
50
58
|
def self.openapi_types
|
51
59
|
{
|
52
60
|
:'statement_id' => :'String',
|
53
|
-
:'start_date' => :'
|
54
|
-
:'end_date' => :'
|
61
|
+
:'start_date' => :'Date',
|
62
|
+
:'end_date' => :'Date',
|
55
63
|
:'imported_date_time_utc' => :'DateTime',
|
56
64
|
:'import_source' => :'String',
|
65
|
+
:'start_balance' => :'BigDecimal',
|
66
|
+
:'end_balance' => :'BigDecimal',
|
57
67
|
:'statement_lines' => :'Array<StatementLineResponse>'
|
58
68
|
}
|
59
69
|
end
|
@@ -93,6 +103,14 @@ module XeroRuby::Finance
|
|
93
103
|
self.import_source = attributes[:'import_source']
|
94
104
|
end
|
95
105
|
|
106
|
+
if attributes.key?(:'start_balance')
|
107
|
+
self.start_balance = attributes[:'start_balance']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'end_balance')
|
111
|
+
self.end_balance = attributes[:'end_balance']
|
112
|
+
end
|
113
|
+
|
96
114
|
if attributes.key?(:'statement_lines')
|
97
115
|
if (value = attributes[:'statement_lines']).is_a?(Array)
|
98
116
|
self.statement_lines = value
|
@@ -123,6 +141,8 @@ module XeroRuby::Finance
|
|
123
141
|
end_date == o.end_date &&
|
124
142
|
imported_date_time_utc == o.imported_date_time_utc &&
|
125
143
|
import_source == o.import_source &&
|
144
|
+
start_balance == o.start_balance &&
|
145
|
+
end_balance == o.end_balance &&
|
126
146
|
statement_lines == o.statement_lines
|
127
147
|
end
|
128
148
|
|
@@ -135,7 +155,7 @@ module XeroRuby::Finance
|
|
135
155
|
# Calculates hash code according to all attributes.
|
136
156
|
# @return [Integer] Hash code
|
137
157
|
def hash
|
138
|
-
[statement_id, start_date, end_date, imported_date_time_utc, import_source, statement_lines].hash
|
158
|
+
[statement_id, start_date, end_date, imported_date_time_utc, import_source, start_balance, end_balance, statement_lines].hash
|
139
159
|
end
|
140
160
|
|
141
161
|
# Builds the object from hash
|
@@ -30,11 +30,16 @@ module XeroRuby::PayrollUk
|
|
30
30
|
A ||= "A".freeze
|
31
31
|
B ||= "B".freeze
|
32
32
|
C ||= "C".freeze
|
33
|
+
F ||= "F".freeze
|
33
34
|
H ||= "H".freeze
|
35
|
+
I ||= "I".freeze
|
34
36
|
J ||= "J".freeze
|
37
|
+
L ||= "L".freeze
|
35
38
|
M ||= "M".freeze
|
36
|
-
|
39
|
+
S ||= "S".freeze
|
40
|
+
V ||= "V".freeze
|
37
41
|
X ||= "X".freeze
|
42
|
+
Z ||= "Z".freeze
|
38
43
|
|
39
44
|
class EnumAttributeValidator
|
40
45
|
attr_reader :datatype
|
@@ -120,7 +125,7 @@ module XeroRuby::PayrollUk
|
|
120
125
|
# Check to see if the all the properties in the model are valid
|
121
126
|
# @return true if the model is valid
|
122
127
|
def valid?
|
123
|
-
ni_category_validator = EnumAttributeValidator.new('String', ["A", "B", "C", "H", "J", "M", "
|
128
|
+
ni_category_validator = EnumAttributeValidator.new('String', ["A", "B", "C", "F", "H", "I", "J", "L", "M", "S", "V", "X", "Z"])
|
124
129
|
return false unless ni_category_validator.valid?(@ni_category)
|
125
130
|
true
|
126
131
|
end
|
@@ -128,7 +133,7 @@ module XeroRuby::PayrollUk
|
|
128
133
|
# Custom attribute writer method checking allowed values (enum).
|
129
134
|
# @param [Object] ni_category Object to be assigned
|
130
135
|
def ni_category=(ni_category)
|
131
|
-
validator = EnumAttributeValidator.new('String', ["A", "B", "C", "H", "J", "M", "
|
136
|
+
validator = EnumAttributeValidator.new('String', ["A", "B", "C", "F", "H", "I", "J", "L", "M", "S", "V", "X", "Z"])
|
132
137
|
unless validator.valid?(ni_category)
|
133
138
|
fail ArgumentError, "invalid value for \"ni_category\", must be one of #{validator.allowable_values}."
|
134
139
|
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.22.4
|
11
11
|
=end
|
12
12
|
|
13
13
|
module XeroRuby
|
14
|
-
VERSION = '3.
|
14
|
+
VERSION = '3.9.0'
|
15
15
|
end
|
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.9.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-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|