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 (12.1.0)
xero-ruby (12.2.0)
faraday (>= 2.0, < 3.0)
json (~> 2.1, >= 2.1.0)
json-jwt (~> 1.16, >= 1.16.3)
Expand Down
2 changes: 2 additions & 0 deletions docs/accounting/Contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Name | Type | Description | Notes
**contact_persons** | [**Array&lt;ContactPerson&gt;**](ContactPerson.md) | See contact persons | [optional]
**bank_account_details** | **String** | Bank account number of contact | [optional]
**tax_number** | **String** | Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length &#x3D; 50) | [optional]
**tax_number_type** | **String** | Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers | [optional]
**accounts_receivable_tax_type** | **String** | The tax type from TaxRates | [optional]
**accounts_payable_tax_type** | **String** | The tax type from TaxRates | [optional]
**addresses** | [**Array&lt;Address&gt;**](Address.md) | Store certain address types for a contact – see address types | [optional]
Expand Down Expand Up @@ -65,6 +66,7 @@ instance = XeroRuby::Accounting::Contact.new(contact_id: null,
contact_persons: null,
bank_account_details: null,
tax_number: null,
tax_number_type: null,
accounts_receivable_tax_type: null,
accounts_payable_tax_type: null,
addresses: null,
Expand Down
11 changes: 8 additions & 3 deletions docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2104,6 +2104,11 @@
"type" : "string",
"description" : "Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)"
},
"TaxNumberType" : {
"type" : "string",
"description" : "Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers",
"enum" : [ "SSN", "EIN", "ITIN", "ATIN" ]
},
"AccountsReceivableTaxType" : {
"type" : "string",
"description" : "The tax type from TaxRates"
Expand Down Expand Up @@ -6339,7 +6344,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>12.1.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>12.2.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 Expand Up @@ -22974,7 +22979,7 @@ <h2>Scopes</h2>

<tr>
<td>accounting.budgets.read</td>
<td></td>
<td>Grant read-only access to read budgets</td>
</tr>

</table>
Expand Down Expand Up @@ -23142,7 +23147,7 @@ <h2>Scopes</h2>

<tr>
<td>accounting.budgets.read</td>
<td></td>
<td>Grant read-only access to read budgets</td>
</tr>

</table>
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 @@ -1241,7 +1241,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>12.1.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>12.2.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
12 changes: 11 additions & 1 deletion docs/assets/BookDepreciationDetail.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Name | Type | Description | Notes
**residual_value** | **BigDecimal** | The value of the asset remaining when you&#39;ve fully depreciated it. | [optional]
**prior_accum_depreciation_amount** | **BigDecimal** | All depreciation prior to the current financial year. | [optional]
**current_accum_depreciation_amount** | **BigDecimal** | All depreciation occurring in the current financial year. | [optional]
**business_use_capital_gain** | **BigDecimal** | (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset that is attributable to its business use. | [optional]
**business_use_current_gain_loss** | **BigDecimal** | (New Zealand Orgs Only) Represents the gain or loss from the disposal of the business use portion of a fixed asset. This value records the financial result (profit or loss) related specifically to the asset’s business use. | [optional]
**private_use_capital_gain** | **BigDecimal** | (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset that is attributable to its private (non-business) use. | [optional]
**private_use_current_gain_loss** | **BigDecimal** | (New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use portion of a fixed asset. This value records the financial result (profit or loss) related specifically to the asset’s private use. | [optional]
**initial_deduction_percentage** | **Float** | (New Zealand Orgs Only) The Investment Boost deduction percentage. | [optional]

## Code Sample

Expand All @@ -23,7 +28,12 @@ instance = XeroRuby::Assets::BookDepreciationDetail.new(current_capital_gain: 5.
cost_limit: 9000.0,
residual_value: 10000.0,
prior_accum_depreciation_amount: 0.45,
current_accum_depreciation_amount: 5.0)
current_accum_depreciation_amount: 5.0,
business_use_capital_gain: null,
business_use_current_gain_loss: null,
private_use_capital_gain: null,
private_use_current_gain_loss: null,
initial_deduction_percentage: null)
```


31 changes: 30 additions & 1 deletion docs/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,35 @@
"format" : "double",
"example" : 5.0,
"x-is-money" : true
},
"businessUseCapitalGain" : {
"type" : "number",
"description" : "(New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset that is attributable to its business use.",
"format" : "decimal",
"x-is-money" : true
},
"businessUseCurrentGainLoss" : {
"type" : "number",
"description" : "(New Zealand Orgs Only) Represents the gain or loss from the disposal of the business use portion of a fixed asset. This value records the financial result (profit or loss) related specifically to the asset’s business use.",
"format" : "decimal",
"x-is-money" : true
},
"privateUseCapitalGain" : {
"type" : "number",
"description" : "(New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset that is attributable to its private (non-business) use.",
"format" : "decimal",
"x-is-money" : true
},
"privateUseCurrentGainLoss" : {
"type" : "number",
"description" : "(New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use portion of a fixed asset. This value records the financial result (profit or loss) related specifically to the asset’s private use.",
"format" : "decimal",
"x-is-money" : true
},
"initialDeductionPercentage" : {
"type" : "number",
"description" : "(New Zealand Orgs Only) The Investment Boost deduction percentage.",
"format" : "decimal"
}
},
"description" : ""
Expand Down Expand Up @@ -1390,7 +1419,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>12.1.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>12.2.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 @@ -1170,7 +1170,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>12.1.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>12.2.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 @@ -2716,7 +2716,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>12.1.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>12.2.0</li>
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
<li data-group="Finance" data-name="getAccountingActivityAccountUsage" class="">
<a href="#api-Finance-getAccountingActivityAccountUsage">getAccountingActivityAccountUsage</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3412,7 +3412,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>12.1.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>12.2.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
8 changes: 4 additions & 4 deletions docs/payroll_nz/Employee.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ instance = XeroRuby::PayrollNz::Employee.new(employee_id: d90457c4-f1be-4f2e-b4e
title: Mrs,
first_name: Karen,
last_name: Jones,
date_of_birth: Wed Jan 02 00:00:00 GMT 2019,
date_of_birth: Wed Jan 02 00:00:00 UTC 2019,
address: null,
email: developer@me.com,
gender: F,
phone_number: 415-555-1212,
start_date: Sun Jan 19 00:00:00 GMT 2020,
end_date: Sun Jan 19 00:00:00 GMT 2020,
start_date: Sun Jan 19 00:00:00 UTC 2020,
end_date: Sun Jan 19 00:00:00 UTC 2020,
payroll_calendar_id: null,
updated_date_utc: null,
created_date_utc: null,
job_title: General Manager,
engagement_type: Permanent,
fixed_term_end_date: Sun Jan 19 00:00:00 GMT 2020)
fixed_term_end_date: Sun Jan 19 00:00:00 UTC 2020)
```


4 changes: 2 additions & 2 deletions docs/payroll_nz/EmployeeLeaveSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ instance = XeroRuby::PayrollNz::EmployeeLeaveSetup.new(include_holiday_pay: fals
sick_leave_maximum_to_accrue: 200.5,
sick_leave_opening_balance: 10.5,
sick_leave_schedule_of_accrual: OnAnniversaryDate,
sick_leave_anniversary_date: Sun Jan 19 00:00:00 GMT 2020,
annual_leave_anniversary_date: Sun Jan 19 00:00:00 GMT 2020)
sick_leave_anniversary_date: Sun Jan 19 00:00:00 UTC 2020,
annual_leave_anniversary_date: Sun Jan 19 00:00:00 UTC 2020)
```


2 changes: 1 addition & 1 deletion docs/payroll_nz/EmployeeLeaveType.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ instance = XeroRuby::PayrollNz::EmployeeLeaveType.new(leave_type_id: null,
include_holiday_pay_every_pay: null,
show_annual_leave_in_advance: null,
annual_leave_total_amount_paid: null,
schedule_of_accrual_date: Sun Jan 19 00:00:00 GMT 2020)
schedule_of_accrual_date: Sun Jan 19 00:00:00 UTC 2020)
```


2 changes: 1 addition & 1 deletion docs/payroll_nz/Employment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ instance = XeroRuby::PayrollNz::Employment.new(payroll_calendar_id: null,
pay_run_calendar_id: null,
start_date: null,
engagement_type: Permanent,
fixed_term_end_date: Sun Jan 19 00:00:00 GMT 2020)
fixed_term_end_date: Sun Jan 19 00:00:00 UTC 2020)
```


72 changes: 0 additions & 72 deletions docs/payroll_nz/PayrollNzApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Method | HTTP request | Description
[**update_employee_leave**](PayrollNzApi.md#update_employee_leave) | **PUT** /Employees/{EmployeeID}/Leave/{LeaveID} | Updates leave records for a specific employee
[**update_employee_salary_and_wage**](PayrollNzApi.md#update_employee_salary_and_wage) | **PUT** /Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID} | Updates an employee&#39;s salary and wages record
[**update_employee_tax**](PayrollNzApi.md#update_employee_tax) | **POST** /Employees/{EmployeeID}/Tax | Updates the tax records for a specific employee
[**update_pay_run**](PayrollNzApi.md#update_pay_run) | **PUT** /PayRuns/{PayRunID} | Updates a pay run
[**update_pay_slip_line_items**](PayrollNzApi.md#update_pay_slip_line_items) | **PUT** /PaySlips/{PaySlipID} | Creates an employee pay slip
[**update_timesheet_line**](PayrollNzApi.md#update_timesheet_line) | **PUT** /Timesheets/{TimesheetID}/Lines/{TimesheetLineID} | Updates a timesheet line for a specific timesheet

Expand Down Expand Up @@ -4750,77 +4749,6 @@ Name | Type | Description | Notes
- **Accept**: application/json


## update_pay_run

> PayRunObject update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts)

Updates a pay run

### Example

```ruby
# load the gem
require 'xero-ruby'

creds = {
client_id: ENV['CLIENT_ID'],
client_secret: ENV['CLIENT_SECRET'],
redirect_uri: ENV['REDIRECT_URI'],
scopes: ENV['SCOPES']
}
xero_client = XeroRuby::ApiClient.new(credentials: creds)

token_set = fetch_valid_token_set(user) # example

xero_client.refresh_token_set(token_set)

# You need to namespace your api method call to one of the following api sets
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api, :app_store_api]

api_instance = xero_client.<api_set>



xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
pay_run_id = 'pay_run_id_example' # String | Identifier for the pay run
pay_run = {"paymentDate":"2019-07-01"} # PayRun |
opts = {
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
}

begin
#Updates a pay run
result = api_instance.update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts)
p result
rescue XeroRuby::PayrollNz::ApiError => e
puts "Exception when calling PayrollNzApi->update_pay_run: #{e}"
end
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **String**| Xero identifier for Tenant |
**pay_run_id** | [**String**](.md)| Identifier for the pay run |
**pay_run** | [**PayRun**](PayRun.md)| |
**idempotency_key** | **String**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]

### Return type

[**PayRunObject**](PayRunObject.md)

### Authorization

[OAuth2](../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


## update_pay_slip_line_items

> PaySlipObject update_pay_slip_line_items(xero_tenant_id, pay_slip_id, pay_slip, opts)
Expand Down
Loading