Skip to content

Commit 3c469e5

Browse files
authored
Merge pull request #376 from XeroAPI/18.0.0
Releasing 18.0.0 (OAS: 16.1.0)
2 parents 9cd5251 + 6a19760 commit 3c469e5

35 files changed

Lines changed: 2062 additions & 26 deletions

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
xero-ruby (17.0.0)
4+
xero-ruby (18.0.0)
55
faraday (>= 2.0, < 3.0)
66
json (~> 2.1, >= 2.1.0)
77
json-jwt (~> 1.16, >= 1.16.3)

docs/accounting/AccountingApi.md

Lines changed: 150 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Method | HTTP request | Description
6060
[**create_tracking_category**](AccountingApi.md#create_tracking_category) | **PUT** /TrackingCategories | Create tracking categories
6161
[**create_tracking_options**](AccountingApi.md#create_tracking_options) | **PUT** /TrackingCategories/{TrackingCategoryID}/Options | Creates options for a specific tracking category
6262
[**delete_account**](AccountingApi.md#delete_account) | **DELETE** /Accounts/{AccountID} | Deletes a chart of accounts
63+
[**delete_bank_transfer**](AccountingApi.md#delete_bank_transfer) | **POST** /BankTransfers/{BankTransferID} | Deletes a specific bank transfer
64+
[**delete_bank_transfers**](AccountingApi.md#delete_bank_transfers) | **POST** /BankTransfers | Deletes one or more bank transfers
6365
[**delete_batch_payment**](AccountingApi.md#delete_batch_payment) | **POST** /BatchPayments | Updates a specific batch payment for invoices and credit notes
6466
[**delete_batch_payment_by_url_param**](AccountingApi.md#delete_batch_payment_by_url_param) | **POST** /BatchPayments/{BatchPaymentID} | Updates a specific batch payment for invoices and credit notes
6567
[**delete_contact_group_contact**](AccountingApi.md#delete_contact_group_contact) | **DELETE** /ContactGroups/{ContactGroupID}/Contacts/{ContactID} | Deletes a specific contact from a contact group using a unique contact Id
@@ -633,7 +635,7 @@ api_instance = xero_client.<api_set>
633635

634636

635637
xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
636-
bank_transfers = {"BankTransfers":[{"FromBankAccount":{"Code":"090","Name":"My Savings","AccountID":"00000000-0000-0000-0000-000000000000","Type":"BANK","BankAccountNumber":"123455","Status":"ACTIVE","BankAccountType":"BANK","CurrencyCode":"USD","TaxType":"NONE","EnablePaymentsToAccount":false,"ShowInExpenseClaims":false,"Class":"ASSET","ReportingCode":"ASS","ReportingCodeName":"Assets","HasAttachments":false,"UpdatedDateUTC":"2016-10-17T13:45:33.993-07:00"},"ToBankAccount":{"Code":"088","Name":"Business Wells Fargo","AccountID":"00000000-0000-0000-0000-000000000000","Type":"BANK","BankAccountNumber":"123455","Status":"ACTIVE","BankAccountType":"BANK","CurrencyCode":"USD","TaxType":"NONE","EnablePaymentsToAccount":false,"ShowInExpenseClaims":false,"Class":"ASSET","ReportingCode":"ASS","ReportingCodeName":"Assets","HasAttachments":false,"UpdatedDateUTC":"2016-06-03T08:31:14.517-07:00"},"Amount":"50.00","FromIsReconciled":true,"ToIsReconciled":true,"Reference":"Sub 098801"}]} # BankTransfers | BankTransfers with array of BankTransfer objects in request body
638+
bank_transfers = {"BankTransfers":[{"FromBankAccount":{"Code":"090","Name":"My Savings","AccountID":"00000000-0000-0000-0000-000000000000","Type":"BANK","BankAccountNumber":"123455","Status":"ACTIVE","BankAccountType":"BANK","CurrencyCode":"USD","TaxType":"NONE","EnablePaymentsToAccount":false,"ShowInExpenseClaims":false,"Class":"ASSET","ReportingCode":"ASS","ReportingCodeName":"Assets","HasAttachments":false,"UpdatedDateUTC":"2016-10-17T13:45:33.993-07:00"},"ToBankAccount":{"Code":"088","Name":"Business Wells Fargo","AccountID":"00000000-0000-0000-0000-000000000000","Type":"BANK","BankAccountNumber":"123455","Status":"ACTIVE","BankAccountType":"BANK","CurrencyCode":"USD","TaxType":"NONE","EnablePaymentsToAccount":false,"ShowInExpenseClaims":false,"Class":"ASSET","ReportingCode":"ASS","ReportingCodeName":"Assets","HasAttachments":false,"UpdatedDateUTC":"2016-06-03T08:31:14.517-07:00"},"Amount":"50.00","FromIsReconciled":true,"ToIsReconciled":true,"Reference":"Sub 098801","FromTracking":[{"TrackingCategoryID":"e2f2f732-e92a-4f3a-9c4d-ee4da0182a13","TrackingOptionID":"cd0a4b7e-3c6b-4b3c-8e2a-1f2d3c4b5a69"}],"ToTracking":[{"TrackingCategoryID":"e2f2f732-e92a-4f3a-9c4d-ee4da0182a13","TrackingOptionID":"9f8e7d6c-5b4a-3c2d-1e0f-a9b8c7d6e5f4"}]}]} # BankTransfers | BankTransfers with array of BankTransfer objects in request body
637639
opts = {
638640
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
639641
}
@@ -4248,6 +4250,149 @@ Name | Type | Description | Notes
42484250
- **Accept**: application/json
42494251

42504252

4253+
## delete_bank_transfer
4254+
4255+
> BankTransfers delete_bank_transfer(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts)
4256+
4257+
Deletes a specific bank transfer
4258+
4259+
### Example
4260+
4261+
```ruby
4262+
# load the gem
4263+
require 'xero-ruby'
4264+
4265+
creds = {
4266+
client_id: ENV['CLIENT_ID'],
4267+
client_secret: ENV['CLIENT_SECRET'],
4268+
redirect_uri: ENV['REDIRECT_URI'],
4269+
scopes: ENV['SCOPES']
4270+
}
4271+
xero_client = XeroRuby::ApiClient.new(credentials: creds)
4272+
4273+
token_set = fetch_valid_token_set(user) # example
4274+
4275+
xero_client.refresh_token_set(token_set)
4276+
4277+
# You need to namespace your api method call to one of the following api sets
4278+
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api, :app_store_api]
4279+
4280+
api_instance = xero_client.<api_set>
4281+
4282+
4283+
4284+
xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
4285+
bank_transfer_id = '00000000-0000-0000-0000-000000000000' # String | Xero generated unique identifier for a bank transfer
4286+
bank_transfer_delete_by_url_param = {"Status":"DELETED"} # BankTransferDeleteByUrlParam |
4287+
opts = {
4288+
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4289+
}
4290+
4291+
begin
4292+
#Deletes a specific bank transfer
4293+
result = api_instance.delete_bank_transfer(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts)
4294+
p result
4295+
rescue XeroRuby::Accounting::ApiError => e
4296+
puts "Exception when calling AccountingApi->delete_bank_transfer: #{e}"
4297+
end
4298+
```
4299+
4300+
### Parameters
4301+
4302+
4303+
Name | Type | Description | Notes
4304+
------------- | ------------- | ------------- | -------------
4305+
**xero_tenant_id** | **String**| Xero identifier for Tenant |
4306+
**bank_transfer_id** | [**String**](.md)| Xero generated unique identifier for a bank transfer |
4307+
**bank_transfer_delete_by_url_param** | [**BankTransferDeleteByUrlParam**](BankTransferDeleteByUrlParam.md)| |
4308+
**idempotency_key** | **String**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]
4309+
4310+
### Return type
4311+
4312+
[**BankTransfers**](BankTransfers.md)
4313+
4314+
### Authorization
4315+
4316+
[OAuth2](../README.md#OAuth2)
4317+
4318+
### HTTP request headers
4319+
4320+
- **Content-Type**: application/json
4321+
- **Accept**: application/json
4322+
4323+
4324+
## delete_bank_transfers
4325+
4326+
> BankTransfers delete_bank_transfers(xero_tenant_id, bank_transfers_delete, opts)
4327+
4328+
Deletes one or more bank transfers
4329+
4330+
### Example
4331+
4332+
```ruby
4333+
# load the gem
4334+
require 'xero-ruby'
4335+
4336+
creds = {
4337+
client_id: ENV['CLIENT_ID'],
4338+
client_secret: ENV['CLIENT_SECRET'],
4339+
redirect_uri: ENV['REDIRECT_URI'],
4340+
scopes: ENV['SCOPES']
4341+
}
4342+
xero_client = XeroRuby::ApiClient.new(credentials: creds)
4343+
4344+
token_set = fetch_valid_token_set(user) # example
4345+
4346+
xero_client.refresh_token_set(token_set)
4347+
4348+
# You need to namespace your api method call to one of the following api sets
4349+
# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api, :app_store_api]
4350+
4351+
api_instance = xero_client.<api_set>
4352+
4353+
4354+
4355+
xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
4356+
bank_transfers_delete = {"BankTransfers":[{"BankTransferID":"6221458a-ef7a-4d5f-9b1c-1b96ce03833c","Status":"DELETED"},{"BankTransferID":"9f0153d5-617c-4903-887b-3875807aa27a","Status":"DELETED"}]} # BankTransfersDelete | BankTransfers with array of BankTransfer objects in request body
4357+
opts = {
4358+
summarize_errors: false, # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
4359+
4360+
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4361+
}
4362+
4363+
begin
4364+
#Deletes one or more bank transfers
4365+
result = api_instance.delete_bank_transfers(xero_tenant_id, bank_transfers_delete, opts)
4366+
p result
4367+
rescue XeroRuby::Accounting::ApiError => e
4368+
puts "Exception when calling AccountingApi->delete_bank_transfers: #{e}"
4369+
end
4370+
```
4371+
4372+
### Parameters
4373+
4374+
4375+
Name | Type | Description | Notes
4376+
------------- | ------------- | ------------- | -------------
4377+
**xero_tenant_id** | **String**| Xero identifier for Tenant |
4378+
**bank_transfers_delete** | [**BankTransfersDelete**](BankTransfersDelete.md)| BankTransfers with array of BankTransfer objects in request body |
4379+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
4380+
**idempotency_key** | **String**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]
4381+
4382+
### Return type
4383+
4384+
[**BankTransfers**](BankTransfers.md)
4385+
4386+
### Authorization
4387+
4388+
[OAuth2](../README.md#OAuth2)
4389+
4390+
### HTTP request headers
4391+
4392+
- **Content-Type**: application/json
4393+
- **Accept**: application/json
4394+
4395+
42514396
## delete_batch_payment
42524397

42534398
> BatchPayments delete_batch_payment(xero_tenant_id, batch_payment_delete, opts)
@@ -6228,7 +6373,9 @@ opts = {
62286373

62296374
where: 'HasAttachments==true', # String | Filter by an any element
62306375

6231-
order: 'Amount ASC' # String | Order by an any element
6376+
order: 'Amount ASC', # String | Order by an any element
6377+
6378+
include_deleted: true # Boolean | e.g. includeDeleted=true - Bank transfers with a status of DELETED will be included in the response
62326379
}
62336380

62346381
begin
@@ -6249,6 +6396,7 @@ Name | Type | Description | Notes
62496396
**if_modified_since** | **DateTime**| Only records created or modified since this timestamp will be returned | [optional]
62506397
**where** | **String**| Filter by an any element | [optional]
62516398
**order** | **String**| Order by an any element | [optional]
6399+
**include_deleted** | **Boolean**| e.g. includeDeleted&#x3D;true - Bank transfers with a status of DELETED will be included in the response | [optional]
62526400

62536401
### Return type
62546402

docs/accounting/BankTransfer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Name | Type | Description | Notes
1717
**reference** | **String** | Reference for the transactions. | [optional]
1818
**has_attachments** | **Boolean** | Boolean to indicate if a Bank Transfer has an attachment | [optional] [default to false]
1919
**created_date_utc** | **DateTime** | UTC timestamp of creation date of bank transfer | [optional]
20+
**status** | **String** | AUTHORISED or DELETED (read-only). New bank transfers will have a status of AUTHORISED. | [optional]
21+
**from_tracking** | [**Array&lt;TrackingReference&gt;**](TrackingReference.md) | Optional Tracking Category for the source account – see Tracking. A bank transfer can have a maximum of 2 tracking categories per account. | [optional]
22+
**to_tracking** | [**Array&lt;TrackingReference&gt;**](TrackingReference.md) | Optional Tracking Category for the destination account – see Tracking. A bank transfer can have a maximum of 2 tracking categories per account. | [optional]
2023
**validation_errors** | [**Array&lt;ValidationError&gt;**](ValidationError.md) | Displays array of validation error messages from the API | [optional]
2124

2225
## Code Sample
@@ -37,6 +40,9 @@ instance = XeroRuby::Accounting::BankTransfer.new(from_bank_account: null,
3740
reference: null,
3841
has_attachments: false,
3942
created_date_utc: /Date(1573755038314)/,
43+
status: null,
44+
from_tracking: null,
45+
to_tracking: null,
4046
validation_errors: null)
4147
```
4248

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# XeroRuby::Accounting::BankTransferDelete
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**bank_transfer_id** | **String** | The Xero identifier for a bank transfer |
8+
**status** | **String** | The status of the bank transfer. | [default to &#39;DELETED&#39;]
9+
10+
## Code Sample
11+
12+
```ruby
13+
require 'XeroRuby::Accounting'
14+
15+
instance = XeroRuby::Accounting::BankTransferDelete.new(bank_transfer_id: null,
16+
status: null)
17+
```
18+
19+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# XeroRuby::Accounting::BankTransferDeleteByUrlParam
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**status** | **String** | The status of the bank transfer. | [default to &#39;DELETED&#39;]
8+
9+
## Code Sample
10+
11+
```ruby
12+
require 'XeroRuby::Accounting'
13+
14+
instance = XeroRuby::Accounting::BankTransferDeleteByUrlParam.new(status: null)
15+
```
16+
17+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# XeroRuby::Accounting::BankTransfersDelete
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**bank_transfers** | [**Array&lt;BankTransferDelete&gt;**](BankTransferDelete.md) | | [optional]
8+
9+
## Code Sample
10+
11+
```ruby
12+
require 'XeroRuby::Accounting'
13+
14+
instance = XeroRuby::Accounting::BankTransfersDelete.new(bank_transfers: null)
15+
```
16+
17+

docs/accounting/CreditNote.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
1717
**cis_deduction** | **BigDecimal** | CIS deduction for UK contractors | [optional]
1818
**cis_rate** | **BigDecimal** | CIS Deduction rate for the organisation | [optional]
1919
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the credit note | [optional]
20+
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the credit note | [optional]
2021
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
2122
**fully_paid_on_date** | **Date** | Date when credit note was fully paid(UTC format) | [optional]
2223
**credit_note_id** | **String** | Xero generated unique identifier | [optional]
@@ -54,6 +55,7 @@ instance = XeroRuby::Accounting::CreditNote.new(type: null,
5455
cis_deduction: null,
5556
cis_rate: null,
5657
updated_date_utc: /Date(1573755038314)/,
58+
updated_date_utc_string: 2019-11-14T18:10:38Z,
5759
currency_code: null,
5860
fully_paid_on_date: null,
5961
credit_note_id: null,

docs/accounting/Invoice.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Name | Type | Description | Notes
3737
**amount_paid** | **BigDecimal** | Sum of payments received for invoice | [optional]
3838
**fully_paid_on_date** | **Date** | The date the invoice was fully paid. Only returned on fully paid invoices | [optional]
3939
**amount_credited** | **BigDecimal** | Sum of all credit notes, over-payments and pre-payments applied to invoice | [optional]
40-
**updated_date_utc** | **DateTime** | Last modified date UTC format | [optional]
40+
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the invoice | [optional]
41+
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the invoice | [optional]
4142
**credit_notes** | [**Array&lt;CreditNote&gt;**](CreditNote.md) | Details of credit notes that have been applied to an invoice | [optional]
4243
**attachments** | [**Array&lt;Attachment&gt;**](Attachment.md) | Displays array of attachments from the API | [optional]
4344
**has_errors** | **Boolean** | A boolean to indicate if a invoice has an validation errors | [optional] [default to false]
@@ -85,6 +86,7 @@ instance = XeroRuby::Accounting::Invoice.new(type: null,
8586
fully_paid_on_date: null,
8687
amount_credited: null,
8788
updated_date_utc: /Date(1573755038314)/,
89+
updated_date_utc_string: 2019-11-14T18:10:38Z,
8890
credit_notes: null,
8991
attachments: null,
9092
has_errors: false,

docs/accounting/Overpayment.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**total_tax** | **BigDecimal** | The total tax on the overpayment | [optional]
1515
**total** | **BigDecimal** | The total of the overpayment (subtotal + total tax) | [optional]
1616
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the overpayment | [optional]
17+
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the overpayment | [optional]
1718
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
1819
**overpayment_id** | **String** | Xero generated unique identifier | [optional]
1920
**currency_rate** | **BigDecimal** | The currency rate for a multicurrency overpayment. If no rate is specified, the XE.com day rate is used | [optional]
@@ -40,6 +41,7 @@ instance = XeroRuby::Accounting::Overpayment.new(type: null,
4041
total_tax: null,
4142
total: null,
4243
updated_date_utc: /Date(1573755038314)/,
44+
updated_date_utc_string: 2019-11-14T18:10:38Z,
4345
currency_code: null,
4446
overpayment_id: null,
4547
currency_rate: null,

docs/accounting/Payment.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Name | Type | Description | Notes
2222
**status** | **String** | The status of the payment. | [optional]
2323
**payment_type** | **String** | See Payment Types. | [optional]
2424
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the payment | [optional]
25+
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the payment | [optional]
2526
**payment_id** | **String** | The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 | [optional]
2627
**batch_payment_id** | **String** | Present if the payment was created as part of a batch. | [optional]
2728
**bank_account_number** | **String** | The suppliers bank account number the payment is being made to | [optional]
@@ -56,6 +57,7 @@ instance = XeroRuby::Accounting::Payment.new(invoice: null,
5657
status: null,
5758
payment_type: null,
5859
updated_date_utc: /Date(1573755038314)/,
60+
updated_date_utc_string: 2019-11-14T18:10:38Z,
5961
payment_id: 00000000-0000-0000-0000-000000000000,
6062
batch_payment_id: 00000000-0000-0000-0000-000000000000,
6163
bank_account_number: null,

0 commit comments

Comments
 (0)