Skip to content

Commit

Permalink
Merge pull request #149 from XeroAPI/issue_patches_april
Browse files Browse the repository at this point in the history
fix opts mutation, fixes configuration passing, and add docs / specs
  • Loading branch information
SerKnight authored Apr 13, 2021
2 parents 4e94e23 + bbafcae commit e41d75c
Show file tree
Hide file tree
Showing 21 changed files with 917 additions and 443 deletions.
12 changes: 8 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
xero-ruby (2.4.1)
faraday (~> 1.0.1, >= 1.0.1)
xero-ruby (2.9.0)
faraday (~> 1.0, >= 1.0.1)
json (~> 2.1, >= 2.1.0)

GEM
Expand All @@ -12,10 +12,13 @@ GEM
byebug (11.1.3)
coderay (1.1.3)
diff-lcs (1.4.4)
faraday (1.0.1)
faraday (1.3.0)
faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-net_http (1.0.1)
jaro_winkler (1.5.4)
json (2.4.1)
json (2.5.1)
method_source (1.0.0)
multipart-post (2.1.1)
parallel (1.20.1)
Expand Down Expand Up @@ -52,6 +55,7 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.6)
ruby-progressbar (1.10.1)
ruby2_keywords (0.0.4)
unicode-display_width (1.5.0)

PLATFORMS
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ creds = {
xero_client ||= XeroRuby::ApiClient.new(credentials: creds)
```

If you want additional logging or timeout, you can add/override any configuration option by passing the optional named parameter object `config`.
```ruby
config = { timeout: 30, debugging: true }
@xero_client ||= XeroRuby::ApiClient.new(credentials: creds, config: config)
```

## User Authorization & Callback
All API requests require a valid access token to be set on the client.

Expand Down
2 changes: 1 addition & 1 deletion docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5819,7 +5819,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>2.8.2</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>2.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
2 changes: 1 addition & 1 deletion docs/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,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>2.8.2</li>
<li class="nav-header" data-group="Asset"><strong>VSN: </strong>2.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 @@ -1153,7 +1153,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>2.8.2</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>2.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
2 changes: 1 addition & 1 deletion docs/payroll_au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3231,7 +3231,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>2.8.2</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>2.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 @@ -3836,7 +3836,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>2.8.2</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>2.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
2 changes: 1 addition & 1 deletion docs/payroll_uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3504,7 +3504,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>2.8.2</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>2.9.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 @@ -1466,7 +1466,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>2.8.2</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>2.9.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
Loading

0 comments on commit e41d75c

Please sign in to comment.