quaderno 1.11.1 → 1.11.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0fe0db9d04d90ecb82f4a3f4ab986758cf0d3ce
4
- data.tar.gz: ce6939ab18ba3cbbb2938a4b6f4fc3f820044388
3
+ metadata.gz: 470de4559fa2e97d4765b34b5d73613c8dd1f388
4
+ data.tar.gz: 437161875f0a344443d824d40998c115446600db
5
5
  SHA512:
6
- metadata.gz: 77169d373d96862cf1d31fc71faaa6c95a235323a6ac0109bb8fc6b2339d820b88a53d1d844f28613036f950b49bd2d17e26803b3813bd965d3e64745e55f7bc
7
- data.tar.gz: 488e876d73a2f2a936021654ec100eed73d96d8470c3bf3823e141f6196d7bad7da91123221d05488896b92d322220c92d242941dbeca1f7ca4122d3852357e8
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.0 See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
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 customer contact by its payment gatewaycustomer ID
90
+ ### Retrieving a contact by its payment gateway customer ID
91
91
  ```ruby
92
- Quaderno::Contact.retrieve_customer(PAYMENT_GATEWAY_CUSTOMER_ID, PAYMENT_GATEWAY) #=> 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
+ 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.1 ruby lib
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.1"
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-02-03"
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.1
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-02-03 00:00:00.000000000 Z
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
@@ -1,2 +0,0 @@
1
- gem build quaderno.gemspec
2
- gem install quaderno-1.3.2.gem