Skip to content

Commit f3f2b0c

Browse files
authored
Merge pull request #102 from XeroAPI/fix_identity_methods_http_handling
Fix 3 http client issues & built form OAS 2.8.0
2 parents a63a902 + 49b2210 commit f3f2b0c

File tree

458 files changed

+1163
-538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+1163
-538
lines changed

Gemfile.lock

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
PATH
2+
remote: .
3+
specs:
4+
xero-ruby (2.4.1)
5+
faraday (~> 1.0.1, >= 1.0.1)
6+
json (~> 2.1, >= 2.1.0)
7+
8+
GEM
9+
remote: https://rubygems.org/
10+
specs:
11+
ast (2.4.1)
12+
byebug (11.1.3)
13+
coderay (1.1.3)
14+
diff-lcs (1.4.4)
15+
faraday (1.0.1)
16+
multipart-post (>= 1.2, < 3)
17+
jaro_winkler (1.5.4)
18+
json (2.4.1)
19+
method_source (1.0.0)
20+
multipart-post (2.1.1)
21+
parallel (1.20.1)
22+
parser (2.7.2.0)
23+
ast (~> 2.4.1)
24+
pry (0.13.1)
25+
coderay (~> 1.1)
26+
method_source (~> 1.0)
27+
pry-byebug (3.9.0)
28+
byebug (~> 11.0)
29+
pry (~> 0.13.0)
30+
psych (3.2.1)
31+
rainbow (3.0.0)
32+
rake (12.3.3)
33+
rspec (3.10.0)
34+
rspec-core (~> 3.10.0)
35+
rspec-expectations (~> 3.10.0)
36+
rspec-mocks (~> 3.10.0)
37+
rspec-core (3.10.0)
38+
rspec-support (~> 3.10.0)
39+
rspec-expectations (3.10.0)
40+
diff-lcs (>= 1.2.0, < 2.0)
41+
rspec-support (~> 3.10.0)
42+
rspec-mocks (3.10.0)
43+
diff-lcs (>= 1.2.0, < 2.0)
44+
rspec-support (~> 3.10.0)
45+
rspec-support (3.10.0)
46+
rubocop (0.66.0)
47+
jaro_winkler (~> 1.5.1)
48+
parallel (~> 1.10)
49+
parser (>= 2.5, != 2.5.1.1)
50+
psych (>= 3.1.0)
51+
rainbow (>= 2.2.2, < 4.0)
52+
ruby-progressbar (~> 1.7)
53+
unicode-display_width (>= 1.4.0, < 1.6)
54+
ruby-progressbar (1.10.1)
55+
unicode-display_width (1.5.0)
56+
57+
PLATFORMS
58+
ruby
59+
60+
DEPENDENCIES
61+
pry-byebug
62+
rake (~> 12.3.3)
63+
rspec (~> 3.6, >= 3.6.0)
64+
rubocop (~> 0.66.0)
65+
xero-ruby!
66+
67+
BUNDLED WITH
68+
2.1.4

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ require 'jwt'
151151

152152
def token_expired?
153153
token_expiry = Time.at(decoded_access_token['exp'])
154-
token_expiry < Time.now
154+
token_expiry > Time.now
155155
end
156156

157157
def decoded_access_token
@@ -327,4 +327,4 @@ xero_client.accounting_api.get_bank_transfers(tenant_id, opts).bank_transfers
327327
## Sample App
328328
The best resource to understanding how to best leverage this SDK is the sample applications showing all the features of the gem.
329329
> https://github.com/XeroAPI/xero-ruby-oauth2-starter (Sinatra - simple getting started)
330-
> https://github.com/XeroAPI/xero-ruby-oauth2-app (Rails - full featured examples)
330+
> https://github.com/XeroAPI/xero-ruby-oauth2-app (Rails - full featured examples)

docs/accounting/AccountingApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8512,11 +8512,11 @@ Name | Type | Description | Notes
85128512
------------- | ------------- | ------------- | -------------
85138513
**xero_tenant_id** | **String**| Xero identifier for Tenant |
85148514
**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]
8515-
**linked_transaction_id** | **String**| The Xero identifier for an Linked Transaction | [optional]
8516-
**source_transaction_id** | **String**| Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice | [optional]
8517-
**contact_id** | **String**| Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. | [optional]
8515+
**linked_transaction_id** | [**String**](.md)| The Xero identifier for an Linked Transaction | [optional]
8516+
**source_transaction_id** | [**String**](.md)| Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice | [optional]
8517+
**contact_id** | [**String**](.md)| Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. | [optional]
85188518
**status** | **String**| Filter by the combination of ContactID and Status. Get the linked transactions associaed to a customer and with a status | [optional]
8519-
**target_transaction_id** | **String**| Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice | [optional]
8519+
**target_transaction_id** | [**String**](.md)| Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice | [optional]
85208520

85218521
### Return type
85228522

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# XeroRuby::Accounting::AddressForOrganisation
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**address_type** | **String** | define the type of address | [optional]
8+
**address_line1** | **String** | max length &#x3D; 500 | [optional]
9+
**address_line2** | **String** | max length &#x3D; 500 | [optional]
10+
**address_line3** | **String** | max length &#x3D; 500 | [optional]
11+
**address_line4** | **String** | max length &#x3D; 500 | [optional]
12+
**city** | **String** | max length &#x3D; 255 | [optional]
13+
**region** | **String** | max length &#x3D; 255 | [optional]
14+
**postal_code** | **String** | max length &#x3D; 50 | [optional]
15+
**country** | **String** | max length &#x3D; 50, [A-Z], [a-z] only | [optional]
16+
**attention_to** | **String** | max length &#x3D; 255 | [optional]
17+
18+
## Code Sample
19+
20+
```ruby
21+
require 'XeroRuby::Accounting'
22+
23+
instance = XeroRuby::Accounting::AddressForOrganisation.new(address_type: null,
24+
address_line1: null,
25+
address_line2: null,
26+
address_line3: null,
27+
address_line4: null,
28+
city: null,
29+
region: null,
30+
postal_code: null,
31+
country: null,
32+
attention_to: null)
33+
```
34+
35+

