octobat 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/History.txt +5 -6
- data/VERSION +1 -1
- data/lib/octobat.rb +2 -0
- data/lib/octobat/api_resource.rb +3 -1
- data/lib/octobat/balance_transaction.rb +5 -0
- data/lib/octobat/octobat_object.rb +3 -1
- data/lib/octobat/payout.rb +5 -0
- data/lib/octobat/util.rb +2 -0
- data/lib/octobat/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5747bf388972cd59177703b40d5b6131a06bd322
|
4
|
+
data.tar.gz: 5ce860b623beff2db652e4c64a79cd5696ff0dd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 146ec6a8f21a62fc9d5032037e3572e9a49dae003c93629ef3839b77c1bcb56576476e82100fad9b7fb17dde588c124841f62102aa5dd2495f7dac9fe995cd78
|
7
|
+
data.tar.gz: 0279683da36f1b01de5b1d65c8336aa91130589b47814fbfdc6645a7a061bed8cf28c4839b907e54d591f42f335b76fdfd21f6ffe913b36a9ea06b238165530b
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
octobat (2.0.
|
4
|
+
octobat (2.0.4)
|
5
5
|
rest-client (>= 1.4, < 4.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
domain_name (0.5.
|
10
|
+
domain_name (0.5.20170404)
|
11
11
|
unf (>= 0.0.5, < 1.0.0)
|
12
12
|
http-cookie (1.0.3)
|
13
13
|
domain_name (~> 0.5)
|
@@ -15,13 +15,13 @@ GEM
|
|
15
15
|
mime-types-data (~> 3.2015)
|
16
16
|
mime-types-data (3.2016.0521)
|
17
17
|
netrc (0.11.0)
|
18
|
-
rest-client (2.0.
|
18
|
+
rest-client (2.0.2)
|
19
19
|
http-cookie (>= 1.0.2, < 2.0)
|
20
20
|
mime-types (>= 1.16, < 4.0)
|
21
21
|
netrc (~> 0.8)
|
22
22
|
unf (0.1.4)
|
23
23
|
unf_ext
|
24
|
-
unf_ext (0.0.7.
|
24
|
+
unf_ext (0.0.7.4)
|
25
25
|
|
26
26
|
PLATFORMS
|
27
27
|
ruby
|
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== 2.0.4 2017-05-26
|
2
|
+
* 2 minor enhancement:
|
3
|
+
* Manage different API versions
|
4
|
+
* Add endpoint for payouts & balance transactions
|
5
|
+
|
1
6
|
=== 2.0.3 2017-04-12
|
2
7
|
* 1 minor enhancement:
|
3
8
|
* Delete customers
|
@@ -32,12 +37,6 @@
|
|
32
37
|
=== 0.0.5 2015-07-21
|
33
38
|
* 1 minor enhancement:
|
34
39
|
* Add invoices#all customer filter and Customer.invoices method
|
35
|
-
|
36
|
-
=== 0.0.1 2015-02-06
|
37
|
-
|
38
|
-
* 1 major enhancement:
|
39
|
-
* Initial release
|
40
|
-
|
41
40
|
|
42
41
|
=== 0.0.12 2016-04-13
|
43
42
|
* 1 minor enhancement:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.4
|
data/lib/octobat.rb
CHANGED
@@ -32,6 +32,8 @@ require 'octobat/credit_note'
|
|
32
32
|
require 'octobat/payment_recipient'
|
33
33
|
require 'octobat/payment_recipient_reference'
|
34
34
|
require 'octobat/payment_source'
|
35
|
+
require 'octobat/payout'
|
36
|
+
require 'octobat/balance_transaction'
|
35
37
|
require 'octobat/invoice_numbering_sequence'
|
36
38
|
require 'octobat/credit_note_numbering_sequence'
|
37
39
|
require 'octobat/document_template'
|
data/lib/octobat/api_resource.rb
CHANGED
@@ -19,13 +19,15 @@ module Octobat
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def refresh
|
22
|
-
response, api_key = Octobat.request(:get, url, @api_key, @retrieve_options)
|
22
|
+
response, api_key = Octobat.request(:get, url, @api_key, @retrieve_options, @headers)
|
23
23
|
refresh_from(response, api_key)
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.retrieve(id, opts={})
|
27
27
|
api_key, headers = Util.parse_opts(opts)
|
28
28
|
opts[:api_key] ||= @api_key
|
29
|
+
|
30
|
+
puts opts.inspect
|
29
31
|
|
30
32
|
instance = self.new(id, opts)
|
31
33
|
instance.refresh
|
@@ -19,10 +19,12 @@ module Octobat
|
|
19
19
|
else
|
20
20
|
@retrieve_options = {}
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
|
+
@headers = {}
|
23
24
|
@api_key = opts[:api_key]
|
24
25
|
|
25
26
|
@retrieve_options.merge!(opts.clone).delete(:api_key)
|
27
|
+
@headers['Octobat-Version'] = @retrieve_options.delete('Octobat-Version') if @retrieve_options.has_key?('Octobat-Version')
|
26
28
|
|
27
29
|
@values = {}
|
28
30
|
# This really belongs in APIResource, but not putting it there allows us
|
data/lib/octobat/util.rb
CHANGED
@@ -48,6 +48,8 @@ module Octobat
|
|
48
48
|
'credit_note' => CreditNote,
|
49
49
|
'item' => Item,
|
50
50
|
'customer' => Customer,
|
51
|
+
'payout' => Payout,
|
52
|
+
'balance_transaction' => BalanceTransaction,
|
51
53
|
'document_template' => DocumentTemplate,
|
52
54
|
'document_language' => DocumentLanguage,
|
53
55
|
'checkout' => Checkout,
|
data/lib/octobat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octobat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gaultier Laperche
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- lib/octobat/api_operations/list.rb
|
61
61
|
- lib/octobat/api_operations/update.rb
|
62
62
|
- lib/octobat/api_resource.rb
|
63
|
+
- lib/octobat/balance_transaction.rb
|
63
64
|
- lib/octobat/certificate_blacklist.rb
|
64
65
|
- lib/octobat/checkout.rb
|
65
66
|
- lib/octobat/coupon.rb
|
@@ -87,6 +88,7 @@ files:
|
|
87
88
|
- lib/octobat/payment_recipient.rb
|
88
89
|
- lib/octobat/payment_recipient_reference.rb
|
89
90
|
- lib/octobat/payment_source.rb
|
91
|
+
- lib/octobat/payout.rb
|
90
92
|
- lib/octobat/singleton_api_resource.rb
|
91
93
|
- lib/octobat/tax_evidence.rb
|
92
94
|
- lib/octobat/tax_evidence_request.rb
|