recurly 2.8.0.rc2 → 2.8.0.rc3

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: b2a9f88641c58780c5ee3962916de3a0a97a63cc
4
- data.tar.gz: d101b8874a3abeeae49b4e1d94694157bc016ddf
3
+ metadata.gz: 858632bc27cb9ab5afdb879b3465fcd9bf852211
4
+ data.tar.gz: e58bef94c3f63a3e3abf95b0dec28be12acc9fa6
5
5
  SHA512:
6
- metadata.gz: 443d0bd8cf6d9f0269ead3ae60d546ffd34ebc9c3a473de6b9e7e3f70273b077322c1f19ef655d0410b30cde1d9f8d9012e35ab7e5a8d0156c0dc5032a4301fa
7
- data.tar.gz: 38fea9635c984696cdeb3cd692bcc0445fc1315a55e3fd385e56bc53683d95f4dc5ac6cd57ef407213f0d35273fde743a103c5347e5c3d4101f84e88f405dabd
6
+ metadata.gz: 6f53e1bb38066c646379b1ed2b8981b891c9498424233b8f333e5b39b7deabfe07f6505649c4a0b007d81223f1aa465c2f969b46746a969771c41fa2c774717f
7
+ data.tar.gz: 79f7bb2723c94f82dc3daceeda2469434771af5c475ac8801f609444a08d4ce08df63365a57411d33ffa29e410d35c6a6b70a312135940b8bb9b96cadcca6c86
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
 
@@ -752,6 +756,10 @@ module Recurly
752
756
  }
753
757
  end
754
758
 
759
+ def as_json(options = nil)
760
+ attributes.reject { |k, v| v.is_a?(Recurly::Resource::Pager) }
761
+ end
762
+
755
763
  # @return [Hash] The raw hash of record href links.
756
764
  def links
757
765
  @links ||= {}
@@ -52,6 +52,7 @@ module Recurly
52
52
  tax_code
53
53
  accounting_code
54
54
  fraud
55
+ product_code
55
56
  )
56
57
  alias to_param uuid
57
58
  alias fraud_info fraud
data/lib/recurly/usage.rb CHANGED
@@ -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
@@ -3,7 +3,7 @@ module Recurly
3
3
  MAJOR = 2
4
4
  MINOR = 8
5
5
  PATCH = 0
6
- PRE = 'rc2'
6
+ PRE = 'rc3'
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
9
9
 
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.8.0.rc2
4
+ version: 2.8.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  version: 1.3.1
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.5.1
241
+ rubygems_version: 2.4.5.2
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Recurly API Client