Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
xero-ruby (16.0.0)
xero-ruby (17.0.0)
faraday (>= 2.0, < 3.0)
json (~> 2.1, >= 2.1.0)
json-jwt (~> 1.16, >= 1.16.3)
Expand Down
4 changes: 2 additions & 2 deletions docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4198,7 +4198,7 @@
"Class" : {
"type" : "string",
"description" : "Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)",
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE" ]
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE", "ULTRA" ]
},
"Edition" : {
"type" : "string",
Expand Down Expand Up @@ -6361,7 +6361,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
<li data-group="Accounting" data-name="createAccount" class="">
<a href="#api-Accounting-createAccount">createAccount</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/app_store/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="AppStore"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="AppStore"><a href="#api-AppStore">Methods</a></li>
<li data-group="AppStore" data-name="getSubscription" class="">
<a href="#api-AppStore-getSubscription">getSubscription</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Asset"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="Asset"><a href="#api-Asset">Methods</a></li>
<li data-group="Asset" data-name="createAsset" class="">
<a href="#api-Asset-createAsset">createAsset</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
<li data-group="Files" data-name="createFileAssociation" class="">
<a href="#api-Files-createFileAssociation">createFileAssociation</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2376,7 +2376,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Finance"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
<li data-group="Finance" data-name="getBankStatementAccounting" class="">
<a href="#api-Finance-getBankStatementAccounting">getBankStatementAccounting</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_au/EarningsRate.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**is_exempt_from_tax** | **Boolean** | Most payments are subject to tax, so you should only set this value if you are sure that a payment is exempt from PAYG withholding | [optional]
**is_exempt_from_super** | **Boolean** | See the ATO website for details of which payments are exempt from SGC | [optional]
**is_reportable_as_w1** | **Boolean** | Boolean to determine if the earnings rate is reportable or exempt from W1 | [optional]
**is_qualifying_earnings** | **Boolean** | Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings | [optional]
**is_qualifying_earnings** | **Boolean** | Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations |
**allowance_contributes_to_annual_leave_rate** | **Boolean** | Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT | [optional]
**allowance_contributes_to_overtime_rate** | **Boolean** | Boolean to determine if the allowance earnings rate contributes towards overtime allowance rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT | [optional]
**earnings_type** | [**EarningsType**](EarningsType.md) | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_au/LeaveLine.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**entitlement_final_pay_payout_type** | [**EntitlementFinalPayPayoutType**](EntitlementFinalPayPayoutType.md) | | [optional]
**employment_termination_payment_type** | [**EmploymentTerminationPaymentType**](EmploymentTerminationPaymentType.md) | | [optional]
**include_superannuation_guarantee_contribution** | **Boolean** | amount of leave line | [optional]
**is_qualifying_earnings** | **Boolean** | Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on superannuation settings | [optional]
**is_qualifying_earnings** | **Boolean** | Boolean to determine if the leave line is considered as qualifying earnings for superannuation guarantee calculations |
**number_of_units** | **BigDecimal** | Number of units for leave line. | [optional]
**annual_number_of_units** | **BigDecimal** | Hours of leave accrued each year | [optional]
**full_time_number_of_units_per_period** | **BigDecimal** | Normal ordinary earnings number of units for leave line. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_au/LeaveType.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**current_record** | **Boolean** | Is the current record | [optional]
**leave_category_code** | [**LeaveCategoryCode**](LeaveCategoryCode.md) | | [optional]
**sgc_exempt** | **Boolean** | Set this to indicate that the leave type is exempt from superannuation guarantee contribution | [optional]
**is_qualifying_earnings** | **Boolean** | Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings | [optional]
**is_qualifying_earnings** | **Boolean** | Boolean to determine if the leave type is considered as qualifying earnings for superannuation guarantee calculations |

## Code Sample

Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_au/TaxDeclaration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Name | Type | Description | Notes
**has_student_startup_loan** | **Boolean** | If the employee is eligible for student startup loan rules | [optional]
**has_loan_or_student_debt** | **Boolean** | If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL) | [optional]
**updated_date_utc** | **DateTime** | Last modified timestamp | [optional]
**include_leave_loading_in_qualifying_earnings** | **Boolean** | Optional Boolean to determine if leave loading is considered as qualifying earnings for superannuation guarantee calculations | [optional]
**include_leave_loading_in_qualifying_earnings** | **Boolean** | Boolean to determine if leave loading is considered as qualifying earnings for superannuation guarantee calculations. Required when IncludeLeaveLoadingInSGC is specified in the payload | [optional]

## Code Sample

