Skip to content

Commit

Permalink
Merge pull request #102 from XeroAPI/fix_identity_methods_http_handling
Browse files Browse the repository at this point in the history
Fix 3 http client issues & built form OAS 2.8.0
  • Loading branch information
SerKnight authored Dec 19, 2020
2 parents a63a902 + 49b2210 commit f3f2b0c
Show file tree
Hide file tree
Showing 458 changed files with 1,163 additions and 538 deletions.
68 changes: 68 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
PATH
remote: .
specs:
xero-ruby (2.4.1)
faraday (~> 1.0.1, >= 1.0.1)
json (~> 2.1, >= 2.1.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.1)
byebug (11.1.3)
coderay (1.1.3)
diff-lcs (1.4.4)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
jaro_winkler (1.5.4)
json (2.4.1)
method_source (1.0.0)
multipart-post (2.1.1)
parallel (1.20.1)
parser (2.7.2.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)
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-support (~> 3.10.0)
rspec-expectations (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.0)
rubocop (0.66.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
psych (>= 3.1.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
ruby-progressbar (1.10.1)
unicode-display_width (1.5.0)

PLATFORMS
ruby

DEPENDENCIES
pry-byebug
rake (~> 12.3.3)
rspec (~> 3.6, >= 3.6.0)
rubocop (~> 0.66.0)
xero-ruby!

BUNDLED WITH
2.1.4
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ require 'jwt'

def token_expired?
token_expiry = Time.at(decoded_access_token['exp'])
token_expiry < Time.now
token_expiry > Time.now
end

def decoded_access_token
Expand Down Expand Up @@ -327,4 +327,4 @@ xero_client.accounting_api.get_bank_transfers(tenant_id, opts).bank_transfers
## Sample App
The best resource to understanding how to best leverage this SDK is the sample applications showing all the features of the gem.
> https://github.com/XeroAPI/xero-ruby-oauth2-starter (Sinatra - simple getting started)
> https://github.com/XeroAPI/xero-ruby-oauth2-app (Rails - full featured examples)
> https://github.com/XeroAPI/xero-ruby-oauth2-app (Rails - full featured examples)
8 changes: 4 additions & 4 deletions docs/accounting/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8512,11 +8512,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **String**| Xero identifier for Tenant |
**page** | **Integer**| Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page&#x3D;1. | [optional]
**linked_transaction_id** | **String**| The Xero identifier for an Linked Transaction | [optional]
**source_transaction_id** | **String**| Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice | [optional]
**contact_id** | **String**| Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. | [optional]
**linked_transaction_id** | [**String**](.md)| The Xero identifier for an Linked Transaction | [optional]
**source_transaction_id** | [**String**](.md)| Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice | [optional]
**contact_id** | [**String**](.md)| Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. | [optional]
**status** | **String**| Filter by the combination of ContactID and Status. Get the linked transactions associaed to a customer and with a status | [optional]
**target_transaction_id** | **String**| Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice | [optional]
**target_transaction_id** | [**String**](.md)| Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice | [optional]

### Return type

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

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address_type** | **String** | define the type of address | [optional]
**address_line1** | **String** | max length &#x3D; 500 | [optional]
**address_line2** | **String** | max length &#x3D; 500 | [optional]
**address_line3** | **String** | max length &#x3D; 500 | [optional]
**address_line4** | **String** | max length &#x3D; 500 | [optional]
**city** | **String** | max length &#x3D; 255 | [optional]
**region** | **String** | max length &#x3D; 255 | [optional]
**postal_code** | **String** | max length &#x3D; 50 | [optional]
**country** | **String** | max length &#x3D; 50, [A-Z], [a-z] only | [optional]
**attention_to** | **String** | max length &#x3D; 255 | [optional]

## Code Sample

```ruby
require 'XeroRuby::Accounting'

instance = XeroRuby::Accounting::AddressForOrganisation.new(address_type: null,
address_line1: null,
address_line2: null,
address_line3: null,
address_line4: null,
city: null,
region: null,
postal_code: null,
country: null,
attention_to: null)
```


2 changes: 1 addition & 1 deletion docs/accounting/CISOrgSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cis_contractor_enabled** | **Boolean** | true or false - Boolean that describes if the organisation is a CIS Contractor | [optional]
**cis_sub_contractor_enabled** | **Boolean** | true or false - Boolean that describes if the organisation is a CIS SubContractor | [optional]
**rate** | **Integer** | CIS Deduction rate for the organisation | [optional]
**rate** | **BigDecimal** | CIS Deduction rate for the organisation | [optional]

## Code Sample

Expand Down
2 changes: 1 addition & 1 deletion docs/accounting/CISSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cis_enabled** | **Boolean** | Boolean that describes if the contact is a CIS Subcontractor | [optional]
**rate** | **Integer** | CIS Deduction rate for the contact if he is a subcontractor. If the contact is not CISEnabled, then the rate is not returned | [optional]
**rate** | **BigDecimal** | CIS Deduction rate for the contact if he is a subcontractor. If the contact is not CISEnabled, then the rate is not returned | [optional]

## Code Sample

Expand Down
4 changes: 4 additions & 0 deletions docs/accounting/CreditNote.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Name | Type | Description | Notes
**sub_total** | **BigDecimal** | The subtotal of the credit note excluding taxes | [optional]
**total_tax** | **BigDecimal** | The total tax on the credit note | [optional]
**total** | **BigDecimal** | The total of the Credit Note(subtotal + total tax) | [optional]
**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]
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
**fully_paid_on_date** | **Date** | Date when credit note was fully paid(UTC format) | [optional]
Expand Down Expand Up @@ -47,6 +49,8 @@ instance = XeroRuby::Accounting::CreditNote.new(type: null,
sub_total: null,
total_tax: null,
total: null,
cis_deduction: null,
cis_rate: null,
updated_date_utc: /Date(1573755038314)/,
currency_code: null,
fully_paid_on_date: 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 @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**due_date** | **Date** | Date invoice is due – YYYY-MM-DD | [optional]
**line_amount_types** | [**LineAmountTypes**](LineAmountTypes.md) | | [optional]
**invoice_number** | **String** | ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length &#x3D; 255) | [optional]
**reference** | **String** | ACCREC only – additional reference number (max length &#x3D; 255) | [optional]
**reference** | **String** | ACCREC only – additional reference number | [optional]
**branding_theme_id** | **String** | See BrandingThemes | [optional]
**url** | **String** | URL link to a source document – shown as “Go to [appName]” in the Xero app | [optional]
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
Expand All @@ -21,6 +21,7 @@ Name | Type | Description | Notes
**expected_payment_date** | **Date** | Shown on sales invoices (Accounts Receivable) when this has been set | [optional]
**planned_payment_date** | **Date** | Shown on bills (Accounts Payable) when this has been set | [optional]
**cis_deduction** | **BigDecimal** | CIS deduction for UK contractors | [optional]
**cis_rate** | **BigDecimal** | CIS Deduction rate for the organisation | [optional]
**sub_total** | **BigDecimal** | Total of invoice excluding taxes | [optional]
**total_tax** | **BigDecimal** | Total tax on invoice | [optional]
**total** | **BigDecimal** | Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts | [optional]
Expand Down Expand Up @@ -66,6 +67,7 @@ instance = XeroRuby::Accounting::Invoice.new(type: null,
expected_payment_date: null,
planned_payment_date: null,
cis_deduction: null,
cis_rate: null,
sub_total: null,
total_tax: null,
total: null,
Expand Down
2 changes: 1 addition & 1 deletion docs/accounting/Organisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Name | Type | Description | Notes
**_class** | **String** | Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM) | [optional]
**edition** | **String** | BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing) | [optional]
**line_of_business** | **String** | Description of business type as defined in Organisation settings | [optional]
**addresses** | [**Array&lt;Address&gt;**](Address.md) | Address details for organisation – see Addresses | [optional]
**addresses** | [**Array&lt;AddressForOrganisation&gt;**](AddressForOrganisation.md) | Address details for organisation – see Addresses | [optional]
**phones** | [**Array&lt;Phone&gt;**](Phone.md) | Phones details for organisation – see Phones | [optional]
**external_links** | [**Array&lt;ExternalLink&gt;**](ExternalLink.md) | Organisation profile links for popular services such as Facebook,Twitter, GooglePlus and LinkedIn. You can also add link to your website here. Shown if Organisation settings is updated in Xero. See ExternalLinks below | [optional]
**payment_terms** | [**PaymentTerm**](PaymentTerm.md) | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_nz/SalaryAndWage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**number_of_units_per_week** | **BigDecimal** | The Number of Units per week for the corresponding salary and wages |
**rate_per_unit** | **BigDecimal** | The rate of each unit for the corresponding salary and wages | [optional]
**number_of_units_per_day** | **BigDecimal** | The Number of Units per day for the corresponding salary and wages |
**days_per_week** | **Integer** | The days per week for the salary. | [optional]
**days_per_week** | **BigDecimal** | The days per week for the salary. | [optional]
**effective_from** | **Date** | The effective date of the corresponding salary and wages |
**annual_salary** | **BigDecimal** | The annual salary |
**status** | **String** | The current status of the corresponding salary and wages |
Expand Down
3 changes: 2 additions & 1 deletion lib/xero-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down Expand Up @@ -332,6 +332,7 @@
require 'xero-ruby/models/accounting/action'
require 'xero-ruby/models/accounting/actions'
require 'xero-ruby/models/accounting/address'
require 'xero-ruby/models/accounting/address_for_organisation'
require 'xero-ruby/models/accounting/allocation'
require 'xero-ruby/models/accounting/allocations'
require 'xero-ruby/models/accounting/attachment'
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api/accounting_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api/asset_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#This is the Xero Assets API
The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api/files_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api/payroll_au_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#This is the Xero Payroll API for orgs in Australia region.
The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api/payroll_nz_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#This is the Xero Payroll API for orgs in the NZ region.
The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api/payroll_uk_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#This is the Xero Payroll API for orgs in the UK region.
The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/api/project_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#This is the Xero Projects API
The version of the OpenAPI document: 2.6.0
The version of the OpenAPI document: 2.8.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
Loading

0 comments on commit f3f2b0c

Please sign in to comment.