recurly 2.2.0 → 2.2.1

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: c791903258f0bd8ba1d9cb2826ec0fb030f119e2
4
- data.tar.gz: 9f08ec8700651e5f1301ec295c1582c4600fed48
3
+ metadata.gz: 2f18664bf3bf429d74d435a45c5acd27ff35de7b
4
+ data.tar.gz: 70beddea54ead8825fbdf74ccf5f1e45446b9b91
5
5
  SHA512:
6
- metadata.gz: 747adc59314fdf0f54576463c186aece07c83a813535bc67c834bdf3370fe3c19de03fe1cb81f72a2300f396df38d26acffb4ceef004be8bf2759b91c81495ba
7
- data.tar.gz: cb46b87109a2bd83fcaa46ea562d7c87c373b1a3f178cfcb34078be5a63655e7e344728fb1512a1e7862f2abe5ab1875e6532305671124ae825b5088f583621f
6
+ metadata.gz: 0133344f0532c3c01437e3181f36a24e1ac09f617d9de75112cda2f68a6df012fc5023839c87b17a7d305446c3689418c1ff33d48fc5ec45c81c739a6b5093dd
7
+ data.tar.gz: dfdf3ad61afc549e2e5f589df9efdf2c6d83228b61bea65fcd6966610a8a80f448d8d77541b0ec69fc88bcc3d5d7e559892e8e22d1651fcacfd01cd0a8fb32b1
@@ -12,7 +12,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
12
12
  [Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
13
13
 
14
14
  ``` ruby
15
- gem 'recurly', '~> 2.2.0'
15
+ gem 'recurly', '~> 2.2.1'
16
16
  ```
17
17
 
18
18
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -33,6 +33,8 @@ module Recurly
33
33
  company_name
34
34
  accept_language
35
35
  hosted_login_token
36
+ vat_number
37
+ address
36
38
  created_at
37
39
  )
38
40
  alias to_param account_code
@@ -0,0 +1,14 @@
1
+ module Recurly
2
+ class Address < Resource
3
+
4
+ define_attribute_methods %w(
5
+ address1
6
+ address2
7
+ city
8
+ state
9
+ zip
10
+ country
11
+ phone
12
+ )
13
+ end
14
+ end
@@ -13,6 +13,8 @@ module Recurly
13
13
  belongs_to :account
14
14
  # @return [Invoice, nil]
15
15
  belongs_to :invoice
16
+ # @return [Subscription, nil]
17
+ belongs_to :subscription
16
18
 
17
19
  define_attribute_methods %w(
18
20
  uuid
@@ -27,6 +29,7 @@ module Recurly
27
29
  total_in_cents
28
30
  currency
29
31
  taxable
32
+ product_code
30
33
  start_date
31
34
  end_date
32
35
  created_at
data/lib/recurly/all.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'recurly'
2
2
  require 'recurly/account'
3
3
  require 'recurly/add_on'
4
+ require 'recurly/address'
4
5
  require 'recurly/adjustment'
5
6
  require 'recurly/api'
6
7
  require 'recurly/billing_info'
@@ -45,8 +45,9 @@ module Recurly
45
45
  end
46
46
 
47
47
  def xml
48
- return @xml if defined? @xml
49
- @xml = (XML.new(response.body) if response && !response.body.empty?)
48
+ @xml ||= begin
49
+ XML.new(response.body) if response and response.body and not response.body.empty?
50
+ end
50
51
  end
51
52
  end
52
53
 
@@ -15,6 +15,8 @@ module Recurly
15
15
 
16
16
  # @return [Account]
17
17
  belongs_to :account
18
+ # @return [Subscription]
19
+ belongs_to :subscription
18
20
 
19
21
  # @return [Redemption]
20
22
  has_one :redemption
@@ -417,7 +417,12 @@ module Recurly
417
417
  }
418
418
  end
419
419
  else
420
- record[el.name] = XML.cast el
420
+ val = XML.cast(el)
421
+ if 'address' == el.name && val.kind_of?(Hash)
422
+ record[el.name] = Address.new val
423
+ else
424
+ record[el.name] = val
425
+ end
421
426
  end
