recurly 2.7.5 → 2.7.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of recurly might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/recurly/resource.rb +10 -2
- data/lib/recurly/usage.rb +1 -0
- data/lib/recurly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd9d1d07fa94f9b335fdba85b964b456e154b954
|
4
|
+
data.tar.gz: b8a84548b0f123d751d51ad7c87b87b9ba3052c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef60058964d67fe8dc0b131131f16da67c8da524d81f327cb29fd48d91d6679450b0c0a4ee930f24118dc9207c0c0b1b6930c30de06c583b56c6937b2e23b578
|
7
|
+
data.tar.gz: 7742e4683e407f6fb7ec3e69ef769b07aca98e993e81eff176e28a7e0b9b5e9f14774e4a1d0e276812dc3fbe18887bb1a8d97251ff26c388f8faecd0e16713a1
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Recurly [![Build Status](https://secure.travis-ci.org/recurly/recurly-client-ruby.png)](http://travis-ci.org/recurly/recurly-client-ruby) [![Gem Version](https://badge.fury.io/rb/recurly.svg)](http://badge.fury.io/rb/recurly)
|
1
|
+
# Recurly [![Build Status](https://secure.travis-ci.org/recurly/recurly-client-ruby.png?branch=master)](http://travis-ci.org/recurly/recurly-client-ruby) [![Gem Version](https://badge.fury.io/rb/recurly.svg)](http://badge.fury.io/rb/recurly)
|
2
2
|
|
3
3
|
<https://github.com/recurly/recurly-client-ruby>
|
4
4
|
|
data/lib/recurly/resource.rb
CHANGED
@@ -370,13 +370,17 @@ module Recurly
|
|
370
370
|
# @return [Resource]
|
371
371
|
# @param response [Net::HTTPResponse]
|
372
372
|
def from_response(response)
|
373
|
-
|
373
|
+
content_type = response['Content-Type']
|
374
|
+
|
375
|
+
case content_type
|
374
376
|
when %r{application/pdf}
|
375
377
|
response.body
|
376
|
-
|
378
|
+
when %r{application/xml}
|
377
379
|
record = from_xml response.body
|
378
380
|
record.instance_eval { @etag, @response = response['ETag'], response }
|
379
381
|
record
|
382
|
+
else
|
383
|
+
raise Recurly::Error, "Content-Type \"#{content_type}\" is not accepted"
|
380
384
|
end
|
381
385
|
end
|
382
386
|
|
@@ -742,6 +746,10 @@ module Recurly
|
|
742
746
|
}
|
743
747
|
end
|
744
748
|
|
749
|
+
def as_json(options = nil)
|
750
|
+
attributes.reject { |k, v| v.is_a?(Recurly::Resource::Pager) }
|
751
|
+
end
|
752
|
+
|
745
753
|
# @return [Hash] The raw hash of record href links.
|
746
754
|
def links
|
747
755
|
@links ||= {}
|
data/lib/recurly/usage.rb
CHANGED
data/lib/recurly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recurly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|