Skip to content

Commit

Permalink
Merge pull request #219 from XeroAPI/xero-ruby-3.7.0
Browse files Browse the repository at this point in the history
generates xero-ruby-3.7.0 from OAS 2.19.1
  • Loading branch information
RettBehrens authored Mar 8, 2022
2 parents 53f0118 + fb88166 commit c58bcf4
Show file tree
Hide file tree
Showing 44 changed files with 4,395 additions and 30 deletions.
2 changes: 2 additions & 0 deletions docs/accounting/LineItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Name | Type | Description | Notes
**account_id** | **String** | The associated account ID related to this line item | [optional]
**tax_type** | **String** | The tax type from TaxRates | [optional]
**tax_amount** | **BigDecimal** | The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated <TaxAmount> is not correct. | [optional]
**item** | [**LineItemItem**](LineItemItem.md) | | [optional]
**line_amount** | **BigDecimal** | If you wish to omit either of the <Quantity> or <UnitAmount> you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100) | [optional]
**tracking** | [**Array<LineItemTracking>**](LineItemTracking.md) | Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements. | [optional]
**discount_rate** | **BigDecimal** | Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts | [optional]
Expand All @@ -33,6 +34,7 @@ instance = XeroRuby::Accounting::LineItem.new(line_item_id: 00000000-0000-0000-0
account_id: 00000000-0000-0000-0000-000000000000,
tax_type: null,
tax_amount: null,
item: null,
line_amount: null,
tracking: null,
discount_rate: null,
Expand Down
21 changes: 21 additions & 0 deletions docs/accounting/LineItemItem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# XeroRuby::Accounting::LineItemItem

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **String** | User defined item code (max length = 30) | [optional]
**name** | **String** | The name of the item (max length = 50) | [optional]
**item_id** | **String** | The Xero identifier for an Item | [optional]

## Code Sample

```ruby
require 'XeroRuby::Accounting'

instance = XeroRuby::Accounting::LineItemItem.new(code: null,
name: null,
item_id: null)
```


26 changes: 25 additions & 1 deletion docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3535,6 +3535,9 @@
"format" : "double",
"x-is-money" : true
},
"Item" : {
"$ref" : "#/components/schemas/LineItemItem"
},
"LineAmount" : {
"type" : "number",
"description" : "If you wish to omit either of the <Quantity> or <UnitAmount> you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100)",
Expand Down Expand Up @@ -3571,6 +3574,27 @@
"externalDocs" : {
"url" : "https://developer.xero.com/documentation/api/invoices#post"
}
};
defs["LineItemItem"] = {
"title" : "",
"properties" : {
"Code" : {
"maxLength" : 30,
"type" : "string",
"description" : "User defined item code (max length = 30)"
},
"Name" : {
"maxLength" : 50,
"type" : "string",
"description" : "The name of the item (max length = 50)"
},
"ItemID" : {
"type" : "string",
"description" : "The Xero identifier for an Item",
"format" : "uuid"
}
},
"description" : ""
};
defs["LineItemTracking"] = {
"title" : "",
Expand Down Expand Up @@ -5984,7 +6008,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>3.6.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>3.7.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 @@ -1133,7 +1133,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>3.6.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>3.7.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 @@ -1391,7 +1391,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>3.6.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>3.7.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 @@ -1155,7 +1155,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>3.6.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>3.7.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
23 changes: 23 additions & 0 deletions docs/finance/BankStatementAccountingResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# XeroRuby::Finance::BankStatementAccountingResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_account_id** | **String** | Xero Identifier of bank account | [optional]
**bank_account_name** | **String** | Name of bank account | [optional]
**bank_account_currency_code** | **String** | Currency code of the bank account | [optional]
**statements** | [**Array&lt;StatementResponse&gt;**](StatementResponse.md) | List of bank statements and linked accounting data for the requested period | [optional]

## Code Sample

```ruby
require 'XeroRuby::Finance'

instance = XeroRuby::Finance::BankStatementAccountingResponse.new(bank_account_id: null,
bank_account_name: null,
bank_account_currency_code: null,
statements: null)
```


27 changes: 27 additions & 0 deletions docs/finance/BankTransactionResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# XeroRuby::Finance::BankTransactionResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bank_transaction_id** | **String** | Xero Identifier of transaction | [optional]
**batch_payment_id** | **String** | Xero Identifier of batch payment. Present if the transaction is part of a batch. | [optional]
**contact** | [**ContactResponse**](ContactResponse.md) | | [optional]
**date** | **DateTime** | Date of transaction - YYYY-MM-DD | [optional]
**amount** | **BigDecimal** | Amount of transaction | [optional]
**line_items** | [**Array&lt;LineItemResponse&gt;**](LineItemResponse.md) | The LineItems element can contain any number of individual LineItem sub-elements. Not included in summary mode | [optional]

## Code Sample

```ruby
require 'XeroRuby::Finance'

instance = XeroRuby::Finance::BankTransactionResponse.new(bank_transaction_id: null,
batch_payment_id: null,
contact: null,
date: null,
amount: null,
line_items: null)
```


19 changes: 19 additions & 0 deletions docs/finance/ContactResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# XeroRuby::Finance::ContactResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**contact_id** | **String** | Xero Identifier of contact | [optional]
**contact_name** | **String** | Full name of contact/organisation | [optional]

## Code Sample

```ruby
require 'XeroRuby::Finance'

instance = XeroRuby::Finance::ContactResponse.new(contact_id: null,
contact_name: null)
```


23 changes: 23 additions & 0 deletions docs/finance/CreditNoteResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# XeroRuby::Finance::CreditNoteResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**credit_note_id** | **String** | Xero Identifier of credit note | [optional]
**contact** | [**ContactResponse**](ContactResponse.md) | | [optional]
**total** | **BigDecimal** | Total of Invoice tax inclusive (i.e. SubTotal + TotalTax); Not included in summary mode | [optional]
**line_items** | [**Array&lt;LineItemResponse&gt;**](LineItemResponse.md) | Not included in summary mode | [optional]

## Code Sample

```ruby
require 'XeroRuby::Finance'

instance = XeroRuby::Finance::CreditNoteResponse.new(credit_note_id: null,
contact: null,
total: null,
line_items: null)
```


76 changes: 76 additions & 0 deletions docs/finance/FinanceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Method | HTTP request | Description
[**get_accounting_activity_lock_history**](FinanceApi.md#get_accounting_activity_lock_history) | **GET** /AccountingActivities/LockHistory | Get lock history
[**get_accounting_activity_report_history**](FinanceApi.md#get_accounting_activity_report_history) | **GET** /AccountingActivities/ReportHistory | Get report history
[**get_accounting_activity_user_activities**](FinanceApi.md#get_accounting_activity_user_activities) | **GET** /AccountingActivities/UserActivities | Get user activities
[**get_bank_statement_accounting**](FinanceApi.md#get_bank_statement_accounting) | **GET** /BankStatementsPlus/statements | Get Bank Statement Accounting
[**get_cash_validation**](FinanceApi.md#get_cash_validation) | **GET** /CashValidation | Get cash validation
[**get_financial_statement_balance_sheet**](FinanceApi.md#get_financial_statement_balance_sheet) | **GET** /FinancialStatements/BalanceSheet | Get Balance Sheet report
[**get_financial_statement_cashflow**](FinanceApi.md#get_financial_statement_cashflow) | **GET** /FinancialStatements/Cashflow | Get Cash flow report
Expand Down Expand Up @@ -297,6 +298,81 @@ Name | Type | Description | Notes
- **Accept**: application/json


## get_bank_statement_accounting

> BankStatementAccountingResponse get_bank_statement_accounting(xero_tenant_id, bank_account_id, from_date, to_date, opts)
Get Bank Statement Accounting

For lenders that prefer using bank statement data as the source of truth. We provide a data point that will allow access to customer bank statements, plus for reconciled bank transactions the matching accounting, invoice and billing data as well. As customers reconcile bank statements to invoices and bills, this transaction detail will provide valuable insight for lender's assessment measures.

### 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_account_id = 'bank_account_id_example' # String | string, GUID Bank account Id
from_date = '2020-07-01' # String | date, yyyy-MM-dd Specifies the start date of the query period. The maximum range of the query period is 12 months. If the specified query period is more than 12 months the request will be rejected.
to_date = '2021-06-30' # String | date, yyyy-MM-dd Specifies the end date of the query period. If the end date is a future date, the request will be rejected.
opts = {
summary_only: true # Boolean | boolean, true/false The default value is true if no parameter is provided. In summary mode, the response will exclude the computation-heavy LineItems fields from bank transaction, invoice, credit note, prepayment and overpayment data, making the API calls quicker and more efficient.
}

begin
#Get Bank Statement Accounting
result = api_instance.get_bank_statement_accounting(xero_tenant_id, bank_account_id, from_date, to_date, opts)
p result
rescue XeroRuby::Finance::ApiError => e
puts "Exception when calling FinanceApi->get_bank_statement_accounting: #{e}"
end
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **String**| Xero identifier for Tenant |
**bank_account_id** | [**String**](.md)| string, GUID Bank account Id |
**from_date** | **String**| date, yyyy-MM-dd Specifies the start date of the query period. The maximum range of the query period is 12 months. If the specified query period is more than 12 months the request will be rejected. |
**to_date** | **String**| date, yyyy-MM-dd Specifies the end date of the query period. If the end date is a future date, the request will be rejected. |
**summary_only** | **Boolean**| boolean, true/false The default value is true if no parameter is provided. In summary mode, the response will exclude the computation-heavy LineItems fields from bank transaction, invoice, credit note, prepayment and overpayment data, making the API calls quicker and more efficient. | [optional]

### Return type

[**BankStatementAccountingResponse**](BankStatementAccountingResponse.md)

### Authorization

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

### HTTP request headers

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


## get_cash_validation

> Array&lt;CashValidationResponse&gt; get_cash_validation(xero_tenant_id, opts)
Expand Down
23 changes: 23 additions & 0 deletions docs/finance/InvoiceResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# XeroRuby::Finance::InvoiceResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**invoice_id** | **String** | Xero Identifier of invoice | [optional]
**contact** | [**ContactResponse**](ContactResponse.md) | | [optional]
**total** | **BigDecimal** | Total of Invoice tax inclusive (i.e. SubTotal + TotalTax); Not included in summary mode | [optional]
**line_items** | [**Array&lt;LineItemResponse&gt;**](LineItemResponse.md) | Not included in summary mode | [optional]

## Code Sample

```ruby
require 'XeroRuby::Finance'

instance = XeroRuby::Finance::InvoiceResponse.new(invoice_id: null,
contact: null,
total: null,
line_items: null)
```


23 changes: 23 additions & 0 deletions docs/finance/LineItemResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# XeroRuby::Finance::LineItemResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_id** | **String** | Xero Identifier of account | [optional]
**reporting_code** | **String** | Shown if set | [optional]
**line_amount** | **BigDecimal** | Amount of line item | [optional]
**account_type** | **String** | Account type | [optional]

## Code Sample

```ruby
require 'XeroRuby::Finance'

instance = XeroRuby::Finance::LineItemResponse.new(account_id: null,
reporting_code: null,
line_amount: null,
account_type: null)
```


23 changes: 23 additions & 0 deletions docs/finance/OverpaymentResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# XeroRuby::Finance::OverpaymentResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**overpayment_id** | **String** | Xero Identifier of overpayment | [optional]
**contact** | [**ContactResponse**](ContactResponse.md) | | [optional]
**total** | **BigDecimal** | Total of Invoice tax inclusive (i.e. SubTotal + TotalTax); Not included in summary mode | [optional]
**line_items** | [**Array&lt;LineItemResponse&gt;**](LineItemResponse.md) | Not included in summary mode | [optional]

## Code Sample

```ruby
require 'XeroRuby::Finance'

instance = XeroRuby::Finance::OverpaymentResponse.new(overpayment_id: null,
contact: null,
total: null,
line_items: null)
```


Loading

0 comments on commit c58bcf4

Please sign in to comment.