recurly 2.15.1 → 2.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/recurly/coupon.rb +2 -1
- data/lib/recurly/invoice.rb +3 -0
- data/lib/recurly/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 435421667969ab85e80f5d636ff056462380a42feed0f6db5d7ded82965c7e28
|
4
|
+
data.tar.gz: 8f070aec99e9dbba6e5ece4eaa42c94d885d048f71e05d42df807dd97c494978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2963d34f5732bdd3331139485577ebb09fd7637e517637502e71419ae47f430fb9f1f8d9ab622e86b47711632f33a7163f23c126271111fcee895286e8f268f0
|
7
|
+
data.tar.gz: 79197deb0459cc55518a0f0995d047311c376471ebd82f3a04a42f0e888e912cff9c489bd1448f4ae5a82e8bebcfc7a58de32b2c33872571d25a03545755b94c
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
|
|
14
14
|
[Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
|
15
15
|
|
16
16
|
``` ruby
|
17
|
-
gem 'recurly', '~> 2.15.
|
17
|
+
gem 'recurly', '~> 2.15.2'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/coupon.rb
CHANGED
@@ -110,10 +110,11 @@ module Recurly
|
|
110
110
|
#
|
111
111
|
# @param account_code [String] Acccount's account code
|
112
112
|
# @param currency [String] Three-letter currency code
|
113
|
+
# @raise [Invalid] If the coupon cannot be redeemed
|
113
114
|
# @return [Redemption] The Coupon Redemption
|
114
115
|
def redeem!(account_code, currency = nil)
|
115
116
|
redemption = redeem(account_code, currency)
|
116
|
-
raise Invalid.new(
|
117
|
+
raise Invalid.new(self) unless redemption && redemption.persisted?
|
117
118
|
redemption
|
118
119
|
end
|
119
120
|
|
data/lib/recurly/invoice.rb
CHANGED
@@ -44,6 +44,9 @@ module Recurly
|
|
44
44
|
# @return [Pager<Invoice>, []]
|
45
45
|
has_many :original_invoices, class_name: :Invoice, readonly: true
|
46
46
|
|
47
|
+
# @return [Invoice, nil]
|
48
|
+
has_one :original_invoice, class_name: :Invoice, readonly: true
|
49
|
+
|
47
50
|
# Returns the first redemption in the Invoice's redemptions.
|
48
51
|
# This was placed here for backwards compatibility when we went from
|
49
52
|
# having a single redemption per invoice to multiple redemptions per invoice.
|
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.15.
|
4
|
+
version: 2.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
261
|
rubyforge_project:
|
262
|
-
rubygems_version: 2.6
|
262
|
+
rubygems_version: 2.7.6
|
263
263
|
signing_key:
|
264
264
|
specification_version: 4
|
265
265
|
summary: Recurly API Client
|