Skip to content

Commit

Permalink
Merge pull request #221 from XeroAPI/xero-ruby-3.8.0
Browse files Browse the repository at this point in the history
generates xero-ruby 3.8.0 from OAS 2.21.0
  • Loading branch information
RettBehrens authored Apr 14, 2022
2 parents ece198e + eab865d commit 4e48ac2
Show file tree
Hide file tree
Showing 16 changed files with 675 additions and 636 deletions.
2 changes: 1 addition & 1 deletion docs/accounting/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ api_instance = xero_client.<api_set>


xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
contacts = { "Id": "e997d6d7-6dad-4458-beb8-d9c1bf7f2edf", "Status": "OK", "ProviderName": "Xero API Partner", "DateTimeUTC": "/Date(1551399321121)/", "Contacts": [ { "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591", "ContactStatus": "ACTIVE", "Name": "Foo9987", "EmailAddress": "[email protected]", "BankAccountDetails": "", "Addresses": [ { "AddressType": "STREET", "City": "", "Region": "", "PostalCode": "", "Country": "" }, { "AddressType": "POBOX", "City": "", "Region": "", "PostalCode": "", "Country": "" } ], "Phones": [ { "PhoneType": "DEFAULT", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "DDI", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "FAX", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "MOBILE", "PhoneNumber": "555-1212", "PhoneAreaCode": "415", "PhoneCountryCode": "" } ], "UpdatedDateUTC": "/Date(1551399321043+0000)/", "ContactGroups": [], "IsSupplier": false, "IsCustomer": false, "SalesTrackingCategories": [], "PurchasesTrackingCategories": [], "PaymentTerms": { "Bills": { "Day": 15, "Type": "OFCURRENTMONTH" }, "Sales": { "Day": 10, "Type": "DAYSAFTERBILLMONTH" } }, "ContactPersons": [], "HasValidationErrors": false } ] } # Contacts | Contacts with an array of Contact objects to create in body of request
contacts = { "Contacts": [ { "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591", "ContactStatus": "ACTIVE", "Name": "Foo9987", "EmailAddress": "[email protected]", "BankAccountDetails": "", "Addresses": [ { "AddressType": "STREET", "City": "", "Region": "", "PostalCode": "", "Country": "" }, { "AddressType": "POBOX", "City": "", "Region": "", "PostalCode": "", "Country": "" } ], "Phones": [ { "PhoneType": "DEFAULT", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "DDI", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "FAX", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "MOBILE", "PhoneNumber": "555-1212", "PhoneAreaCode": "415", "PhoneCountryCode": "" } ], "UpdatedDateUTC": "/Date(1551399321043+0000)/", "ContactGroups": [], "IsSupplier": false, "IsCustomer": false, "SalesTrackingCategories": [], "PurchasesTrackingCategories": [], "PaymentTerms": { "Bills": { "Day": 15, "Type": "OFCURRENTMONTH" }, "Sales": { "Day": 10, "Type": "DAYSAFTERBILLMONTH" } }, "ContactPersons": [] } ] } # Contacts | Contacts with an array of Contact objects to create in body of request
opts = {
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
}
Expand Down
4 changes: 2 additions & 2 deletions docs/accounting/index.html
Original file line number Diff line number Diff line change
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.7.1</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>3.8.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 @@ -9224,7 +9224,7 @@ <h2>Parameters</h2>
"schema" : {
"$ref" : "#/components/schemas/Contacts"
},
"example" : "{ \"Id\": \"e997d6d7-6dad-4458-beb8-d9c1bf7f2edf\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"/Date(1551399321121)/\", \"Contacts\": [ { \"ContactID\": \"3ff6d40c-af9a-40a3-89ce-3c1556a25591\", \"ContactStatus\": \"ACTIVE\", \"Name\": \"Foo9987\", \"EmailAddress\": \"[email protected]\", \"BankAccountDetails\": \"\", \"Addresses\": [ { \"AddressType\": \"STREET\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" }, { \"AddressType\": \"POBOX\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" } ], \"Phones\": [ { \"PhoneType\": \"DEFAULT\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"DDI\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"FAX\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"MOBILE\", \"PhoneNumber\": \"555-1212\", \"PhoneAreaCode\": \"415\", \"PhoneCountryCode\": \"\" } ], \"UpdatedDateUTC\": \"/Date(1551399321043+0000)/\", \"ContactGroups\": [], \"IsSupplier\": false, \"IsCustomer\": false, \"SalesTrackingCategories\": [], \"PurchasesTrackingCategories\": [], \"PaymentTerms\": { \"Bills\": { \"Day\": 15, \"Type\": \"OFCURRENTMONTH\" }, \"Sales\": { \"Day\": 10, \"Type\": \"DAYSAFTERBILLMONTH\" } }, \"ContactPersons\": [], \"HasValidationErrors\": false } ] }"
"example" : "{ \"Contacts\": [ { \"ContactID\": \"3ff6d40c-af9a-40a3-89ce-3c1556a25591\", \"ContactStatus\": \"ACTIVE\", \"Name\": \"Foo9987\", \"EmailAddress\": \"[email protected]\", \"BankAccountDetails\": \"\", \"Addresses\": [ { \"AddressType\": \"STREET\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" }, { \"AddressType\": \"POBOX\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" } ], \"Phones\": [ { \"PhoneType\": \"DEFAULT\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"DDI\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"FAX\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"MOBILE\", \"PhoneNumber\": \"555-1212\", \"PhoneAreaCode\": \"415\", \"PhoneCountryCode\": \"\" } ], \"UpdatedDateUTC\": \"/Date(1551399321043+0000)/\", \"ContactGroups\": [], \"IsSupplier\": false, \"IsCustomer\": false, \"SalesTrackingCategories\": [], \"PurchasesTrackingCategories\": [], \"PaymentTerms\": { \"Bills\": { \"Day\": 15, \"Type\": \"OFCURRENTMONTH\" }, \"Sales\": { \"Day\": 10, \"Type\": \"DAYSAFTERBILLMONTH\" } }, \"ContactPersons\": [] } ] }"
}
},
"required" : true
Expand Down
6 changes: 4 additions & 2 deletions docs/app_store/Product.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | The unique identifier for the product | [optional]
**name** | **String** | The name of the product | [optional]
**type** | **String** | The pricing model of the product: * FIXED: Customers are charged a fixed amount for each billing period * PER_SEAT: Customers are charged based on the number of units they purchase | [optional]
**seat_unit** | **String** | The unit of the per seat product. e.g. \&quot;user\&quot;, \&quot;organisation\&quot;, \&quot;SMS\&quot;, etc | [optional]
**type** | **String** | The pricing model of the product: * FIXED: Customers are charged a fixed amount for each billing period * PER_SEAT: Customers are charged based on the number of units they purchase * METERED: Customers are charged per use of this product | [optional]
**usage_unit** | **String** | The unit of the usage product. e.g. \&quot;user\&quot;, \&quot;minutes\&quot;, \&quot;SMS\&quot;, etc | [optional]

