recurly 2.4.0 → 2.4.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 +4 -4
- data/README.md +1 -1
- data/lib/recurly/account.rb +1 -0
- data/lib/recurly/invoice.rb +6 -1
- data/lib/recurly/resource.rb +1 -1
- data/lib/recurly/subscription.rb +8 -4
- 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: d567b8311cdce239cb392169321fc856f1878249
|
4
|
+
data.tar.gz: 028a4010498bf77cf85c2436a91146589143cd41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaed9878f89831c78e13521d7388e1adebfe6d562169cf7499a3856596154aaf3fc1c46e52c525b67981c6c0157994aca8cc4a9685fbc0287543bc0c489c88ae
|
7
|
+
data.tar.gz: e759c21d690ccdc0d449d81d61427adbb599913e8ada19ef94cc105ca85abb9f32dd3b523c53d9237bc1b3785fbba9a7b5cd300a79ac5e5f0da7a35bbd6d443c
|
data/README.md
CHANGED
@@ -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.4.
|
15
|
+
gem 'recurly', '~> 2.4.1'
|
16
16
|
```
|
17
17
|
|
18
18
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/account.rb
CHANGED
data/lib/recurly/invoice.rb
CHANGED
@@ -23,10 +23,15 @@ module Recurly
|
|
23
23
|
# @return [Redemption]
|
24
24
|
has_one :redemption
|
25
25
|
|
26
|
+
def invoice_number_with_prefix
|
27
|
+
"#{invoice_number_prefix}#{invoice_number}"
|
28
|
+
end
|
29
|
+
|
26
30
|
define_attribute_methods %w(
|
27
31
|
uuid
|
28
32
|
state
|
29
33
|
invoice_number
|
34
|
+
invoice_number_prefix
|
30
35
|
po_number
|
31
36
|
vat_number
|
32
37
|
subtotal_in_cents
|
@@ -45,7 +50,7 @@ module Recurly
|
|
45
50
|
customer_notes
|
46
51
|
address
|
47
52
|
)
|
48
|
-
alias to_param
|
53
|
+
alias to_param invoice_number_with_prefix
|
49
54
|
|
50
55
|
def self.to_xml(attrs)
|
51
56
|
invoice = new attrs
|
data/lib/recurly/resource.rb
CHANGED
@@ -734,7 +734,7 @@ module Recurly
|
|
734
734
|
# account.read_link :billing_info # => <Recurly::BillingInfo>
|
735
735
|
def follow_link key, options = {}
|
736
736
|
if link = links[key = key.to_s]
|
737
|
-
response = API.send link[:method], link[:href],
|
737
|
+
response = API.send link[:method], link[:href], options[:body], options
|
738
738
|
if resource_class = link[:resource_class]
|
739
739
|
response = resource_class.from_response response
|
740
740
|
response.attributes[self.class.member_name] = self
|
data/lib/recurly/subscription.rb
CHANGED
@@ -114,6 +114,11 @@ module Recurly
|
|
114
114
|
end
|
115
115
|
alias add_ons= subscription_add_ons=
|
116
116
|
|
117
|
+
def pending_subscription
|
118
|
+
sub = self[:pending_subscription]
|
119
|
+
sub.tap {|e| e.currency = currency} if sub.is_a? Subscription
|
120
|
+
end
|
121
|
+
|
117
122
|
# Cancel a subscription so that it will not renew.
|
118
123
|
#
|
119
124
|
# @return [true, false] +true+ when successful, +false+ when unable to
|
@@ -184,11 +189,10 @@ module Recurly
|
|
184
189
|
# @return [true, false] +true+ when successful, +false+ when unable to
|
185
190
|
# @params notes [Hash] should be the notes parameters you wish to update
|
186
191
|
def update_notes(notes)
|
192
|
+
return false unless link? :notes
|
187
193
|
self.attributes = notes
|
188
|
-
|
189
|
-
|
190
|
-
rescue API::UnprocessableEntity => e
|
191
|
-
apply_errors e
|
194
|
+
reload follow_link(:notes, body: to_xml)
|
195
|
+
true
|
192
196
|
end
|
193
197
|
|
194
198
|
def signable_attributes
|
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.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|