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 (17.0.0)
xero-ruby (18.0.0)
faraday (>= 2.0, < 3.0)
json (~> 2.1, >= 2.1.0)
json-jwt (~> 1.16, >= 1.16.3)
Expand Down
152 changes: 150 additions & 2 deletions docs/accounting/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Method | HTTP request | Description
[**create_tracking_category**](AccountingApi.md#create_tracking_category) | **PUT** /TrackingCategories | Create tracking categories
[**create_tracking_options**](AccountingApi.md#create_tracking_options) | **PUT** /TrackingCategories/{TrackingCategoryID}/Options | Creates options for a specific tracking category
[**delete_account**](AccountingApi.md#delete_account) | **DELETE** /Accounts/{AccountID} | Deletes a chart of accounts
[**delete_bank_transfer**](AccountingApi.md#delete_bank_transfer) | **POST** /BankTransfers/{BankTransferID} | Deletes a specific bank transfer
[**delete_bank_transfers**](AccountingApi.md#delete_bank_transfers) | **POST** /BankTransfers | Deletes one or more bank transfers
[**delete_batch_payment**](AccountingApi.md#delete_batch_payment) | **POST** /BatchPayments | Updates a specific batch payment for invoices and credit notes
[**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
[**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
Expand Down Expand Up @@ -633,7 +635,7 @@ api_instance = xero_client.<api_set>


xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
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
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
opts = {
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
}
Expand Down Expand Up @@ -4248,6 +4250,149 @@ Name | Type | Description | Notes
- **Accept**: application/json


## delete_bank_transfer

> BankTransfers delete_bank_transfer(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts)

Deletes a specific bank transfer

### 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 = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
bank_transfer_id = '00000000-0000-0000-0000-000000000000' # String | Xero generated unique identifier for a bank transfer
bank_transfer_delete_by_url_param = {"Status":"DELETED"} # BankTransferDeleteByUrlParam |
opts = {
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
}

begin
#Deletes a specific bank transfer
result = api_instance.delete_bank_transfer(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts)
p result
rescue XeroRuby::Accounting::ApiError => e
puts "Exception when calling AccountingApi->delete_bank_transfer: #{e}"
end
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **String**| Xero identifier for Tenant |
**bank_transfer_id** | [**String**](.md)| Xero generated unique identifier for a bank transfer |
**bank_transfer_delete_by_url_param** | [**BankTransferDeleteByUrlParam**](BankTransferDeleteByUrlParam.md)| |
**idempotency_key** | **String**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]

### Return type

[**BankTransfers**](BankTransfers.md)

### Authorization

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

### HTTP request headers

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


## delete_bank_transfers

> BankTransfers delete_bank_transfers(xero_tenant_id, bank_transfers_delete, opts)

Deletes one or more bank transfers

### 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 = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
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
opts = {
summarize_errors: false, # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors

idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
}

begin
#Deletes one or more bank transfers
result = api_instance.delete_bank_transfers(xero_tenant_id, bank_transfers_delete, opts)
p result
rescue XeroRuby::Accounting::ApiError => e
puts "Exception when calling AccountingApi->delete_bank_transfers: #{e}"
end
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **String**| Xero identifier for Tenant |
**bank_transfers_delete** | [**BankTransfersDelete**](BankTransfersDelete.md)| BankTransfers with array of BankTransfer objects in request body |
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
**idempotency_key** | **String**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional]

### Return type

[**BankTransfers**](BankTransfers.md)

### Authorization

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

### HTTP request headers

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


## delete_batch_payment

> BatchPayments delete_batch_payment(xero_tenant_id, batch_payment_delete, opts)
Expand Down Expand Up @@ -6228,7 +6373,9 @@ opts = {

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

order: 'Amount ASC' # String | Order by an any element
order: 'Amount ASC', # String | Order by an any element

include_deleted: true # Boolean | e.g. includeDeleted=true - Bank transfers with a status of DELETED will be included in the response
}

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

### Return type

Expand Down
6 changes: 6 additions & 0 deletions docs/accounting/BankTransfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Name | Type | Description | Notes
**reference** | **String** | Reference for the transactions. | [optional]
**has_attachments** | **Boolean** | Boolean to indicate if a Bank Transfer has an attachment | [optional] [default to false]
**created_date_utc** | **DateTime** | UTC timestamp of creation date of bank transfer | [optional]
**status** | **String** | AUTHORISED or DELETED (read-only). New bank transfers will have a status of AUTHORISED. | [optional]
**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]
**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]
**validation_errors** | [**Array&lt;ValidationError&gt;**](ValidationError.md) | Displays array of validation error messages from the API | [optional]

## Code Sample
Expand All @@ -37,6 +40,9 @@ instance = XeroRuby::Accounting::BankTransfer.new(from_bank_account: null,
reference: null,
has_attachments: false,
created_date_utc: /Date(1573755038314)/,
status: null,
from_tracking: null,
to_tracking: null,
validation_errors: null)
```

Expand Down
19 changes: 19 additions & 0 deletions docs/accounting/BankTransferDelete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# XeroRuby::Accounting::BankTransferDelete

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_transfer_id** | **String** | The Xero identifier for a bank transfer |
**status** | **String** | The status of the bank transfer. | [default to &#39;DELETED&#39;]

## Code Sample

```ruby
require 'XeroRuby::Accounting'

instance = XeroRuby::Accounting::BankTransferDelete.new(bank_transfer_id: null,
status: null)
```


17 changes: 17 additions & 0 deletions docs/accounting/BankTransferDeleteByUrlParam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# XeroRuby::Accounting::BankTransferDeleteByUrlParam

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | **String** | The status of the bank transfer. | [default to &#39;DELETED&#39;]

## Code Sample

```ruby
require 'XeroRuby::Accounting'

instance = XeroRuby::Accounting::BankTransferDeleteByUrlParam.new(status: null)
```


17 changes: 17 additions & 0 deletions docs/accounting/BankTransfersDelete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# XeroRuby::Accounting::BankTransfersDelete

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_transfers** | [**Array&lt;BankTransferDelete&gt;**](BankTransferDelete.md) | | [optional]

## Code Sample

```ruby
require 'XeroRuby::Accounting'

instance = XeroRuby::Accounting::BankTransfersDelete.new(bank_transfers: null)
```


2 changes: 2 additions & 0 deletions docs/accounting/CreditNote.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Name | Type | Description | Notes
**cis_deduction** | **BigDecimal** | CIS deduction for UK contractors | [optional]
**cis_rate** | **BigDecimal** | CIS Deduction rate for the organisation | [optional]
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the credit note | [optional]
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the credit note | [optional]
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
**fully_paid_on_date** | **Date** | Date when credit note was fully paid(UTC format) | [optional]
**credit_note_id** | **String** | Xero generated unique identifier | [optional]
Expand Down Expand Up @@ -54,6 +55,7 @@ instance = XeroRuby::Accounting::CreditNote.new(type: null,
cis_deduction: null,
cis_rate: null,
updated_date_utc: /Date(1573755038314)/,
updated_date_utc_string: 2019-11-14T18:10:38Z,
currency_code: null,
fully_paid_on_date: null,
credit_note_id: null,
Expand Down
4 changes: 3 additions & 1 deletion docs/accounting/Invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Name | Type | Description | Notes
**amount_paid** | **BigDecimal** | Sum of payments received for invoice | [optional]
**fully_paid_on_date** | **Date** | The date the invoice was fully paid. Only returned on fully paid invoices | [optional]
**amount_credited** | **BigDecimal** | Sum of all credit notes, over-payments and pre-payments applied to invoice | [optional]
**updated_date_utc** | **DateTime** | Last modified date UTC format | [optional]
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the invoice | [optional]
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the invoice | [optional]
**credit_notes** | [**Array&lt;CreditNote&gt;**](CreditNote.md) | Details of credit notes that have been applied to an invoice | [optional]
**attachments** | [**Array&lt;Attachment&gt;**](Attachment.md) | Displays array of attachments from the API | [optional]
**has_errors** | **Boolean** | A boolean to indicate if a invoice has an validation errors | [optional] [default to false]
Expand Down Expand Up @@ -85,6 +86,7 @@ instance = XeroRuby::Accounting::Invoice.new(type: null,
fully_paid_on_date: null,
amount_credited: null,
updated_date_utc: /Date(1573755038314)/,
updated_date_utc_string: 2019-11-14T18:10:38Z,
credit_notes: null,
attachments: null,
has_errors: false,
Expand Down
2 changes: 2 additions & 0 deletions docs/accounting/Overpayment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**total_tax** | **BigDecimal** | The total tax on the overpayment | [optional]
**total** | **BigDecimal** | The total of the overpayment (subtotal + total tax) | [optional]
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the overpayment | [optional]
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the overpayment | [optional]
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
**overpayment_id** | **String** | Xero generated unique identifier | [optional]
**currency_rate** | **BigDecimal** | The currency rate for a multicurrency overpayment. If no rate is specified, the XE.com day rate is used | [optional]
Expand All @@ -40,6 +41,7 @@ instance = XeroRuby::Accounting::Overpayment.new(type: null,
total_tax: null,
total: null,
updated_date_utc: /Date(1573755038314)/,
updated_date_utc_string: 2019-11-14T18:10:38Z,
currency_code: null,
overpayment_id: null,
currency_rate: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/accounting/Payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Name | Type | Description | Notes
**status** | **String** | The status of the payment. | [optional]
**payment_type** | **String** | See Payment Types. | [optional]
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the payment | [optional]
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the payment | [optional]
**payment_id** | **String** | The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 | [optional]
**batch_payment_id** | **String** | Present if the payment was created as part of a batch. | [optional]
**bank_account_number** | **String** | The suppliers bank account number the payment is being made to | [optional]
Expand Down Expand Up @@ -56,6 +57,7 @@ instance = XeroRuby::Accounting::Payment.new(invoice: null,
status: null,
payment_type: null,
updated_date_utc: /Date(1573755038314)/,
updated_date_utc_string: 2019-11-14T18:10:38Z,
payment_id: 00000000-0000-0000-0000-000000000000,
batch_payment_id: 00000000-0000-0000-0000-000000000000,
bank_account_number: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/accounting/Prepayment.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**reference** | **String** | Returns Invoice number field. Reference field isn&#39;t available. | [optional]
**invoice_number** | **String** | Returns Invoice number for prepayment receive document only. | [optional]
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the prepayment | [optional]
**updated_date_utc_string** | **String** | UTC ISO-8601 formatted timestamp of last update to the prepayment | [optional]
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
**prepayment_id** | **String** | Xero generated unique identifier | [optional]
**branding_theme_id** | **String** | The unique identifier of the branding template applied to a receive prepayment | [optional]
Expand Down Expand Up @@ -44,6 +45,7 @@ instance = XeroRuby::Accounting::Prepayment.new(type: null,
reference: null,
invoice_number: null,
updated_date_utc: /Date(1573755038314)/,
updated_date_utc_string: 2019-11-14T18:10:38Z,
currency_code: null,
prepayment_id: null,
branding_theme_id: null,
Expand Down
Loading
Loading