## Code Sample

Expand All @@ -16,8 +17,9 @@ require 'XeroRuby::AppStore'

instance = XeroRuby::AppStore::Product.new(id: null,
name: null,
seat_unit: null,
type: null,
seat_unit: null)
usage_unit: null)
```


2 changes: 2 additions & 0 deletions docs/app_store/SubscriptionItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**id** | **String** | The unique identifier of the subscription item. |
**price** | [**Price**](Price.md) | |
**product** | [**Product**](Product.md) | |
**quantity** | **Integer** | The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a positive integer. For metered products, it is always null. | [optional]
**start_date** | **DateTime** | Date the subscription started, or will start. Note: this could be in the future for downgrades or reduced number of seats that haven&#39;t taken effect yet. |
**status** | **String** | Status of the subscription item. Available statuses are ACTIVE, CANCELED, and PENDING_ACTIVATION. |
**test_mode** | **Boolean** | If the subscription is a test subscription | [optional]
Expand All @@ -21,6 +22,7 @@ instance = XeroRuby::AppStore::SubscriptionItem.new(end_date: null,
id: null,
price: null,
product: null,
quantity: null,
start_date: null,
status: null,
test_mode: null)
Expand Down
18 changes: 13 additions & 5 deletions docs/app_store/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -951,14 +951,18 @@
"type" : "string",
"description" : "The name of the product"
},
"seatUnit" : {
"type" : "string",
"description" : "The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc"
},
"type" : {
"type" : "string",
"description" : "The pricing model of the product:\n* FIXED: Customers are charged a fixed amount for each billing period\n* PER_SEAT: Customers are charged based on the number of units they purchase\n",
"enum" : [ "FIXED", "PER_SEAT" ]
"description" : "The pricing model of the product:\n* FIXED: Customers are charged a fixed amount for each billing period\n* PER_SEAT: Customers are charged based on the number of units they purchase\n* METERED: Customers are charged per use of this product\n",
"enum" : [ "FIXED", "PER_SEAT", "METERED" ]
},
"seatUnit" : {
"usageUnit" : {
"type" : "string",
"description" : "The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc"
"description" : "The unit of the usage product. e.g. \"user\", \"minutes\", \"SMS\", etc"
}
},
"description" : ""
Expand Down Expand Up @@ -1033,6 +1037,10 @@
"product" : {
"$ref" : "#/components/schemas/Product"
},
"quantity" : {
"type" : "integer",
"description" : "The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a positive integer. For metered products, it is always null."
},
"startDate" : {
"type" : "string",
"description" : "Date the subscription started, or will start. Note: this could be in\nthe future for downgrades or reduced number of seats that haven't taken effect yet.\n",
Expand Down Expand Up @@ -1133,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.7.1</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>3.8.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
43 changes: 22 additions & 21 deletions docs/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,8 @@
"example" : 33
}
},
"description" : ""
"description" : "",
"x-snake" : "asset_type"
};
defs["Assets"] = {
"title" : "",
Expand Down Expand Up @@ -1391,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.7.1</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>3.8.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 Expand Up @@ -1454,7 +1455,7 @@ <h3>Usage and SDK Samples</h3>
<div class="tab-pane" id="examples-Asset-createAsset-0-ruby">
<pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)

xeroTenantId = 'YOUR_XERO_TENANT_ID'
xero_tenant_id = 'YOUR_XERO_TENANT_ID'

asset = {
asset_name: "Other Computer",
Expand All @@ -1463,7 +1464,7 @@ <h3>Usage and SDK Samples</h3>
}

begin
response = xero_client.accounting_api.create_asset(xeroTenantId, asset)
response = xero_client.accounting_api.create_asset(xero_tenant_id, asset)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling create_asset: #{e}"
Expand Down Expand Up @@ -1576,25 +1577,25 @@ <h3>Usage and SDK Samples</h3>
<div class="tab-pane" id="examples-Asset-createAssetType-0-ruby">
<pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)

xeroTenantId = 'YOUR_XERO_TENANT_ID'
xero_tenant_id = 'YOUR_XERO_TENANT_ID'

bookDepreciationSetting = {
book_depreciation_setting = {
depreciation_method: "DiminishingValue100",
averaging_method: "ActualDays",
deprecitation_rate: 40,
depreciation_calculation_method: "None"
}

assetType = {
asset_type = {
asset_type_name: "Computer Equipment",
fixed_asset_account_id: "00000000-0000-0000-0000-000000000000",
depreciation_expense_account_id: "00000000-0000-0000-0000-000000000000",
accumulated_depreciation_account_id: "00000000-0000-0000-0000-000000000000",
bookDepreciationSetting: book_depreciation_setting
book_depreciation_setting: book_depreciation_setting
}

begin
response = xero_client.accounting_api.create_asset_type(xeroTenantId, assetType)
response = xero_client.accounting_api.create_asset_type(xero_tenant_id, assetType)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling create_asset_type: #{e}"
Expand Down Expand Up @@ -1704,11 +1705,11 @@ <h3>Usage and SDK Samples</h3>
<div class="tab-pane" id="examples-Asset-getAssetById-0-ruby">
<pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)

xeroTenantId = 'YOUR_XERO_TENANT_ID'
xero_tenant_id = 'YOUR_XERO_TENANT_ID'
id = '00000000-0000-0000-0000-000000000000'

begin
response = xero_client.accounting_api.get_asset_by_id(xeroTenantId, id)
response = xero_client.accounting_api.get_asset_by_id(xero_tenant_id, id)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_asset_by_id: #{e}"
Expand Down Expand Up @@ -1822,10 +1823,10 @@ <h3>Usage and SDK Samples</h3>
<div class="tab-pane" id="examples-Asset-getAssetSettings-0-ruby">
<pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)

xeroTenantId = 'YOUR_XERO_TENANT_ID'
xero_tenant_id = 'YOUR_XERO_TENANT_ID'

begin
response = xero_client.accounting_api.get_asset_settings(xeroTenantId)
response = xero_client.accounting_api.get_asset_settings(xero_tenant_id)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_asset_settings: #{e}"
Expand Down Expand Up @@ -1906,10 +1907,10 @@ <h3>Usage and SDK Samples</h3>
<div class="tab-pane" id="examples-Asset-getAssetTypes-0-ruby">
<pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)

xeroTenantId = 'YOUR_XERO_TENANT_ID'
xero_tenant_id = 'YOUR_XERO_TENANT_ID'

begin
response = xero_client.accounting_api.get_asset_types(xeroTenantId)
response = xero_client.accounting_api.get_asset_types(xero_tenant_id)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_asset_types: #{e}"
Expand Down Expand Up @@ -1990,16 +1991,16 @@ <h3>Usage and SDK Samples</h3>
<div class="tab-pane" id="examples-Asset-getAssets-0-ruby">
<pre class="prettyprint"><code class="language-ruby">xero_client.set_token_set(user.token_set)

xeroTenantId = 'YOUR_XERO_TENANT_ID'
xero_tenant_id = 'YOUR_XERO_TENANT_ID'
status =
page = 1
pageSize = 5
orderBy = 'AssetName'
sortDirection = 'ASC'
filterBy = 'Company Car'
page_size = 5
order_by = 'AssetName'
sort_direction = 'ASC'
filter_by = 'Company Car'

begin
response = xero_client.accounting_api.get_assets(xeroTenantId, status, page, pageSize, orderBy, sortDirection, filterBy)
response = xero_client.accounting_api.get_assets(xero_tenant_id, status, page, page_size, order_by, sort_direction, filter_by)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_assets: #{e}"
Expand Down
Loading

0 comments on commit 4e48ac2

Please sign in to comment.