Skip to content

Commit

Permalink
Merge pull request #217 from XeroAPI/xero-ruby-3.6.0
Browse files Browse the repository at this point in the history
Xero ruby 3.6.0
  • Loading branch information
RettBehrens authored Feb 1, 2022
2 parents 9fd301b + 1624911 commit 53f0118
Show file tree
Hide file tree
Showing 141 changed files with 1,874 additions and 1,689 deletions.
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
/test/tmp/
/test/version_tmp/
/tmp/
.ruby-version
.ruby-gemset

# Used by dotenv library to load environment variables.
.env
Expand Down Expand Up @@ -44,9 +42,9 @@ build-iPhoneSimulator/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset
Gemfile.lock
.ruby-version
.ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
Expand Down
51 changes: 28 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,82 +1,86 @@
PATH
remote: .
specs:
xero-ruby (3.4.0)
xero-ruby (3.6.0)
faraday (~> 1.0, >= 1.0.1)
json (~> 2.1, >= 2.1.0)
json-jwt (~> 1.5, >= 1.5.2)

GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.4.1)
activesupport (7.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
aes_key_wrap (1.1.0)
ast (2.4.1)
ast (2.4.2)
bindata (2.4.10)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.1.9)
diff-lcs (1.4.4)
faraday (1.8.0)
diff-lcs (1.5.0)
faraday (1.9.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
i18n (1.8.10)
faraday-retry (1.0.3)
i18n (1.9.1)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
json (2.5.1)
json (2.6.1)
json-jwt (1.13.0)
activesupport (>= 4.2)
aes_key_wrap
bindata
method_source (1.0.0)
minitest (5.14.4)
minitest (5.15.0)
multipart-post (2.1.1)
parallel (1.20.1)
parser (2.7.2.0)
parallel (1.21.0)
parser (3.1.0.0)
ast (~> 2.4.1)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
psych (3.2.1)
rainbow (3.0.0)
psych (4.0.3)
stringio
rainbow (3.1.1)
rake (12.3.3)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.0)
rspec-core (3.10.2)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.0)
rspec-expectations (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
rspec-mocks (3.10.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.0)
rspec-support (3.10.3)
rubocop (0.66.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
Expand All @@ -85,15 +89,16 @@ GEM
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
ruby-progressbar (1.10.1)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
stringio (3.0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (1.5.0)
zeitwerk (2.4.2)

PLATFORMS
ruby
x86_64-darwin-20

DEPENDENCIES
pry-byebug
Expand All @@ -103,4 +108,4 @@ DEPENDENCIES
xero-ruby!

BUNDLED WITH
2.2.26
2.2.3
2 changes: 1 addition & 1 deletion docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5984,7 +5984,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.4.0</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>3.6.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/Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | The unique identifier of the plan |
**name** | **String** | The name of the plan. It is used in the invoice line item description. |
**status** | **String** | Status of the plan. Available statuses are ACTIVE, PENDING_ACTIVATION. |
**status** | **String** | Status of the plan. Available statuses are ACTIVE, CANCELED, and PENDING_ACTIVATION. |
**subscription_items** | [**Array&lt;SubscriptionItem&gt;**](SubscriptionItem.md) | List of the subscription items belonging to the plan. It does not include cancelled subscription items. |

## Code Sample
Expand Down
2 changes: 2 additions & 0 deletions docs/app_store/SubscriptionItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**price** | [**Price**](Price.md) | |
**product** | [**Product**](Product.md) | |
**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]

## Code Sample
Expand All @@ -21,6 +22,7 @@ instance = XeroRuby::AppStore::SubscriptionItem.new(end_date: null,
price: null,
product: null,
start_date: null,
status: null,
test_mode: null)
```

Expand Down
16 changes: 11 additions & 5 deletions docs/app_store/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,8 @@
},
"status" : {
"type" : "string",
"description" : "Status of the plan. Available statuses are ACTIVE,\nPENDING_ACTIVATION.\n",
"enum" : [ "ACTIVE", "PENDING_ACTIVATION" ]
"description" : "Status of the plan. Available statuses are ACTIVE, CANCELED, and\nPENDING_ACTIVATION.\n",
"enum" : [ "ACTIVE", "CANCELED", "PENDING_ACTIVATION" ]
},
"subscriptionItems" : {
"type" : "array",
Expand Down Expand Up @@ -1002,7 +1002,8 @@
},
"status" : {
"type" : "string",
"description" : "Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE."
"description" : "Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE.",
"enum" : [ "ACTIVE", "CANCELED", "PAST_DUE" ]
},
"testMode" : {
"type" : "boolean",
Expand All @@ -1013,7 +1014,7 @@
};
defs["SubscriptionItem"] = {
"title" : "",
"required" : [ "id", "price", "product", "startDate" ],
"required" : [ "id", "price", "product", "startDate", "status" ],
"type" : "object",
"properties" : {
"endDate" : {
Expand All @@ -1037,6 +1038,11 @@
"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",
"format" : "date-time"
},
"status" : {
"type" : "string",
"description" : "Status of the subscription item. Available statuses are ACTIVE, CANCELED, and\nPENDING_ACTIVATION.\n",
"enum" : [ "ACTIVE", "CANCELED", "PENDING_ACTIVATION" ]
},
"testMode" : {
"type" : "boolean",
"description" : "If the subscription is a test subscription"
Expand Down Expand Up @@ -1127,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.4.0</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>3.6.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.4.0</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>3.6.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
6 changes: 3 additions & 3 deletions docs/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1008,13 +1008,13 @@
"title" : "",
"type" : "string",
"description" : "The Object Group that the object is in. These roughly correlate to the endpoints that can be used to retrieve the object via the core accounting API.",
"enum" : [ "Account", "BankTransaction", "Contact", "CreditNote", "Invoice", "Item", "ManualJournal", "Overpayment", "Payment", "Prepayment", "Receipt" ]
"enum" : [ "Account", "BankTransaction", "Contact", "CreditNote", "Invoice", "Item", "ManualJournal", "Overpayment", "Payment", "Prepayment", "Quote", "Receipt" ]
};
defs["ObjectType"] = {
"title" : "",
"type" : "string",
"description" : "The Object Type",
"enum" : [ "Unknown", "Accpay", "AccPayCredit", "AccPayPayment", "AccRec", "AccRecCredit", "AccRecPayment", "Adjustment", "ApCreditPayment", "ApOverPayment", "ApOverPaymentPayment", "ApOverPaymentSourcePayment", "ApPrepayment", "ApPrepaymentPayment", "ApPrepaymentSourcePayment", "ArCreditPayment", "ArOverPayment", "ArOverpaymentPayment", "ArOverpaymentSourcePayment", "ArPrepayment", "ArPrepaymentPayment", "ArPrepaymentSourcePayment", "CashPaid", "CashRec", "ExpPayment", "ManJournal", "PurchaseOrder", "Receipt", "Transfer", "Account", "Contact", "Business", "Employee", "Person", "User", "Org", "FixedAsset", "PayRun", "PriceListItem", "Bank", "Current", "Equity", "Expense", "Fixed", "Liability", "Prepayment", "Revenue", "Sales", "Overheads", "Depreciatn", "OtherIncome", "DirectCosts", "Currliab", "Termliab", "NonCurrent" ]
"enum" : [ "Unknown", "Accpay", "AccPayCredit", "AccPayPayment", "AccRec", "AccRecCredit", "AccRecPayment", "Adjustment", "ApCreditPayment", "ApOverPayment", "ApOverPaymentPayment", "ApOverPaymentSourcePayment", "ApPrepayment", "ApPrepaymentPayment", "ApPrepaymentSourcePayment", "ArCreditPayment", "ArOverPayment", "ArOverpaymentPayment", "ArOverpaymentSourcePayment", "ArPrepayment", "ArPrepaymentPayment", "ArPrepaymentSourcePayment", "CashPaid", "CashRec", "ExpPayment", "ManJournal", "PurchaseOrder", "Receipt", "Transfer", "Account", "Contact", "Business", "Employee", "Person", "User", "Org", "FixedAsset", "PayRun", "PriceListItem", "Bank", "Current", "Equity", "Expense", "Fixed", "Liability", "Prepayment", "Revenue", "Sales", "Overheads", "Depreciatn", "OtherIncome", "DirectCosts", "Currliab", "Termliab", "NonCurrent", "SalesQuote" ]
};
defs["UploadObject"] = {
"title" : "",
Expand Down 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.4.0</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>3.6.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
2 changes: 1 addition & 1 deletion docs/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,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.4.0</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>3.6.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
16 changes: 16 additions & 0 deletions docs/payroll_au/AllowanceCategory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# XeroRuby::PayrollAu::AllowanceCategory

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Code Sample

```ruby
require 'XeroRuby::PayrollAu'

instance = XeroRuby::PayrollAu::AllowanceCategory.new()
```


4 changes: 3 additions & 1 deletion docs/payroll_au/EarningsRate.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Name | Type | Description | Notes
**updated_date_utc** | **DateTime** | Last modified timestamp | [optional]
**current_record** | **Boolean** | Is the current record | [optional]
**allowance_type** | [**AllowanceType**](AllowanceType.md) | | [optional]
**allowance_category** | [**AllowanceCategory**](AllowanceCategory.md) | | [optional]

## Code Sample

Expand All @@ -43,7 +44,8 @@ instance = XeroRuby::PayrollAu::EarningsRate.new(name: PTO,
employment_termination_payment_type: null,
updated_date_utc: /Date(1583967733054+0000)/,
current_record: true,
allowance_type: null)
allowance_type: null,
allowance_category: null)
```


13 changes: 11 additions & 2 deletions docs/payroll_au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -916,12 +916,18 @@
"type" : "string",
"description" : "See Account Types",
"enum" : [ "BANK", "CURRENT", "CURRLIAB", "DEPRECIATN", "DIRECTCOSTS", "EQUITY", "EXPENSE", "FIXED", "INVENTORY", "LIABILITY", "NONCURRENT", "OTHERINCOME", "OVERHEADS", "PREPAYMENT", "REVENUE", "SALES", "TERMLIAB", "PAYGLIABILITY", "PAYG", "SUPERANNUATIONEXPENSE", "SUPERANNUATIONLIABILITY", "WAGESEXPENSE", "WAGESPAYABLELIABILITY" ]
};
defs["AllowanceCategory"] = {
"title" : "",
"type" : "string",
"description" : "",
"enum" : [ "NONDEDUCTIBLE", "UNIFORM", "PRIVATEVEHICLE", "HOMEOFFICE", "TRANSPORT", "GENERAL", "OTHER" ]
};
defs["AllowanceType"] = {
"title" : "",
"type" : "string",
"description" : "",
"enum" : [ "CAR", "TRANSPORT", "TRAVEL", "LAUNDRY", "MEALS", "JOBKEEPER", "OTHER" ]
"enum" : [ "CAR", "TRANSPORT", "LAUNDRY", "MEALS", "TRAVEL", "OTHER", "JOBKEEPER", "TOOLS", "TASKS", "QUALIFICATIONS" ]
};
defs["BankAccount"] = {
"title" : "",
Expand Down Expand Up @@ -1222,6 +1228,9 @@
},
"AllowanceType" : {
"$ref" : "#/components/schemas/AllowanceType"
},
"AllowanceCategory" : {
"$ref" : "#/components/schemas/AllowanceCategory"
}
},
"description" : ""
Expand Down Expand Up @@ -3245,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.4.0</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>3.6.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.4.0</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>3.6.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
2 changes: 1 addition & 1 deletion docs/payroll_uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3506,7 +3506,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>3.4.0</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>3.6.0</li>
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Project"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>3.4.0</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>3.6.0</li>
<li class="nav-header" data-group="Project"><a href="#api-Project">Methods</a></li>
<li data-group="Project" data-name="createProject" class="">
<a href="#api-Project-createProject">createProject</a>
Expand Down
1 change: 1 addition & 0 deletions lib/xero-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
require 'xero-ruby/models/payroll_au/api_exception'
require 'xero-ruby/models/payroll_au/account'
require 'xero-ruby/models/payroll_au/account_type'
require 'xero-ruby/models/payroll_au/allowance_category'
require 'xero-ruby/models/payroll_au/allowance_type'
require 'xero-ruby/models/payroll_au/bank_account'
require 'xero-ruby/models/payroll_au/calendar_type'
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def validate_tokens(token_set)
end

def validate_state(params)
if params[:state] != @state
if params['state'] != @state
raise StandardError.new "WARNING: @config.state: #{@state} and OAuth callback state: #{params['state']} do not match!"
end
return true
Expand Down
Loading

0 comments on commit 53f0118

Please sign in to comment.