422
427
  end
423
428
 
@@ -22,6 +22,9 @@ module Recurly
22
22
  # @return [Plan]
23
23
  belongs_to :plan
24
24
 
25
+ # @return [Invoice]
26
+ has_one :invoice
27
+
25
28
  define_attribute_methods %w(
26
29
  uuid
27
30
  state
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 2
5
- PATCH = 0
5
+ PATCH = 1
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
data/lib/recurly.rb CHANGED
@@ -2,6 +2,7 @@
2
2
  module Recurly
3
3
  autoload :Account, 'recurly/account'
4
4
  autoload :AddOn, 'recurly/add_on'
5
+ autoload :Address, 'recurly/address'
5
6
  autoload :Adjustment, 'recurly/adjustment'
6
7
  autoload :API, 'recurly/api'
7
8
  autoload :BillingInfo, 'recurly/billing_info'
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2014-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.9.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.9.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.6.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.6.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.7.6
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.7.6
55
55
  description: 'An API client library for Recurly: http://recurly.com'
@@ -58,18 +58,22 @@ executables:
58
58
  - recurly
59
59
  extensions: []
60
60
  extra_rdoc_files:
61
- - README.markdown
61
+ - README.md
62
62
  files:
63
+ - README.md
64
+ - bin/recurly
63
65
  - lib/ecurly.rb
64
66
  - lib/rails/generators/recurly/config_generator.rb
65
67
  - lib/rails/recurly.rb
68
+ - lib/recurly.rb
66
69
  - lib/recurly/account.rb
67
70
  - lib/recurly/add_on.rb
71
+ - lib/recurly/address.rb
68
72
  - lib/recurly/adjustment.rb
69
73
  - lib/recurly/all.rb
74
+ - lib/recurly/api.rb
70
75
  - lib/recurly/api/errors.rb
71
76
  - lib/recurly/api/net_http_adapter.rb
72
- - lib/recurly/api.rb
73
77
  - lib/recurly/billing_info.rb
74
78
  - lib/recurly/coupon.rb
75
79
  - lib/recurly/helper.rb
@@ -78,44 +82,41 @@ files:
78
82
  - lib/recurly/money.rb
79
83
  - lib/recurly/plan.rb
80
84
  - lib/recurly/redemption.rb
85
+ - lib/recurly/resource.rb
81
86
  - lib/recurly/resource/errors.rb
82
87
  - lib/recurly/resource/pager.rb
83
- - lib/recurly/resource.rb
84
- - lib/recurly/subscription/add_ons.rb
85
88
  - lib/recurly/subscription.rb
89
+ - lib/recurly/subscription/add_ons.rb
86
90
  - lib/recurly/subscription_add_on.rb
87
- - lib/recurly/transaction/errors.rb
88
91
  - lib/recurly/transaction.rb
92
+ - lib/recurly/transaction/errors.rb
89
93
  - lib/recurly/version.rb
94
+ - lib/recurly/xml.rb
90
95
  - lib/recurly/xml/nokogiri.rb
91
96
  - lib/recurly/xml/rexml.rb
92
- - lib/recurly/xml.rb
93
- - lib/recurly.rb
94
- - README.markdown
95
- - bin/recurly
96
97
  homepage: https://github.com/recurly/recurly-client-ruby
97
98
  licenses:
98
99
  - MIT
99
100
  metadata: {}
100
101
  post_install_message:
101
102
  rdoc_options:
102
- - --main
103
- - README.markdown
103
+ - "--main"
104
+ - README.md
104
105
  require_paths:
105
106
  - lib
106
107
  required_ruby_version: !ruby/object:Gem::Requirement
107
108
  requirements:
108
- - - '>='
109
+ - - ">="
109
110
  - !ruby/object:Gem::Version
110
111
  version: '0'
111
112
  required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  requirements:
113
- - - '>='
114
+ - - ">="
114
115
  - !ruby/object:Gem::Version
115
116
  version: '0'
116
117
  requirements: []
117
118
  rubyforge_project:
118
- rubygems_version: 2.1.10
119
+ rubygems_version: 2.2.0.rc.1
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: Recurly API Client