paid 1.0.2 → 1.0.3

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: 2e07a6ca29545de7c32a15851ab9742341f9c0a4
4
- data.tar.gz: dd51cf68c35c3211960950660273101a5d306126
3
+ metadata.gz: 74169da7250db9559dcd77293124823e3309bbe9
4
+ data.tar.gz: aede8ef411a5f6fae643384a529bf19dc21cd0ea
5
5
  SHA512:
6
- metadata.gz: 9a9dd416fff9f14807f3773311ffadacee30624275e1a2ea50616ecf616593894f4223a1a0f32a26a5aa94f1a475d01eeb4db4ef0d813e854bc28c80aea9009d
7
- data.tar.gz: f3d20bde96f8e59e963236dbc97df50bcfb75969b6a32fcf7fc908c3cdf67481cbb0bf2078264842b1a4487ca28bdc91b371b182546d7c18db6964dd65e706b7
6
+ metadata.gz: 82105210a908f6edaf4b2b77bf73942f809d94dbe99ce16ed9aa06fd2dcf18c493447fabf12ba9717acaa5da9f45bb743b9e31a3c75bf71e23629d41ba1d9775
7
+ data.tar.gz: d161fc708ed9e0a23cbe739bcfd37ab32308a78538a5dc21912f45bdeda5abfd6f72ecec1aa31ca4a44a988f8bd0dd644db11249f86c1a5dc22dc9fa9b208e85
@@ -1,3 +1,10 @@
1
+ === 1.0.2 2015-04-15
2
+
3
+ * 2 minor enhancements:
4
+ * Adding support for the invoice void endpoint.
5
+ * Adding support for the transaction delete endpoint.
6
+
7
+
1
8
  === 1.0.2 2015-04-13
2
9
 
3
10
  * 1 minor enhancement:
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Paid Ruby bindings ![Travis CI Status](https://travis-ci.org/paidapi/paid-ruby.svg?branch=master)
1
+ # Paid Ruby bindings ![Travis CI Status](https://travis-ci.org/paidapi/paid-ruby.svg?branch=master) [![Code Climate](https://codeclimate.com/github/paidapi/paid-ruby/badges/gpa.svg)](https://codeclimate.com/github/paidapi/paid-ruby)
2
2
 
3
3
 
4
4
  ## Installation
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
@@ -46,7 +46,12 @@ module Paid
46
46
  begin
47
47
  json = Util.symbolize_keys(JSON.parse(@response_body))
48
48
  rescue JSON::ParserError
49
- raise APIError.new("Unable to parse the server response as JSON.", self)
49
+ if @response_body.is_a?(String) && @response_body.strip.empty?
50
+ {}
51
+ else
52
+ @error = APIError.new("Unable to parse the server response as JSON.", self)
53
+ raise @error
54
+ end
50
55
  end
51
56
  end
52
57
 
@@ -45,7 +45,7 @@ module Paid
45
45
 
46
46
  def void(params={}, headers={})
47
47
  method = APIMethod.new(:post, "/invoices/:id/void", params, headers, self)
48
- method.execute
48
+ self.refresh_from(method.execute, method)
49
49
  end
50
50
 
51
51
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Calhoun