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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61ab2928685e7120a69eac92fa51c4e06578e41f
4
- data.tar.gz: cc4dcd149a5e5054ee39b2711cb8260051eb053b
3
+ metadata.gz: fd9d1d07fa94f9b335fdba85b964b456e154b954
4
+ data.tar.gz: b8a84548b0f123d751d51ad7c87b87b9ba3052c7
5
5
  SHA512:
6
- metadata.gz: cb4828c10b305d8ae5875a60ff620eea737587be9d8956432baa083547fca804551671e19f2f92a7728954abc6749598cfb4da6669d4a24c51c6b47e334cd578
7
- data.tar.gz: 318dd23bf5a4e539f728f07d8d30c298cd841708a1205a969b52a92cd9fe88f8714c0bedb55dc9450a02e5e40447943f16be978c80f19889a74f30ad81b4e5a6
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
 
@@ -370,13 +370,17 @@ module Recurly
370
370
  # @return [Resource]
371
371
  # @param response [Net::HTTPResponse]
372
372
  def from_response(response)
373
- case response['Content-Type']
373
+ content_type = response['Content-Type']
374
+
375
+ case content_type
374
376
  when %r{application/pdf}
375
377
  response.body
376
- else # when %r{application/xml}
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 ||= {}
@@ -4,6 +4,7 @@ module Recurly
4
4
  belongs_to :measured_unit
5
5
 
6
6
  define_attribute_methods %w(
7
+ id
7
8
  usage_type
8
9
  unit_amount_in_cents
9
10
  usage_percentage
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 7
5
- PATCH = 5
5
+ PATCH = 6
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
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.5
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: 2016-12-01 00:00:00.000000000 Z
11
+ date: 2017-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri