Skip to content

Commit

Permalink
generates xero-ruby 3.9.0 from OAS 2.22.4
Browse files Browse the repository at this point in the history
  • Loading branch information
RettBehrens committed May 9, 2022
1 parent 4e48ac2 commit f0a0ad6
Show file tree
Hide file tree
Showing 17 changed files with 326 additions and 22 deletions.
65 changes: 65 additions & 0 deletions docs/accounting/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Method | HTTP request | Description
[**get_item_history**](AccountingApi.md#get_item_history) | **GET** /Items/{ItemID}/History | Retrieves history for a specific item
[**get_items**](AccountingApi.md#get_items) | **GET** /Items | Retrieves items
[**get_journal**](AccountingApi.md#get_journal) | **GET** /Journals/{JournalID} | Retrieves a specific journal using a unique journal Id.
[**get_journal_by_number**](AccountingApi.md#get_journal_by_number) | **GET** /Journals/{JournalNumber} | Retrieves a specific journal using a unique journal number.
[**get_journals**](AccountingApi.md#get_journals) | **GET** /Journals | Retrieves journals
[**get_linked_transaction**](AccountingApi.md#get_linked_transaction) | **GET** /LinkedTransactions/{LinkedTransactionID} | Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id
[**get_linked_transactions**](AccountingApi.md#get_linked_transactions) | **GET** /LinkedTransactions | Retrieves linked transactions (billable expenses)
Expand Down Expand Up @@ -8531,6 +8532,70 @@ Name | Type | Description | Notes
- **Accept**: application/json


## get_journal_by_number

> Journals get_journal_by_number(xero_tenant_id, journal_number)

Retrieves a specific journal using a unique journal number.

### 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
journal_number = 1000 # Integer | Number of a Journal
begin
#Retrieves a specific journal using a unique journal number.
result = api_instance.get_journal_by_number(xero_tenant_id, journal_number)
p result
rescue XeroRuby::Accounting::ApiError => e
puts "Exception when calling AccountingApi->get_journal_by_number: #{e}"
end
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **String**| Xero identifier for Tenant |
**journal_number** | **Integer**| Number of a Journal |

### Return type

[**Journals**](Journals.md)

### Authorization

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

### HTTP request headers

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


## get_journals

> Journals get_journals(xero_tenant_id, opts)
Expand Down
121 changes: 117 additions & 4 deletions docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4017,7 +4017,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" ]
"enum" : [ "DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK", "ULTIMATE" ]
},
"Edition" : {
"type" : "string",
Expand Down Expand Up @@ -5560,7 +5560,7 @@
"ReportTaxType" : {
"type" : "string",
"description" : "See ReportTaxTypes",
"enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT" ]
"enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT" ]
},
"CanApplyToAssets" : {
"type" : "boolean",
Expand Down Expand Up @@ -5625,7 +5625,7 @@
"title" : "",
"type" : "string",
"description" : "See Tax Types – can only be used on update calls",
"enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5" ]
"enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33INPUT", "TXRCREINPUT", "TXRCESSINPUT" ]
};
defs["TenNinetyNineContact"] = {
"title" : "",
Expand Down Expand Up @@ -6008,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.8.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>3.9.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 @@ -6379,6 +6379,9 @@
<li data-group="Accounting" data-name="getJournal" class="">
<a href="#api-Accounting-getJournal">getJournal</a>
</li>
<li data-group="Accounting" data-name="getJournalByNumber" class="">
<a href="#api-Accounting-getJournalByNumber">getJournalByNumber</a>
</li>
<li data-group="Accounting" data-name="getJournals" class="">
<a href="#api-Accounting-getJournals">getJournals</a>
</li>
Expand Down Expand Up @@ -25274,6 +25277,116 @@ <h2>Parameters</h2>
</div>
</div>
</td>
</tr>

</table>
</article>
</div>
<hr>
<div id="api-Accounting-getJournalByNumber">
<article id="api-Accounting-getJournalByNumber-0" data-group="User" data-name="getJournalByNumber" data-version="0">
<div class="pull-left">
<h1>getJournalByNumber</h1>
<p>Retrieves a specific journal using a unique journal number.</p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked"></p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/Journals/{JournalNumber}</span></code></pre>
<p>
<h3>Usage and SDK Samples</h3>
</p>
<ul class="nav nav-tabs nav-tabs-examples">
<!-- *****REPLACE***** comment out the other languages <li> -->
<li class=""><a href="#examples-Accounting-getJournalByNumber-0-ruby">Ruby</a></li>
</ul>
<div class="tab-content">
<!-- *****REPLACE***** comment out the other languages tab-pane -->
<div class="tab-pane" id="examples-Accounting-getJournalByNumber-0-ruby">
<pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)

xero_tenant_id = 'YOUR_XERO_TENANT_ID'
journal_number = 1000

begin
response = xero_client.accounting_api.get_journal_by_number(xero_tenant_id, journal_number)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_journal_by_number: #{e}"
end
</code></pre>
</div>
</div>
<h2>Scopes</h2>
<table>

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

</table>
<h2>Parameters</h2>
<div class="methodsubtabletitle">Path parameters</div>
<table id="methodsubtable">
<tr>
<th width="150px">Name</th>
<th>Description</th>
</tr>
<tr><td style="width:150px;">JournalNumber<span style="color:red;">*</span></td>
<td>


<div id="d2e199_getJournalByNumber_journalNumber">
<div class="json-schema-view">
<div class="primitive">
<span class="type">
Integer
</span>

<div class="inner description marked">
Number of a Journal
</div>
</div>
<div class="inner required">
Required
</div>
</div>
</div>
</td>
</tr>

</table>
<div class="methodsubtabletitle">Header parameters</div>
<table id="methodsubtable">
<tr>
<th width="150px">Name</th>
<th>Description</th>
</tr>
<tr><td style="width:150px;">xero-tenant-id<span style="color:red;">*</span></td>
<td>


<div id="d2e199_getJournalByNumber_xeroTenantId">
<div class="json-schema-view">
<div class="primitive">
<span class="type">
String
</span>

<div class="inner description marked">
Xero identifier for Tenant
</div>
</div>
<div class="inner required">
Required
</div>
</div>
</div>
</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 @@ -1141,7 +1141,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.8.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>3.9.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 @@ -1392,7 +1392,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.8.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>3.9.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.8.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>3.9.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
6 changes: 5 additions & 1 deletion docs/finance/StatementResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Name | Type | Description | Notes
**start_date** | **Date** | Start date of statement | [optional]
**end_date** | **Date** | End date of statement | [optional]
**imported_date_time_utc** | **DateTime** | Utc date time of when the statement was imported in Xero | [optional]
**import_source** | **String** | Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF, STMTIMPORTSRC/OFX, XeroApi) | [optional]
**import_source** | **String** | Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2) manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the direct solution, may contain the name of the financial institution. | [optional]
**start_balance** | **BigDecimal** | Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. | [optional]
**end_balance** | **BigDecimal** | Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. | [optional]
**statement_lines** | [**Array&lt;StatementLineResponse&gt;**](StatementLineResponse.md) | List of statement lines | [optional]

## Code Sample
Expand All @@ -21,6 +23,8 @@ instance = XeroRuby::Finance::StatementResponse.new(statement_id: null,
end_date: null,
imported_date_time_utc: null,
import_source: null,
start_balance: null,
end_balance: null,
statement_lines: null)
```

Expand Down
16 changes: 14 additions & 2 deletions docs/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2345,7 +2345,19 @@
},
"importSource" : {
"type" : "string",
"description" : "Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF, STMTIMPORTSRC/OFX, XeroApi)"
"description" : "Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2) manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the direct solution, may contain the name of the financial institution."
},
"startBalance" : {
"type" : "number",
"description" : "Opening balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied.",
"format" : "double",
"x-is-money" : true
},
"endBalance" : {
"type" : "number",
"description" : "Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied.",
"format" : "double",
"x-is-money" : true
},
"statementLines" : {
"type" : "array",
Expand Down Expand Up @@ -2706,7 +2718,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>3.8.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>3.9.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 @@ -3254,7 +3254,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>3.8.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>3.9.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="createEmployee" class="">
<a href="#api-PayrollAu-createEmployee">createEmployee</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 @@ -3838,7 +3838,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>3.8.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>3.9.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
Loading

0 comments on commit f0a0ad6

Please sign in to comment.