Expand Down
13 changes: 8 additions & 5 deletions docs/payroll_au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@
};
defs["EarningsRate"] = {
"title" : "",
"required" : [ "IsQualifyingEarnings" ],
"type" : "object",
"properties" : {
"Name" : {
Expand Down Expand Up @@ -1184,7 +1185,7 @@
},
"IsQualifyingEarnings" : {
"type" : "boolean",
"description" : "Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings",
"description" : "Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations",
"example" : true
},
"AllowanceContributesToAnnualLeaveRate" : {
Expand Down Expand Up @@ -1713,6 +1714,7 @@
};
defs["LeaveLine"] = {
"title" : "",
"required" : [ "IsQualifyingEarnings" ],
"type" : "object",
"properties" : {
"LeaveTypeID" : {
Expand All @@ -1737,7 +1739,7 @@
},
"IsQualifyingEarnings" : {
"type" : "boolean",
"description" : "Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on superannuation settings",
"description" : "Boolean to determine if the leave line is considered as qualifying earnings for superannuation guarantee calculations",
"example" : true
},
"NumberOfUnits" : {
Expand Down Expand Up @@ -1821,6 +1823,7 @@
};
defs["LeaveType"] = {
"title" : "",
"required" : [ "IsQualifyingEarnings" ],
"type" : "object",
"properties" : {
"Name" : {
Expand Down Expand Up @@ -1884,7 +1887,7 @@
},
"IsQualifyingEarnings" : {
"type" : "boolean",
"description" : "Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings",
"description" : "Boolean to determine if the leave type is considered as qualifying earnings for superannuation guarantee calculations",
"example" : true
}
},
Expand Down Expand Up @@ -3169,7 +3172,7 @@
},
"IncludeLeaveLoadingInQualifyingEarnings" : {
"type" : "boolean",
"description" : "Optional Boolean to determine if leave loading is considered as qualifying earnings for superannuation guarantee calculations",
"description" : "Boolean to determine if leave loading is considered as qualifying earnings for superannuation guarantee calculations. Required when IncludeLeaveLoadingInSGC is specified in the payload",
"example" : true
}
},
Expand Down Expand Up @@ -3447,7 +3450,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="approveLeaveApplication" class="">
<a href="#api-PayrollAu-approveLeaveApplication">approveLeaveApplication</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_au_v2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollAuV2"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollAuV2"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="PayrollAuV2"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="PayrollAuV2"><a href="#api-PayrollAuV2">Methods</a></li>
<li data-group="PayrollAuV2" data-name="approveTimesheet" class="">
<a href="#api-PayrollAuV2-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_nz/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4068,7 +4068,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3701,7 +3701,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Project"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>16.0.0</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>17.0.0</li>
<li class="nav-header" data-group="Project"><a href="#api-Project">Methods</a></li>
<li data-group="Project" data-name="createProject" class="">
<a href="#api-Project-createProject">createProject</a>
Expand Down
5 changes: 3 additions & 2 deletions lib/xero-ruby/models/accounting/organisation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class Organisation
COMPREHENSIVE ||= "COMPREHENSIVE".freeze
SIMPLE ||= "SIMPLE".freeze
BASICLITE ||= "BASICLITE".freeze
ULTRA ||= "ULTRA".freeze

# BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
attr_accessor :edition
Expand Down Expand Up @@ -488,7 +489,7 @@ def valid?
return false unless sales_tax_period_validator.valid?(@sales_tax_period)
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", "PERSONAL", "SINGLEMEMBERLLC", "CCORPORATIONLLC", "PARTNERSHIPLLC", "SCORPORATIONLLC", "LLC", "NOTLLC", "UNSPECIFIED"])
return false unless organisation_entity_type_validator.valid?(@organisation_entity_type)
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE"])
_class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE", "ULTRA"])
return false unless _class_validator.valid?(@_class)
edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"])
return false unless edition_validator.valid?(@edition)
Expand Down Expand Up @@ -548,7 +549,7 @@ def organisation_entity_type=(organisation_entity_type)
# Custom attribute writer method checking allowed values (enum).
# @param [Object] _class Object to be assigned
def _class=(_class)
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE"])
validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE", "LITE", "ULTIMATE_10", "ULTIMATE_20", "ULTIMATE_50", "ULTIMATE_100", "IGNITE", "GROW", "COMPREHENSIVE", "SIMPLE", "BASICLITE", "ULTRA"])
unless validator.valid?(_class)
fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
end
Expand Down
7 changes: 6 additions & 1 deletion lib/xero-ruby/models/payroll_au/earnings_rate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class EarningsRate
# Boolean to determine if the earnings rate is reportable or exempt from W1
attr_accessor :is_reportable_as_w1

# Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings
# Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations
attr_accessor :is_qualifying_earnings

# Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT
Expand Down Expand Up @@ -245,6 +245,10 @@ def list_invalid_properties
invalid_properties.push('invalid value for "type_of_units", the character length must be smaller than or equal to 50.')
end

if @is_qualifying_earnings.nil?
invalid_properties.push('invalid value for "is_qualifying_earnings", is_qualifying_earnings cannot be nil.')
end

invalid_properties
end

Expand All @@ -253,6 +257,7 @@ def list_invalid_properties
def valid?
return false if !@name.nil? && @name.to_s.length > 100
return false if !@type_of_units.nil? && @type_of_units.to_s.length > 50
return false if @is_qualifying_earnings.nil?
true
end

Expand Down
7 changes: 6 additions & 1 deletion lib/xero-ruby/models/payroll_au/leave_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LeaveLine
# amount of leave line
attr_accessor :include_superannuation_guarantee_contribution

# Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on superannuation settings
# Boolean to determine if the leave line is considered as qualifying earnings for superannuation guarantee calculations
attr_accessor :is_qualifying_earnings

# Number of units for leave line.
Expand Down Expand Up @@ -129,12 +129,17 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @is_qualifying_earnings.nil?
invalid_properties.push('invalid value for "is_qualifying_earnings", is_qualifying_earnings cannot be nil.')
end

invalid_properties
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @is_qualifying_earnings.nil?
true
end

Expand Down
Loading
Loading