docs/accounting/CISOrgSetting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**cis_contractor_enabled** | **Boolean** | true or false - Boolean that describes if the organisation is a CIS Contractor | [optional]
88
**cis_sub_contractor_enabled** | **Boolean** | true or false - Boolean that describes if the organisation is a CIS SubContractor | [optional]
9-
**rate** | **Integer** | CIS Deduction rate for the organisation | [optional]
9+
**rate** | **BigDecimal** | CIS Deduction rate for the organisation | [optional]
1010

1111
## Code Sample
1212

docs/accounting/CISSetting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**cis_enabled** | **Boolean** | Boolean that describes if the contact is a CIS Subcontractor | [optional]
8-
**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]
8+
**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]
99

1010
## Code Sample
1111

docs/accounting/CreditNote.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Name | Type | Description | Notes
1414
**sub_total** | **BigDecimal** | The subtotal of the credit note excluding taxes | [optional]
1515
**total_tax** | **BigDecimal** | The total tax on the credit note | [optional]
1616
**total** | **BigDecimal** | The total of the Credit Note(subtotal + total tax) | [optional]
17+
**cis_deduction** | **BigDecimal** | CIS deduction for UK contractors | [optional]
18+
**cis_rate** | **BigDecimal** | CIS Deduction rate for the organisation | [optional]
1719
**updated_date_utc** | **DateTime** | UTC timestamp of last update to the credit note | [optional]
1820
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
1921
**fully_paid_on_date** | **Date** | Date when credit note was fully paid(UTC format) | [optional]
@@ -47,6 +49,8 @@ instance = XeroRuby::Accounting::CreditNote.new(type: null,
4749
sub_total: null,
4850
total_tax: null,
4951
total: null,
52+
cis_deduction: null,
53+
cis_rate: null,
5054
updated_date_utc: /Date(1573755038314)/,
5155
currency_code: null,
5256
fully_paid_on_date: null,

docs/accounting/Invoice.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**due_date** | **Date** | Date invoice is due – YYYY-MM-DD | [optional]
1212
**line_amount_types** | [**LineAmountTypes**](LineAmountTypes.md) | | [optional]
1313
**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]
14-
**reference** | **String** | ACCREC only – additional reference number (max length &#x3D; 255) | [optional]
14+
**reference** | **String** | ACCREC only – additional reference number | [optional]
1515
**branding_theme_id** | **String** | See BrandingThemes | [optional]
1616
**url** | **String** | URL link to a source document – shown as “Go to [appName]” in the Xero app | [optional]
1717
**currency_code** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
@@ -21,6 +21,7 @@ Name | Type | Description | Notes
2121
**expected_payment_date** | **Date** | Shown on sales invoices (Accounts Receivable) when this has been set | [optional]
2222
**planned_payment_date** | **Date** | Shown on bills (Accounts Payable) when this has been set | [optional]
2323
**cis_deduction** | **BigDecimal** | CIS deduction for UK contractors | [optional]
24+
**cis_rate** | **BigDecimal** | CIS Deduction rate for the organisation | [optional]
2425
**sub_total** | **BigDecimal** | Total of invoice excluding taxes | [optional]
2526
**total_tax** | **BigDecimal** | Total tax on invoice | [optional]
2627
**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]
@@ -66,6 +67,7 @@ instance = XeroRuby::Accounting::Invoice.new(type: null,
6667
expected_payment_date: null,
6768
planned_payment_date: null,
6869
cis_deduction: null,
70+
cis_rate: null,
6971
sub_total: null,
7072
total_tax: null,
7173
total: null,

docs/accounting/Organisation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Name | Type | Description | Notes
3333
**_class** | **String** | Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM) | [optional]
3434
**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]
3535
**line_of_business** | **String** | Description of business type as defined in Organisation settings | [optional]
36-
**addresses** | [**Array&lt;Address&gt;**](Address.md) | Address details for organisation – see Addresses | [optional]
36+
**addresses** | [**Array&lt;AddressForOrganisation&gt;**](AddressForOrganisation.md) | Address details for organisation – see Addresses | [optional]
3737
**phones** | [**Array&lt;Phone&gt;**](Phone.md) | Phones details for organisation – see Phones | [optional]
3838
**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]
3939
**payment_terms** | [**PaymentTerm**](PaymentTerm.md) | | [optional]

docs/payroll_nz/SalaryAndWage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**number_of_units_per_week** | **BigDecimal** | The Number of Units per week for the corresponding salary and wages |
1010
**rate_per_unit** | **BigDecimal** | The rate of each unit for the corresponding salary and wages | [optional]
1111
**number_of_units_per_day** | **BigDecimal** | The Number of Units per day for the corresponding salary and wages |
12-
**days_per_week** | **Integer** | The days per week for the salary. | [optional]
12+
**days_per_week** | **BigDecimal** | The days per week for the salary. | [optional]
1313
**effective_from** | **Date** | The effective date of the corresponding salary and wages |
1414
**annual_salary** | **BigDecimal** | The annual salary |
1515
**status** | **String** | The current status of the corresponding salary and wages |

0 commit comments

Comments
 (0)