recurly 2.15.1 → 2.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: '08185bb7912acbdca11fd008efc46dd66b287aed'
4
- data.tar.gz: 41cae4eb087ce6c6abe567f4be13bc6603d4b9a3
2
+ SHA256:
3
+ metadata.gz: 435421667969ab85e80f5d636ff056462380a42feed0f6db5d7ded82965c7e28
4
+ data.tar.gz: 8f070aec99e9dbba6e5ece4eaa42c94d885d048f71e05d42df807dd97c494978
5
5
  SHA512:
6
- metadata.gz: 248ce1ee1bab0b1e38971837e0e4519aad201af96f6f13e2d3aa1ede337c73076701855fc7ab8e1523110d4fb6106ea2ec03cc703f7d4c658c63173eb23f31d2
7
- data.tar.gz: 4818d9d58d4beea331f53923f2ac3f37583fa404a827d0ff33a409b79149a12849668628d68514e57b2c9aadabc184280068e044e04906cc8551b243d0cfb153
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.0'
17
+ gem 'recurly', '~> 2.15.2'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -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(redemption) unless redemption.persisted?
117
+ raise Invalid.new(self) unless redemption && redemption.persisted?
117
118
  redemption
118
119
  end
119
120
 
@@ -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.
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 15
5
- PATCH = 1
5
+ PATCH = 2
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
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.1
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-02 00:00:00.000000000 Z
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.13
262
+ rubygems_version: 2.7.6
263
263
  signing_key:
264
264
  specification_version: 4
265
265
  summary: Recurly API Client