recurly 2.1.4 → 2.1.5
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.
- data/README.markdown +2 -2
- data/lib/recurly/invoice.rb +20 -0
- data/lib/recurly/subscription.rb +13 -0
- data/lib/recurly/version.rb +1 -1
- metadata +14 -14
data/README.markdown
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.1.
|
15
|
+
gem 'recurly', '~> 2.1.5'
|
16
16
|
```
|
17
17
|
|
18
18
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
@@ -62,7 +62,7 @@ Instructions and examples are available on
|
|
62
62
|
[Recurly's documentation site](http://docs.recurly.com/api/basics).
|
63
63
|
|
64
64
|
Recurly's gem API is available
|
65
|
-
[here](http://rubydoc.info/gems/recurly/2.1.
|
65
|
+
[here](http://rubydoc.info/gems/recurly/2.1.5/frames).
|
66
66
|
|
67
67
|
|
68
68
|
## Contributing
|
data/lib/recurly/invoice.rb
CHANGED
@@ -32,6 +32,26 @@ module Recurly
|
|
32
32
|
)
|
33
33
|
alias to_param invoice_number
|
34
34
|
|
35
|
+
# Marks an invoice as paid successfully.
|
36
|
+
#
|
37
|
+
# @return [true, false] +true+ when successful, +false+ when unable to
|
38
|
+
# (e.g., the invoice is no longer open).
|
39
|
+
def mark_successful
|
40
|
+
return false unless self[:mark_successful]
|
41
|
+
reload self[:mark_successful].call
|
42
|
+
true
|
43
|
+
end
|
44
|
+
|
45
|
+
# Marks an invoice as failing collection.
|
46
|
+
#
|
47
|
+
# @return [true, false] +true+ when successful, +false+ when unable to
|
48
|
+
# (e.g., the invoice is no longer open).
|
49
|
+
def mark_failed
|
50
|
+
return false unless self[:mark_failed]
|
51
|
+
reload self[:mark_failed].call
|
52
|
+
true
|
53
|
+
end
|
54
|
+
|
35
55
|
def pdf
|
36
56
|
find to_param, :format => 'pdf'
|
37
57
|
end
|
data/lib/recurly/subscription.rb
CHANGED
@@ -136,6 +136,19 @@ module Recurly
|
|
136
136
|
true
|
137
137
|
end
|
138
138
|
|
139
|
+
# Postpone a subscription's renewal date.
|
140
|
+
#
|
141
|
+
# @return [true, false] +true+ when successful, +false+ when unable to
|
142
|
+
# (e.g., the subscription is not active).
|
143
|
+
# @param next_renewal_date [Time] when the subscription should renew.
|
144
|
+
def postpone next_renewal_date
|
145
|
+
return false unless self[:postpone]
|
146
|
+
reload self[:postpone].call(
|
147
|
+
:params => { :next_renewal_date => next_renewal_date }
|
148
|
+
)
|
149
|
+
true
|
150
|
+
end
|
151
|
+
|
139
152
|
def signable_attributes
|
140
153
|
super.merge :plan_code => plan_code
|
141
154
|
end
|
data/lib/recurly/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recurly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70247119507640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.9.2
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70247119507640
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: minitest
|
27
|
-
requirement: &
|
27
|
+
requirement: &70247119507140 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.6.1
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70247119507140
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: webmock
|
38
|
-
requirement: &
|
38
|
+
requirement: &70247119506680 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.7.6
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70247119506680
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard-minitest
|
49
|
-
requirement: &
|
49
|
+
requirement: &70247119506220 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.4.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70247119506220
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rb-fsevent
|
60
|
-
requirement: &
|
60
|
+
requirement: &70247119505760 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.4.3.1
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70247119505760
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: growl_notify
|
71
|
-
requirement: &
|
71
|
+
requirement: &70247119505300 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: 0.0.1
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70247119505300
|
80
80
|
description: ! 'An API client library for Recurly: http://recurly.com'
|
81
81
|
email: support@recurly.com
|
82
82
|
executables:
|