quaderno 1.11.1 → 1.11.2
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/README.md +19 -3
- data/VERSION +1 -1
- data/changelog.md +3 -0
- data/lib/quaderno-ruby/behavior/crud.rb +2 -2
- data/quaderno.gemspec +3 -4
- metadata +2 -3
- data/build_install.sh +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 470de4559fa2e97d4765b34b5d73613c8dd1f388
|
4
|
+
data.tar.gz: 437161875f0a344443d824d40998c115446600db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06dde9c589f2dbcb3e56e2aed929798a94035f024db6a2c5ea6fabb1a1e5e9571170ead4522d74a13efb2dfacb844513dd75dd01dd761ccaf18464317a558b92
|
7
|
+
data.tar.gz: 7fa2dee669868d93400484a84e8f7f2a55279366a803230e1695c087c53e3f67acbc7c4d76e8b3e8fef29976487d270506e65a08f3c7ca722b8fad751c16c260
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
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.11.
|
6
|
+
Current version is 1.11.2 See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
|
7
7
|
|
8
8
|
## Installation & Configuration
|
9
9
|
|
@@ -87,12 +87,15 @@ Quaderno-ruby parses all the json responses in human readable data, so you can a
|
|
87
87
|
|
88
88
|
will return the contact with the id passed as parameter.
|
89
89
|
|
90
|
-
### Retrieving a
|
90
|
+
### Retrieving a contact by its payment gateway customer ID
|
91
91
|
```ruby
|
92
|
-
Quaderno::Contact.
|
92
|
+
Quaderno::Contact.retrieve(PAYMENT_GATEWAY_CUSTOMER_ID, PAYMENT_GATEWAY) #=> Quaderno::Contact
|
93
93
|
```
|
94
94
|
will return the contact with the customer id passed as parameter.
|
95
95
|
|
96
|
+
*_Note_: `Quaderno::Contact.retrieve_customer` has been deprecated in favor of `Quaderno::Contact.retrieve`
|
97
|
+
|
98
|
+
|
96
99
|
### Creating a new contact
|
97
100
|
```ruby
|
98
101
|
Quaderno::Contact.create(params) #=> Quaderno::Contact
|
@@ -169,6 +172,13 @@ will delete the item with the id passed as parameter.
|
|
169
172
|
|
170
173
|
will return the invoice with the id passed as parameter.
|
171
174
|
|
175
|
+
### Retrieving an invoice by its payment gateway transaction ID
|
176
|
+
```ruby
|
177
|
+
Quaderno::Invoice.retrieve(PAYMENT_GATEWAY_TRANSACTION_ID, PAYMENT_GATEWAY) #=> Quaderno::Invoice
|
178
|
+
```
|
179
|
+
will return the invoice with the transaction id passed as parameter.
|
180
|
+
|
181
|
+
|
172
182
|
### Creating a new invoice
|
173
183
|
|
174
184
|
```ruby
|
@@ -286,6 +296,12 @@ will delete the receipt with the id passed as parameter.
|
|
286
296
|
|
287
297
|
will return the credit with the id passed as parameter.
|
288
298
|
|
299
|
+
### Retrieving a credit by its payment gateway transaction ID
|
300
|
+
```ruby
|
301
|
+
Quaderno::Credit.retrieve(PAYMENT_GATEWAY_TRANSACTION_ID, PAYMENT_GATEWAY) #=> Quaderno::Credit
|
302
|
+
```
|
303
|
+
will return the credit note with the transaction id passed as parameter.
|
304
|
+
|
289
305
|
### Creating a new credit
|
290
306
|
|
291
307
|
```ruby
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.11.
|
1
|
+
1.11.2
|
data/changelog.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
#Changelog
|
2
2
|
|
3
|
+
##1.11.2
|
4
|
+
* Specify `Content-Type` header so `HTTParty` don't merge the elements within the body content.
|
5
|
+
|
3
6
|
##1.11.1
|
4
7
|
* Added `retrieve` method for `Quaderno::Contact`, `Quaderno::Invoice`, `Quaderno::Credit`
|
5
8
|
* Deprecate `retrieve_customer` as an alias of `retrieve`
|
@@ -50,7 +50,7 @@ module Quaderno
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def create(params)
|
53
|
-
response = post "#{api_model.url}#{ api_model.api_path }.json", body: params, basic_auth: { username: api_model.auth_token }, headers: version_header
|
53
|
+
response = post "#{api_model.url}#{ api_model.api_path }.json", body: params.to_json, basic_auth: { username: api_model.auth_token }, headers: version_header.merge('Content-Type' => 'application/json')
|
54
54
|
check_exception_for(response, { rate_limit: true, subdomain_or_token: true, required_fields: true })
|
55
55
|
hash = response.parsed_response
|
56
56
|
|
@@ -60,7 +60,7 @@ module Quaderno
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def update(id, params)
|
63
|
-
response = put "#{api_model.url}#{ api_model.api_path }/#{ id }.json", body: params, basic_auth: { username: api_model.auth_token }, headers: version_header
|
63
|
+
response = put "#{api_model.url}#{ api_model.api_path }/#{ id }.json", body: params.to_json, basic_auth: { username: api_model.auth_token }, headers: version_header.merge('Content-Type' => 'application/json')
|
64
64
|
check_exception_for(response, { rate_limit: true, required_fields: true, subdomain_or_token: true, id: true })
|
65
65
|
hash = response.parsed_response
|
66
66
|
|
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.11.
|
5
|
+
# stub: quaderno 1.11.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "quaderno"
|
9
|
-
s.version = "1.11.
|
9
|
+
s.version = "1.11.2"
|
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 = "2017-
|
14
|
+
s.date = "2017-03-14"
|
15
15
|
s.description = " A ruby wrapper for Quaderno API "
|
16
16
|
s.email = "carlos@recrea.es"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
|
|
26
26
|
"README.md",
|
27
27
|
"Rakefile",
|
28
28
|
"VERSION",
|
29
|
-
"build_install.sh",
|
30
29
|
"changelog.md",
|
31
30
|
"lib/quaderno-ruby.rb",
|
32
31
|
"lib/quaderno-ruby/base.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.11.
|
4
|
+
version: 1.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recrea
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -67,7 +67,6 @@ files:
|
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
69
|
- VERSION
|
70
|
-
- build_install.sh
|
71
70
|
- changelog.md
|
72
71
|
- lib/quaderno-ruby.rb
|
73
72
|
- lib/quaderno-ruby/base.rb
|
data/build_install.sh
DELETED