quaderno 1.5.5 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +95 -27
- data/VERSION +1 -1
- data/changelog.md +4 -0
- data/lib/quaderno-ruby/base.rb +15 -11
- data/lib/quaderno-ruby/behavior/crud.rb +23 -18
- data/lib/quaderno-ruby/behavior/deliver.rb +3 -3
- data/lib/quaderno-ruby/behavior/payment.rb +5 -5
- data/lib/quaderno-ruby/contact.rb +1 -2
- data/lib/quaderno-ruby/credit.rb +10 -0
- data/lib/quaderno-ruby/estimate.rb +2 -1
- data/lib/quaderno-ruby/expense.rb +2 -1
- data/lib/quaderno-ruby/invoice.rb +3 -2
- data/lib/quaderno-ruby/item.rb +1 -2
- data/lib/quaderno-ruby.rb +1 -1
- data/quaderno.gemspec +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10e786f848a333e58dafe450b1fcb622a3cbcf13
|
4
|
+
data.tar.gz: fddcc9ef2fa5114cccb87ccd468ad56b1e99b05c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04264160f3ba28f6befa0a8d08c6a2af0ecab800e97f5ec2772f3799bc0cd3939dde8ec2f301b07dfffbf7cf456a089e645218ab64f19dd1e6c4f16d476689dc
|
7
|
+
data.tar.gz: 72a81ae2697a902ac166eaa9c0feeed11afa2f4fcd8fe8767d08b9feb00bd6f12b26550f6cbde11aa0aad30802d1d6accd509b7db600a2a4d5ca0ad9ac91dc8c
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# quaderno-ruby
|
2
2
|
|
3
|
-
Quaderno-ruby is a ruby wrapper for [Quaderno API] (https://github.com/quaderno/quaderno-api).
|
3
|
+
Quaderno-ruby is a ruby wrapper for [Quaderno API] (https://github.com/quaderno/quaderno-api).
|
4
4
|
As the API, it's mostly CRUD.
|
5
5
|
|
6
|
-
Current version is 1.
|
6
|
+
Current version is 1.6.0. See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
|
7
7
|
|
8
8
|
## Installation & Configuration
|
9
9
|
|
@@ -31,7 +31,7 @@ You can get your account subdomain by grabbing it from your account url or by ca
|
|
31
31
|
|
32
32
|
```ruby
|
33
33
|
Quaderno::Base.authorization 'my_authenticate_token', environment
|
34
|
-
# => {"identity"=>{"id"=>737000, "name"=>"Walter White", "email"=>"cooking@br.bd", "href"=>"https://my_subdomain.quadernoapp.com/api/v1/"}}
|
34
|
+
# => {"identity"=>{"id"=>737000, "name"=>"Walter White", "email"=>"cooking@br.bd", "href"=>"https://my_subdomain.quadernoapp.com/api/v1/"}}
|
35
35
|
```
|
36
36
|
|
37
37
|
`environment` is an optional argument. By passing `:sandbox`, you will retrieve your credentials for the sandbox environment and not for production.
|
@@ -39,8 +39,8 @@ You can get your account subdomain by grabbing it from your account url or by ca
|
|
39
39
|
This will return a hash with the information about your api url, which includes the account subdomain.
|
40
40
|
|
41
41
|
## Ping the service
|
42
|
-
You can ping the service in order to check if it is up with:
|
43
|
-
|
42
|
+
You can ping the service in order to check if it is up with:
|
43
|
+
|
44
44
|
```ruby
|
45
45
|
Quaderno::Base.ping #=> Boolean
|
46
46
|
```
|
@@ -50,7 +50,7 @@ This will return true if the service is up or false if it is not.
|
|
50
50
|
## Check the rate limit
|
51
51
|
|
52
52
|
```ruby
|
53
|
-
Quaderno::Base.rate_limit_info #=> {:reset=>4, :remaining=>0}
|
53
|
+
Quaderno::Base.rate_limit_info #=> {:reset=>4, :remaining=>0}
|
54
54
|
```
|
55
55
|
|
56
56
|
This will return a hash with information about the seconds until the rate limit reset and your remaining requests per minute ([check the API documentation for more information](https://github.com/quaderno/quaderno-api#rate-limiting)).
|
@@ -60,14 +60,14 @@ This will return a hash with information about the seconds until the rate limit
|
|
60
60
|
Quaderno-ruby parses all the json responses in human readable data, so you can access each value just like this:
|
61
61
|
|
62
62
|
```ruby
|
63
|
-
contact.id
|
63
|
+
contact.id
|
64
64
|
invoice.items
|
65
65
|
estimates.payments
|
66
66
|
etc.
|
67
67
|
```
|
68
68
|
|
69
69
|
## Managing contacts
|
70
|
-
|
70
|
+
|
71
71
|
### Getting contacts
|
72
72
|
```ruby
|
73
73
|
Quaderno::Contact.all() #=> Array
|
@@ -75,11 +75,11 @@ Quaderno-ruby parses all the json responses in human readable data, so you can a
|
|
75
75
|
```
|
76
76
|
|
77
77
|
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:
|
78
|
-
|
78
|
+
|
79
79
|
```ruby
|
80
80
|
Quaderno::Contact.all(q: 'John Doe') #=> Array
|
81
81
|
```
|
82
|
-
|
82
|
+
|
83
83
|
### Finding a contact
|
84
84
|
```ruby
|
85
85
|
Quaderno::Contact.find(id) #=> Quaderno::Contact
|
@@ -154,7 +154,7 @@ will delete the item with the id passed as parameter.
|
|
154
154
|
Quaderno::Invoice.all(page: 1) #=> Array
|
155
155
|
```
|
156
156
|
|
157
|
-
will return an array with all your invoices on the first page. You can also pass query strings using the attribute :q in order to filter the results by contact name, :state to filter by state or :date to filter by date
|
157
|
+
will return an array with all your invoices on the first page. You can also pass query strings using the attribute :q in order to filter the results by contact name, :state to filter by state or :date to filter by date
|
158
158
|
|
159
159
|
### Finding an invoice
|
160
160
|
```ruby
|
@@ -186,10 +186,10 @@ will update the specified invoice with the data of the hash passed as second par
|
|
186
186
|
|
187
187
|
will delete the invoice with the id passed as parameter.
|
188
188
|
|
189
|
-
|
189
|
+
|
190
190
|
###Adding or removing a payment
|
191
191
|
In order to add a payment you will need the Invoice instance you want to update.
|
192
|
-
|
192
|
+
|
193
193
|
```ruby
|
194
194
|
invoice = Quaderno::Invoice.find(invoice_id)
|
195
195
|
invoice.add_payment(params) #=> Quaderno::Payment
|
@@ -198,22 +198,90 @@ will delete the invoice with the id passed as parameter.
|
|
198
198
|
Where params is a hash with the payment information. The method will return an instance of Quaderno::Payment wich contains the information of the payment.
|
199
199
|
|
200
200
|
In order to remove a payment you will need the Invoice instance you want to update.
|
201
|
-
|
201
|
+
|
202
202
|
```ruby
|
203
203
|
invoice = Quaderno::Invoice.find(invoice_id)
|
204
204
|
invoice.remove_payment(payment_id) #=> Boolean
|
205
|
-
```
|
206
|
-
|
205
|
+
```
|
206
|
+
|
207
207
|
###Delivering the invoice
|
208
208
|
|
209
209
|
In order to deliver the estimate to the default recipient you will need the estimate you want to send.
|
210
|
-
|
210
|
+
|
211
211
|
```ruby
|
212
212
|
invoice = Quaderno::Invoice.find(invoice_id)
|
213
213
|
invoice.deliver
|
214
214
|
```
|
215
215
|
|
216
216
|
|
217
|
+
## Managing credits
|
218
|
+
|
219
|
+
### Getting credits
|
220
|
+
```ruby
|
221
|
+
Quaderno::Credit.all #=> Array
|
222
|
+
Quaderno::Credit.all(page: 1) #=> Array
|
223
|
+
```
|
224
|
+
|
225
|
+
will return an array with all your credit notes on the first page. You can also pass query strings using the attribute :q in order to filter the results by contact name, :state to filter by state or :date to filter by date
|
226
|
+
|
227
|
+
### Finding an credit
|
228
|
+
```ruby
|
229
|
+
Quaderno::Credit.find(id) #=> Quaderno::Credit
|
230
|
+
```
|
231
|
+
|
232
|
+
will return the credit with the id passed as parameter.
|
233
|
+
|
234
|
+
### Creating a new credit
|
235
|
+
|
236
|
+
```ruby
|
237
|
+
Quaderno::Credit.create(params) #=> Quaderno::Credit
|
238
|
+
```
|
239
|
+
|
240
|
+
will create an credit using the information of the hash passed as parameter.
|
241
|
+
|
242
|
+
### Updating an existing credit
|
243
|
+
```ruby
|
244
|
+
Quaderno::Credit.update(id, params) #=> Quaderno::Credit
|
245
|
+
```
|
246
|
+
|
247
|
+
will update the specified credit with the data of the hash passed as second parameter.
|
248
|
+
|
249
|
+
### Deleting an credit
|
250
|
+
|
251
|
+
```ruby
|
252
|
+
Quaderno::Credit.delete(id) #=> Boolean
|
253
|
+
```
|
254
|
+
|
255
|
+
will delete the credit with the id passed as parameter.
|
256
|
+
|
257
|
+
|
258
|
+
###Adding or removing a payment
|
259
|
+
In order to add a payment you will need the Credit instance you want to update.
|
260
|
+
|
261
|
+
```ruby
|
262
|
+
credit = Quaderno::Credit.find(credit_id)
|
263
|
+
credit.add_payment(params) #=> Quaderno::Payment
|
264
|
+
```
|
265
|
+
|
266
|
+
Where params is a hash with the payment information. The method will return an instance of Quaderno::Payment wich contains the information of the payment.
|
267
|
+
|
268
|
+
In order to remove a payment you will need the Credit instance you want to update.
|
269
|
+
|
270
|
+
```ruby
|
271
|
+
credit = Quaderno::Credit.find(credit_id)
|
272
|
+
credit.remove_payment(payment_id) #=> Boolean
|
273
|
+
```
|
274
|
+
|
275
|
+
###Delivering the credit
|
276
|
+
|
277
|
+
In order to deliver the estimate to the default recipient you will need the estimate you want to send.
|
278
|
+
|
279
|
+
```ruby
|
280
|
+
credit = Quaderno::Credit.find(credit_id)
|
281
|
+
credit.deliver
|
282
|
+
```
|
283
|
+
|
284
|
+
|
217
285
|
## Managing estimates
|
218
286
|
|
219
287
|
|
@@ -224,7 +292,7 @@ In order to remove a payment you will need the Invoice instance you want to upd
|
|
224
292
|
```
|
225
293
|
|
226
294
|
will return an array with all your estimates on the first page.
|
227
|
-
|
295
|
+
|
228
296
|
### Finding an estimate
|
229
297
|
```ruby
|
230
298
|
Quaderno::Estimate.find(id) #=> Quaderno::Estimate
|
@@ -255,10 +323,10 @@ will update the specified estimate with the data of the hash passed as second pa
|
|
255
323
|
|
256
324
|
will delete the estimate with the id passed as parameter.
|
257
325
|
|
258
|
-
|
326
|
+
|
259
327
|
###Adding or removing a payment
|
260
328
|
In order to add a payment you will need the estimate you want to update.
|
261
|
-
|
329
|
+
|
262
330
|
```ruby
|
263
331
|
estimate = Quaderno::Estimate.find(estimate_id)
|
264
332
|
estimate.add_payment(params) #=> Quaderno::Payment
|
@@ -267,21 +335,21 @@ will delete the estimate with the id passed as parameter.
|
|
267
335
|
Where params is a hash with the payment information. The method will return an instance of Quaderno::Payment wich contains the information of the payment.
|
268
336
|
|
269
337
|
In order to remove a payment you will need the estimate you want to update.
|
270
|
-
|
338
|
+
|
271
339
|
```ruby
|
272
340
|
estimate = Quaderno::Estimate.find(estimate_id)
|
273
341
|
estimate.remove_payment(payment_id) #=> Boolean
|
274
|
-
```
|
275
|
-
|
342
|
+
```
|
343
|
+
|
276
344
|
###Delivering the estimate
|
277
345
|
In order to deliver the estimate to the default recipient you will need the estimate you want to send.
|
278
|
-
|
346
|
+
|
279
347
|
```ruby
|
280
348
|
estimate = Quaderno::Estimate.find(estimate_id)
|
281
349
|
estimate.deliver
|
282
350
|
```
|
283
351
|
|
284
|
-
|
352
|
+
|
285
353
|
## Managing expenses
|
286
354
|
|
287
355
|
### Getting expenses
|
@@ -291,7 +359,7 @@ In order to remove a payment you will need the estimate you want to update.
|
|
291
359
|
```
|
292
360
|
|
293
361
|
will return an array with all your expenses on the first page. You can also pass query strings using the attribute :q in order to filter the results by contact name, :state to filter by state or :date to filter by date.
|
294
|
-
|
362
|
+
|
295
363
|
### Finding an expense
|
296
364
|
```ruby
|
297
365
|
Quaderno::Expense.find(id) #=> Quaderno::Expense
|
@@ -329,7 +397,7 @@ will delete the expense with the id passed as parameter.
|
|
329
397
|
```
|
330
398
|
|
331
399
|
will return an array with all the webhooks you have subscribed.
|
332
|
-
|
400
|
+
|
333
401
|
### Finding an webhook
|
334
402
|
```ruby
|
335
403
|
Quaderno::Webhook.find(id) #=> Quaderno::Webhook
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.1
|
data/changelog.md
CHANGED
data/lib/quaderno-ruby/base.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
module Quaderno
|
2
2
|
require 'httparty'
|
3
3
|
require 'json'
|
4
|
-
|
4
|
+
|
5
5
|
class Base < OpenStruct
|
6
6
|
include HTTParty
|
7
7
|
include Quaderno::Exceptions
|
8
|
-
include Quaderno::Behavior::Crud
|
9
|
-
|
8
|
+
include Quaderno::Behavior::Crud
|
9
|
+
|
10
10
|
PRODUCTION_URL = 'https://quadernoapp.com'
|
11
11
|
SANDBOX_URL = 'http://sandbox-quadernoapp.com'
|
12
12
|
|
13
|
-
@@auth_token = nil
|
13
|
+
@@auth_token = nil
|
14
14
|
@@subdomain = 'subdomain'
|
15
15
|
@@rate_limit_info = nil
|
16
16
|
@@base_url = PRODUCTION_URL
|
@@ -29,12 +29,12 @@ module Quaderno
|
|
29
29
|
end
|
30
30
|
END
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
def self.configure
|
34
34
|
yield self
|
35
35
|
@@base_url = @@environment == :sandbox && !@@subdomain.nil? ? "http://#{@@subdomain}.sandbox-quadernoapp.com" : "https://#{@@subdomain}.quadernoapp.com"
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
def self.environment=(mode)
|
39
39
|
@@environment = mode
|
40
40
|
end
|
@@ -42,11 +42,11 @@ module Quaderno
|
|
42
42
|
def self.auth_token=(auth_token)
|
43
43
|
@@auth_token = auth_token
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
def self.subdomain=(subdomain)
|
47
47
|
@@subdomain = subdomain
|
48
48
|
end
|
49
|
-
|
49
|
+
|
50
50
|
def self.authorization(auth_token, mode = nil)
|
51
51
|
begin
|
52
52
|
mode ||= @@environment
|
@@ -68,7 +68,7 @@ module Quaderno
|
|
68
68
|
end
|
69
69
|
true
|
70
70
|
end
|
71
|
-
|
71
|
+
|
72
72
|
#Returns the rate limit information: limit and remaining requests
|
73
73
|
def self.rate_limit_info
|
74
74
|
party_response = get("#{@@base_url}/api/v1/ping.json", basic_auth: { username: auth_token })
|
@@ -80,7 +80,7 @@ module Quaderno
|
|
80
80
|
def to_hash
|
81
81
|
self.marshal_dump
|
82
82
|
end
|
83
|
-
|
83
|
+
|
84
84
|
private
|
85
85
|
def self.auth_token
|
86
86
|
@@auth_token
|
@@ -89,7 +89,7 @@ module Quaderno
|
|
89
89
|
def self.base_url
|
90
90
|
@@base_url
|
91
91
|
end
|
92
|
-
|
92
|
+
|
93
93
|
def self.subdomain
|
94
94
|
@_subdomain = @@subdomain
|
95
95
|
end
|
@@ -98,5 +98,9 @@ module Quaderno
|
|
98
98
|
def self.api_path(api_path = nil)
|
99
99
|
@_api_path ||= api_path
|
100
100
|
end
|
101
|
+
|
102
|
+
def self.is_a_document?(document = nil)
|
103
|
+
@_document ||= document
|
104
|
+
end
|
101
105
|
end
|
102
106
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Quaderno
|
2
2
|
module Behavior
|
3
|
-
module Crud
|
3
|
+
module Crud
|
4
4
|
def self.included(receiver)
|
5
5
|
receiver.send :extend, ClassMethods
|
6
6
|
end
|
@@ -10,6 +10,7 @@ module Quaderno
|
|
10
10
|
klass.new hash
|
11
11
|
end
|
12
12
|
|
13
|
+
# Parse nested elements of a document
|
13
14
|
def parse(element)
|
14
15
|
payments_collection = []
|
15
16
|
element['payments'].each do |payment|
|
@@ -32,48 +33,52 @@ module Quaderno
|
|
32
33
|
check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true })
|
33
34
|
array = party_response.parsed_response
|
34
35
|
collection = []
|
35
|
-
|
36
|
-
|
36
|
+
|
37
|
+
if is_a_document?
|
38
|
+
array.each do |element|
|
37
39
|
api_model.parse(element)
|
40
|
+
collection << (new element)
|
38
41
|
end
|
39
|
-
|
40
|
-
|
42
|
+
else
|
43
|
+
array.each { |element| collection << (new element) }
|
44
|
+
end
|
45
|
+
|
41
46
|
collection
|
42
47
|
end
|
43
48
|
|
44
49
|
def find(id)
|
45
50
|
party_response = get "#{api_model.base_url}/api/v1/#{ api_model.api_path }/#{ id }.json", basic_auth: { username: api_model.auth_token }
|
46
|
-
check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true })
|
51
|
+
check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true })
|
47
52
|
hash = party_response.parsed_response
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
new hash
|
53
|
+
|
54
|
+
api_model.parse(hash) if is_a_document?
|
55
|
+
|
56
|
+
new hash
|
52
57
|
end
|
53
58
|
|
54
59
|
def create(params)
|
55
60
|
party_response = post "#{api_model.base_url}/api/v1/#{ api_model.api_path }.json", body: params, basic_auth: { username: api_model.auth_token }
|
56
61
|
check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, required_fields: true })
|
57
62
|
hash = party_response.parsed_response
|
58
|
-
|
59
|
-
|
60
|
-
|
63
|
+
|
64
|
+
api_model.parse(hash) if is_a_document?
|
65
|
+
|
61
66
|
new hash
|
62
67
|
end
|
63
68
|
|
64
69
|
def update(id, params)
|
65
70
|
party_response = put "#{api_model.base_url}/api/v1/#{ api_model.api_path }/#{ id }.json", body: params, basic_auth: { username: api_model.auth_token }
|
66
71
|
check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true })
|
67
|
-
hash = party_response.parsed_response
|
68
|
-
|
69
|
-
|
70
|
-
|
72
|
+
hash = party_response.parsed_response
|
73
|
+
|
74
|
+
api_model.parse(hash) if is_a_document?
|
75
|
+
|
71
76
|
new hash
|
72
77
|
end
|
73
78
|
|
74
79
|
def delete(id)
|
75
80
|
party_response = HTTParty.delete "#{api_model.base_url}/api/v1/#{ api_model.api_path }/#{ id }.json", basic_auth: { username: api_model.auth_token }
|
76
|
-
check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true, has_documents: true })
|
81
|
+
check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true, has_documents: true })
|
77
82
|
true
|
78
83
|
end
|
79
84
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
module Quaderno
|
2
2
|
module Behavior
|
3
3
|
module Deliver
|
4
|
-
|
4
|
+
|
5
5
|
def self.included(base)
|
6
6
|
base.send :include, InstanceMethods
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
module InstanceMethods
|
10
10
|
def deliver
|
11
11
|
party_response = api_model.get("#{api_model.base_url}/api/v1/#{ api_model.api_path }/#{ id }/deliver.json", basic_auth: { username: api_model.auth_token })
|
12
12
|
api_model.check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true, required_fields: true })
|
13
13
|
{ limit: party_response.headers["x-ratelimit-limit"].to_i, remaining: party_response.headers["x-ratelimit-remaining"].to_i }
|
14
|
-
end
|
14
|
+
end
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
module Quaderno
|
2
2
|
module Behavior
|
3
|
-
module Payment
|
3
|
+
module Payment
|
4
4
|
def self.included(base)
|
5
5
|
base.send :include, InstanceMethods
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
module InstanceMethods
|
9
9
|
def to_instance(klass, parsed)
|
10
10
|
klass.new(parsed)
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def add_payment(params)
|
14
|
-
party_response = api_model.post "#{api_model.base_url}/api/v1/#{ api_model.api_path }/#{ id }/payments.json", body: params, basic_auth: { username: api_model.auth_token }
|
14
|
+
party_response = api_model.post "#{api_model.base_url}/api/v1/#{ api_model.api_path }/#{ id }/payments.json", body: params, basic_auth: { username: api_model.auth_token }
|
15
15
|
api_model.check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, required_fields: true })
|
16
16
|
parsed = JSON::parse party_response.body
|
17
17
|
instance = to_instance(Quaderno::Payment, parsed)
|
@@ -29,7 +29,7 @@ module Quaderno
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
payments.delete(to_delete)
|
32
|
-
api_model.check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true })
|
32
|
+
api_model.check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true })
|
33
33
|
true
|
34
34
|
end
|
35
35
|
end
|
data/lib/quaderno-ruby/item.rb
CHANGED
data/lib/quaderno-ruby.rb
CHANGED
@@ -2,7 +2,7 @@ require 'ostruct'
|
|
2
2
|
|
3
3
|
require 'quaderno-ruby/exceptions/exceptions'
|
4
4
|
%w(crud deliver payment).each { |filename| require "quaderno-ruby/behavior/#{ filename }" }
|
5
|
-
%w(base contact item invoice estimate expense document_item payment webhook tax).each { |filename| require "quaderno-ruby/#{ filename }" }
|
5
|
+
%w(base contact item invoice credit estimate expense document_item payment webhook tax).each { |filename| require "quaderno-ruby/#{ filename }" }
|
6
6
|
|
7
7
|
module Quaderno
|
8
8
|
|
data/quaderno.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: quaderno 1.
|
5
|
+
# stub: quaderno 1.6.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "quaderno"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.6.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Recrea"]
|
14
|
-
s.date = "2015-04-
|
14
|
+
s.date = "2015-04-13"
|
15
15
|
s.description = " A ruby wrapper for Quaderno API "
|
16
16
|
s.email = "carlos@recrea.es"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/quaderno-ruby/behavior/deliver.rb",
|
35
35
|
"lib/quaderno-ruby/behavior/payment.rb",
|
36
36
|
"lib/quaderno-ruby/contact.rb",
|
37
|
+
"lib/quaderno-ruby/credit.rb",
|
37
38
|
"lib/quaderno-ruby/document_item.rb",
|
38
39
|
"lib/quaderno-ruby/estimate.rb",
|
39
40
|
"lib/quaderno-ruby/exceptions/exceptions.rb",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quaderno
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recrea
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -75,6 +75,7 @@ files:
|
|
75
75
|
- lib/quaderno-ruby/behavior/deliver.rb
|
76
76
|
- lib/quaderno-ruby/behavior/payment.rb
|
77
77
|
- lib/quaderno-ruby/contact.rb
|
78
|
+
- lib/quaderno-ruby/credit.rb
|
78
79
|
- lib/quaderno-ruby/document_item.rb
|
79
80
|
- lib/quaderno-ruby/estimate.rb
|
80
81
|
- lib/quaderno-ruby/exceptions/exceptions.rb
|