quaderno 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -7
- data/Gemfile.lock +0 -9
- data/README.md +6 -2
- data/VERSION +1 -1
- data/build_install.sh +1 -1
- data/changelog.md +4 -0
- data/lib/quaderno-ruby/base.rb +10 -2
- data/lib/quaderno-ruby/behavior/crud.rb +0 -1
- data/lib/quaderno-ruby.rb +0 -2
- data/quaderno.gemspec +6 -25
- data/test/fixtures/quaderno_cassettes/all_contacts.yml +23 -18
- data/test/fixtures/quaderno_cassettes/all_estimates.yml +35 -18
- data/test/fixtures/quaderno_cassettes/all_expenses.yml +38 -18
- data/test/fixtures/quaderno_cassettes/all_invoices.yml +35 -29
- data/test/fixtures/quaderno_cassettes/all_items.yml +17 -12
- data/test/fixtures/quaderno_cassettes/all_webhooks.yml +84 -68
- data/test/fixtures/quaderno_cassettes/deleted_contact.yml +81 -62
- data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +96 -62
- data/test/fixtures/quaderno_cassettes/deleted_expense.yml +99 -62
- data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +96 -73
- data/test/fixtures/quaderno_cassettes/deleted_item.yml +49 -37
- data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +100 -80
- data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +66 -45
- data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +66 -56
- data/test/fixtures/quaderno_cassettes/found_contact.yml +39 -30
- data/test/fixtures/quaderno_cassettes/found_estimate.yml +55 -32
- data/test/fixtures/quaderno_cassettes/found_expense.yml +62 -30
- data/test/fixtures/quaderno_cassettes/found_invoice.yml +58 -42
- data/test/fixtures/quaderno_cassettes/found_item.yml +33 -24
- data/test/fixtures/quaderno_cassettes/found_webhook.yml +50 -40
- data/test/fixtures/quaderno_cassettes/new_contact.yml +19 -12
- data/test/fixtures/quaderno_cassettes/new_estimate.yml +61 -44
- data/test/fixtures/quaderno_cassettes/new_expense.yml +99 -62
- data/test/fixtures/quaderno_cassettes/new_invoice.yml +61 -44
- data/test/fixtures/quaderno_cassettes/new_item.yml +19 -12
- data/test/fixtures/quaderno_cassettes/new_webhook.yml +34 -28
- data/test/fixtures/quaderno_cassettes/paid_expense.yml +57 -30
- data/test/fixtures/quaderno_cassettes/paid_invoice.yml +54 -41
- data/test/fixtures/quaderno_cassettes/rate_limit.yml +14 -10
- data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +73 -43
- data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +70 -54
- data/test/fixtures/quaderno_cassettes/updated_contact.yml +42 -30
- data/test/fixtures/quaderno_cassettes/updated_estimate.yml +84 -57
- data/test/fixtures/quaderno_cassettes/updated_expense.yml +81 -56
- data/test/fixtures/quaderno_cassettes/updated_invoice.yml +84 -57
- data/test/fixtures/quaderno_cassettes/updated_item.yml +36 -24
- data/test/fixtures/quaderno_cassettes/updated_webhook.yml +69 -55
- data/test/helper.rb +12 -12
- data/test/unit/test_quaderno_contacts.rb +4 -3
- data/test/unit/test_quaderno_estimates.rb +2 -1
- data/test/unit/test_quaderno_expenses.rb +3 -2
- data/test/unit/test_quaderno_invoices.rb +3 -2
- data/test/unit/test_quaderno_items.rb +4 -3
- data/test/unit/test_quaderno_webhooks.rb +4 -3
- metadata +10 -94
- data/quaderno-1.0.0.gem +0 -0
- data/quaderno-1.1.0.gem +0 -0
- data/quaderno-1.1.2.gem +0 -0
- data/quaderno-1.2.0.gem +0 -0
data/Gemfile
CHANGED
@@ -5,18 +5,17 @@ source "http://rubygems.org"
|
|
5
5
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
gem 'httparty'
|
9
|
+
gem "rdoc", "~> 3.12"
|
10
|
+
|
8
11
|
group :development do
|
9
|
-
gem "bundler", ">= 1.0.0"
|
10
|
-
gem 'debugger'
|
11
|
-
gem 'httparty'
|
12
12
|
gem "jeweler", "~> 1.8.4"
|
13
|
-
gem "shoulda", ">= 0"
|
14
|
-
gem "rcov", "~> 0.9.11" #">= 0"
|
15
|
-
gem "rdoc", "~> 3.12"
|
16
|
-
gem 'vcr', :require => 'vcr'
|
17
13
|
end
|
18
14
|
|
19
15
|
group :test do
|
16
|
+
gem "bundler", ">= 1.0.0"
|
20
17
|
gem 'fakeweb'
|
18
|
+
gem "rcov", "~> 0.9.11" #">= 0"
|
19
|
+
gem "shoulda", ">= 0"
|
21
20
|
gem 'vcr', :require => 'vcr'
|
22
21
|
end
|
data/Gemfile.lock
CHANGED
@@ -4,14 +4,6 @@ GEM
|
|
4
4
|
activesupport (3.2.8)
|
5
5
|
i18n (~> 0.6)
|
6
6
|
multi_json (~> 1.0)
|
7
|
-
columnize (0.3.6)
|
8
|
-
debugger (1.2.1)
|
9
|
-
columnize (>= 0.3.1)
|
10
|
-
debugger-linecache (~> 1.1.1)
|
11
|
-
debugger-ruby_core_source (~> 1.1.4)
|
12
|
-
debugger-linecache (1.1.2)
|
13
|
-
debugger-ruby_core_source (>= 1.1.1)
|
14
|
-
debugger-ruby_core_source (1.1.4)
|
15
7
|
fakeweb (1.3.0)
|
16
8
|
git (1.2.5)
|
17
9
|
httparty (0.9.0)
|
@@ -43,7 +35,6 @@ PLATFORMS
|
|
43
35
|
|
44
36
|
DEPENDENCIES
|
45
37
|
bundler (>= 1.0.0)
|
46
|
-
debugger
|
47
38
|
fakeweb
|
48
39
|
httparty
|
49
40
|
jeweler (~> 1.8.4)
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Current version is 1.2.0. See the changelog [here](https://github.com/recrea/qua
|
|
10
10
|
To install add the following to your Gemfile:
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
gem 'quaderno', require 'quaderno-ruby'
|
13
|
+
gem 'quaderno', require: 'quaderno-ruby'
|
14
14
|
```
|
15
15
|
|
16
16
|
To configure just add this to your initializers
|
@@ -58,7 +58,11 @@ Quaderno-ruby parses all the json responses in human readable data, so you can a
|
|
58
58
|
Quaderno::Contact.all(page: 1) #=> Array
|
59
59
|
```
|
60
60
|
|
61
|
-
will return an array with all your contacts on the first page. You can also pass query strings using the attribute :q in order to filter the results by contact name.
|
61
|
+
will return an array with all your contacts on the first page. You can also pass query strings using the attribute :q in order to filter the results by contact name. For example:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
Quaderno::Contact.all(q: 'John Doe') #=> Array
|
65
|
+
```
|
62
66
|
|
63
67
|
### Finding a contact
|
64
68
|
```ruby
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
data/build_install.sh
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
gem build quaderno.gemspec
|
2
|
-
gem install quaderno-1.
|
2
|
+
gem install quaderno-1.2.2.gem
|
data/changelog.md
CHANGED
data/lib/quaderno-ruby/base.rb
CHANGED
@@ -7,11 +7,11 @@ module Quaderno
|
|
7
7
|
include Quaderno::Exceptions
|
8
8
|
include Quaderno::Behavior::Crud
|
9
9
|
|
10
|
-
base_uri 'https://quadernoapp.com/'
|
11
10
|
@@auth_token = nil
|
12
11
|
@@subdomain = nil
|
13
12
|
@@rate_limit_info = nil
|
14
|
-
|
13
|
+
@@debug = false
|
14
|
+
|
15
15
|
def self.api_model(klass)
|
16
16
|
instance_eval <<-END
|
17
17
|
def api_model
|
@@ -28,6 +28,8 @@ module Quaderno
|
|
28
28
|
#Default way to configure the authenticata data
|
29
29
|
def self.configure
|
30
30
|
yield self
|
31
|
+
|
32
|
+
self.base_uri( @@debug ? 'http://localhost:3000/' : 'https://quadernoapp.com/')
|
31
33
|
end
|
32
34
|
|
33
35
|
def self.auth_token=(auth_token)
|
@@ -38,6 +40,12 @@ module Quaderno
|
|
38
40
|
@@subdomain = subdomain
|
39
41
|
end
|
40
42
|
|
43
|
+
def self.debug=(val)
|
44
|
+
if val != false
|
45
|
+
@@debug = true
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
41
49
|
def self.authorization(auth_token)
|
42
50
|
begin
|
43
51
|
party_response = get("/subdomain/api/v1/authorization.json", basic_auth: { username: auth_token })
|
data/lib/quaderno-ruby.rb
CHANGED
@@ -3,8 +3,6 @@ require 'ostruct'
|
|
3
3
|
require 'quaderno-ruby/exceptions/exceptions'
|
4
4
|
%w(crud deliver payment).each { |filename| require "quaderno-ruby/behavior/#{ filename }" }
|
5
5
|
%w(base contact item invoice estimate expense document_item payment webhook).each { |filename| require "quaderno-ruby/#{ filename }" }
|
6
|
-
require 'ruby-debug'
|
7
|
-
|
8
6
|
|
9
7
|
module Quaderno
|
10
8
|
|
data/quaderno.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "quaderno"
|
8
|
-
s.version = "1.2.
|
8
|
+
s.version = "1.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Recrea"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2014-02-04"
|
13
13
|
s.description = "longer description of your gem"
|
14
14
|
s.email = "carlos@recrea.es"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -40,10 +40,6 @@ Gem::Specification.new do |s|
|
|
40
40
|
"lib/quaderno-ruby/item.rb",
|
41
41
|
"lib/quaderno-ruby/payment.rb",
|
42
42
|
"lib/quaderno-ruby/webhook.rb",
|
43
|
-
"quaderno-1.0.0.gem",
|
44
|
-
"quaderno-1.1.0.gem",
|
45
|
-
"quaderno-1.1.2.gem",
|
46
|
-
"quaderno-1.2.0.gem",
|
47
43
|
"quaderno.gemspec",
|
48
44
|
"test/fixtures/quaderno_cassettes/all_contacts.yml",
|
49
45
|
"test/fixtures/quaderno_cassettes/all_estimates.yml",
|
@@ -101,33 +97,18 @@ Gem::Specification.new do |s|
|
|
101
97
|
s.specification_version = 3
|
102
98
|
|
103
99
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
104
|
-
s.
|
105
|
-
s.
|
106
|
-
s.add_development_dependency(%q<httparty>, [">= 0"])
|
100
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0"])
|
101
|
+
s.add_runtime_dependency(%q<rdoc>, ["~> 3.12"])
|
107
102
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
108
|
-
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
109
|
-
s.add_development_dependency(%q<rcov>, ["~> 0.9.11"])
|
110
|
-
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
111
|
-
s.add_development_dependency(%q<vcr>, [">= 0"])
|
112
103
|
else
|
113
|
-
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
114
|
-
s.add_dependency(%q<debugger>, [">= 0"])
|
115
104
|
s.add_dependency(%q<httparty>, [">= 0"])
|
116
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
117
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
118
|
-
s.add_dependency(%q<rcov>, ["~> 0.9.11"])
|
119
105
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
120
|
-
s.add_dependency(%q<
|
106
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
121
107
|
end
|
122
108
|
else
|
123
|
-
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
124
|
-
s.add_dependency(%q<debugger>, [">= 0"])
|
125
109
|
s.add_dependency(%q<httparty>, [">= 0"])
|
126
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
127
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
128
|
-
s.add_dependency(%q<rcov>, ["~> 0.9.11"])
|
129
110
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
130
|
-
s.add_dependency(%q<
|
111
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
131
112
|
end
|
132
113
|
end
|
133
114
|
|
@@ -2,47 +2,52 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/contacts.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
12
12
|
response:
|
13
13
|
status:
|
14
14
|
code: 200
|
15
|
-
message: OK
|
15
|
+
message: ! 'OK '
|
16
16
|
headers:
|
17
17
|
x-ratelimit-limit:
|
18
|
-
- '
|
18
|
+
- '2000'
|
19
19
|
x-ratelimit-remaining:
|
20
|
-
- '
|
20
|
+
- '1982'
|
21
|
+
x-pages-currentpage:
|
22
|
+
- '1'
|
23
|
+
x-pages-totalpages:
|
24
|
+
- '1'
|
21
25
|
content-type:
|
22
26
|
- application/json; charset=utf-8
|
23
27
|
x-ua-compatible:
|
24
28
|
- IE=Edge
|
25
29
|
etag:
|
26
|
-
- ! '"
|
30
|
+
- ! '"71b79c1b45cfb58a71172c277dd004b5"'
|
27
31
|
cache-control:
|
28
32
|
- max-age=0, private, must-revalidate
|
29
33
|
x-request-id:
|
30
|
-
-
|
34
|
+
- 56b41dfe5bb0b1150503bbdacfca3706
|
31
35
|
x-runtime:
|
32
|
-
- '0.
|
36
|
+
- '0.097376'
|
37
|
+
server:
|
38
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
39
|
+
date:
|
40
|
+
- Tue, 04 Feb 2014 14:39:43 GMT
|
41
|
+
content-length:
|
42
|
+
- '1879'
|
33
43
|
connection:
|
34
44
|
- close
|
35
|
-
server:
|
36
|
-
- thin 1.5.0 codename Knife
|
37
45
|
body:
|
38
46
|
encoding: US-ASCII
|
39
|
-
string: ! '[{"id":
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
Palmas de Gran Canaria","region":"Las Palmas","country":"ES","phone_1":"653157684","phone_2":"653157684","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/2"},{"id":4,"kind":"person","first_name":"Test_OCP","last_name":"Doe","full_name":"Test_OCP
|
44
|
-
Doe","street_line_1":"Bernardo de la Torre 104","street_line_2":"","postal_code":"35007","city":"Las
|
45
|
-
Palmas de Gran Canaria","region":"Las Palmas","country":"ES","phone_1":"653157684","phone_2":"653157684","fax":"","email":"dont@stop.believing","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/4"},{"id":12,"kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/12"},{"id":15,"kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/15"},{"id":8,"kind":"company","full_name":"Toby","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/8"}]'
|
47
|
+
string: ! '[{"id":2,"kind":"company","full_name":"Another Test Contact","contact_name":"","street_line_1":"Kamiya
|
48
|
+
Kashin Ryu no Dojo","street_line_2":"","postal_code":"876-0854","city":"Tokyo","region":"Tokyo","country":"JP","phone_1":"","phone_2":"","fax":"","email":"","web":"","discount":null,"tax_id":"","language":"EN","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/2"},{"id":1,"kind":"company","full_name":"API
|
49
|
+
Test Contact","contact_name":"","street_line_1":"Evergreen Terrace","street_line_2":"","postal_code":"K0A
|
50
|
+
1B0","city":"Springfield","region":"Canada","country":"ES","phone_1":"","phone_2":"","fax":"","email":"dummy@email.test","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/1"},{"id":4,"kind":"company","full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/4"},{"id":6,"kind":"company","full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"US","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"language":"EN","notes":null,"url":"http://localhost:3000/recrea/api/v1/contacts/6"},{"id":3,"kind":"company","full_name":"TSM","contact_name":"Reginald","street_line_1":"","street_line_2":"","postal_code":"","city":"","region":"","country":"ES","phone_1":"","phone_2":"","fax":"","email":"reggie@tsm.com","web":"","discount":null,"tax_id":"","bank_account":"","language":"ES","notes":"","url":"http://localhost:3000/recrea/api/v1/contacts/3"}]'
|
46
51
|
http_version: '1.1'
|
47
|
-
recorded_at: Tue,
|
52
|
+
recorded_at: Tue, 04 Feb 2014 14:39:43 GMT
|
48
53
|
recorded_with: VCR 2.3.0
|
@@ -2,47 +2,64 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/estimates.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
12
12
|
response:
|
13
13
|
status:
|
14
14
|
code: 200
|
15
|
-
message: OK
|
15
|
+
message: ! 'OK '
|
16
16
|
headers:
|
17
17
|
x-ratelimit-limit:
|
18
|
-
- '
|
18
|
+
- '2000'
|
19
19
|
x-ratelimit-remaining:
|
20
|
-
- '
|
20
|
+
- '1968'
|
21
|
+
x-pages-currentpage:
|
22
|
+
- '1'
|
23
|
+
x-pages-totalpages:
|
24
|
+
- '1'
|
21
25
|
content-type:
|
22
26
|
- application/json; charset=utf-8
|
23
27
|
x-ua-compatible:
|
24
28
|
- IE=Edge
|
25
29
|
etag:
|
26
|
-
- ! '"
|
30
|
+
- ! '"e381d87821899056ec8529c9f9bb5f0a"'
|
27
31
|
cache-control:
|
28
32
|
- max-age=0, private, must-revalidate
|
29
33
|
x-request-id:
|
30
|
-
-
|
34
|
+
- eae303758f2de84aaeec7e9957223728
|
31
35
|
x-runtime:
|
32
|
-
- '0.
|
36
|
+
- '0.326931'
|
37
|
+
server:
|
38
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
39
|
+
date:
|
40
|
+
- Tue, 04 Feb 2014 14:39:55 GMT
|
41
|
+
content-length:
|
42
|
+
- '2872'
|
33
43
|
connection:
|
34
44
|
- close
|
35
|
-
server:
|
36
|
-
- thin 1.5.0 codename Knife
|
37
45
|
body:
|
38
46
|
encoding: US-ASCII
|
39
|
-
string: ! '[{"id":
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
47
|
+
string: ! '[{"id":9,"number":"0000003","issue_date":"2014-02-04","contact":{"id":2,"full_name":"Another
|
48
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Bread
|
49
|
+
pack","quantity":"1.0","unit_price":"2.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"2.00
|
50
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"2.00 \u20ac"}],"subtotal":"2.00
|
51
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[],"total":"2.00 \u20ac","payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/estimate/43cb8820f8901ce8ee208a79f2a4c4d6eef63eb6","url":"http://localhost:3000/recrea/api/v1/estimates/9.json"},{"id":8,"number":"0000002","issue_date":"2014-02-04","contact":{"id":1,"full_name":"API
|
52
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Paint","quantity":"1.0","unit_price":"50.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"50.00
|
53
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"50.00 \u20ac"},{"description":"Brushes","quantity":"1.0","unit_price":"12.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"12.00
|
54
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"12.00 \u20ac"},{"description":"Working
|
55
|
+
suits","quantity":"1.0","unit_price":"20.99","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"20.99
|
56
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"20.99 \u20ac"}],"subtotal":"82.99
|
57
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IVA (21.00%)","amount":"2.52
|
58
|
+
\u20ac"}],"total":"85.51 \u20ac","payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/estimate/749d695e7c7b0fd8545416fa30346ca3c69f5658","url":"http://localhost:3000/recrea/api/v1/estimates/8.json"},{"id":7,"number":"0000001","issue_date":"2014-02-04","contact":{"id":1,"full_name":"API
|
59
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Paint","quantity":"1.0","unit_price":"50.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"50.00
|
60
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"50.00 \u20ac"},{"description":"Brushes","quantity":"1.0","unit_price":"12.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal":"12.00
|
61
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"12.00 \u20ac"}],"subtotal":"62.00
|
62
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[],"total":"62.00 \u20ac","payment_details":"","notes":"","state":"draft","tag_list":[],"permalink":"http://localhost:3000/estimate/8a4c4788bf7cbb1ecf13e875176864a9b02f5d7f","url":"http://localhost:3000/recrea/api/v1/estimates/7.json"}]'
|
46
63
|
http_version: '1.1'
|
47
|
-
recorded_at: Tue,
|
64
|
+
recorded_at: Tue, 04 Feb 2014 14:39:55 GMT
|
48
65
|
recorded_with: VCR 2.3.0
|
@@ -2,47 +2,67 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://
|
5
|
+
uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/expenses.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
|
12
12
|
response:
|
13
13
|
status:
|
14
14
|
code: 200
|
15
|
-
message: OK
|
15
|
+
message: ! 'OK '
|
16
16
|
headers:
|
17
17
|
x-ratelimit-limit:
|
18
|
-
- '
|
18
|
+
- '2000'
|
19
19
|
x-ratelimit-remaining:
|
20
|
-
- '
|
20
|
+
- '1891'
|
21
|
+
x-pages-currentpage:
|
22
|
+
- '1'
|
23
|
+
x-pages-totalpages:
|
24
|
+
- '1'
|
21
25
|
content-type:
|
22
26
|
- application/json; charset=utf-8
|
23
27
|
x-ua-compatible:
|
24
28
|
- IE=Edge
|
25
29
|
etag:
|
26
|
-
- ! '"
|
30
|
+
- ! '"0caa665340ca3fbfd0127f8d8d146941"'
|
27
31
|
cache-control:
|
28
32
|
- max-age=0, private, must-revalidate
|
29
33
|
x-request-id:
|
30
|
-
-
|
34
|
+
- 225cc7bed1af5ec81dc166e8a11de1df
|
31
35
|
x-runtime:
|
32
|
-
- '0.
|
36
|
+
- '0.539043'
|
37
|
+
server:
|
38
|
+
- WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
|
39
|
+
date:
|
40
|
+
- Tue, 04 Feb 2014 14:50:59 GMT
|
41
|
+
content-length:
|
42
|
+
- '2759'
|
33
43
|
connection:
|
34
44
|
- close
|
35
|
-
server:
|
36
|
-
- thin 1.5.0 codename Knife
|
37
45
|
body:
|
38
46
|
encoding: US-ASCII
|
39
|
-
string: ! '[{"id":
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
47
|
+
string: ! '[{"id":6,"number":null,"issue_date":"2014-05-04","contact":{"id":2,"full_name":"Another
|
48
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Honeypots","quantity":"1.3","unit_price":"19.03","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"IRPF","tax_2_rate":"-9.0","reference":"","subtotal":"24.74
|
49
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"24.74 \u20ac"}],"subtotal":"24.74
|
50
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-2.23
|
51
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"5.20 \u20ac"}],"total":"27.71 \u20ac","payments":[{"id":1,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
52
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/1.json"},{"id":3,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
53
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/3.json"},{"id":5,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
54
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/5.json"},{"id":7,"date":"2014-02-04","payment_method":"cash","amount":"10,000.00
|
55
|
+
\u20ac","url":"http://localhost:3000/recrea/api/v1/expenses/6/payments/7.json"}],"notes":"Hello","state":"paid","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/6.json"},{"id":4,"number":null,"issue_date":"2014-02-04","contact":{"id":1,"full_name":"API
|
56
|
+
Test Contact"},"po_number":"","currency":"EUR","items":[{"description":"Very
|
57
|
+
important stuff","quantity":"1.0","unit_price":"2230.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"IRPF","tax_2_rate":"-9.0","reference":"","subtotal":"2,230.00
|
58
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"2,230.00 \u20ac"}],"subtotal":"2,230.00
|
59
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-200.70
|
60
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"468.30 \u20ac"}],"total":"2,497.60
|
61
|
+
\u20ac","payments":[],"notes":"Hello","state":"outstanding","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/4.json"},{"id":5,"number":null,"issue_date":"2014-02-04","contact":{"id":3,"full_name":"TSM"},"po_number":"","currency":"EUR","items":[{"description":"Bombers","quantity":"5.0","unit_price":"29.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":"21.0","tax_2_name":"IRPF","tax_2_rate":"-9.0","reference":"","subtotal":"145.00
|
62
|
+
\u20ac","discount":"0.00 \u20ac","gross_amount":"145.00 \u20ac"}],"subtotal":"145.00
|
63
|
+
\u20ac","discount":"0.00 \u20ac","taxes":[{"label":"IRPF (-9.00%)","amount":"-13.05
|
64
|
+
\u20ac"},{"label":"IVA (21.00%)","amount":"30.45 \u20ac"}],"total":"162.40
|
65
|
+
\u20ac","payments":[],"notes":"Hello","state":"outstanding","tag_list":[],"url":"http://localhost:3000/recrea/api/v1/expenses/5.json"}]'
|
46
66
|
http_version: '1.1'
|
47
|
-
recorded_at: Tue,
|
67
|
+
recorded_at: Tue, 04 Feb 2014 14:50:59 GMT
|
48
68
|
recorded_with: VCR 2.3.0
|