recurly 2.10.0 → 2.10.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/adjustment.rb +1 -1
- data/lib/recurly/api.rb +1 -1
- data/lib/recurly/gift_card.rb +2 -1
- data/lib/recurly/helper.rb +1 -1
- data/lib/recurly/invoice.rb +1 -1
- data/lib/recurly/plan.rb +0 -11
- data/lib/recurly/purchase.rb +9 -2
- data/lib/recurly/subscription.rb +2 -2
- data/lib/recurly/transaction.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- data/lib/recurly/webhook/updated_account_notification.rb +6 -0
- data/lib/recurly/webhook.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe4613ae5c45634fb98b0006c9900be7cdb62eb4
|
4
|
+
data.tar.gz: 28e4c99d3263a3f78442deccd876a32d72f67444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a709d5d28c3f17a7815132a835d364810dfbce9ebd07972839bb0f473d473a44d2dea84e645b0cd17658b247183a8c63cea1b9bbec601279e7aaaf24f6eef4ad
|
7
|
+
data.tar.gz: 7442860e57b511ffd702cfbda16755f3660395851070c700a62bc51307047d9445cf75f24133ad25e804e42b92137017c43a1f5d1333c249cddcbfb450f9cf04
|
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.10.
|
17
|
+
gem 'recurly', '~> 2.10.1'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/adjustment.rb
CHANGED
data/lib/recurly/api.rb
CHANGED
data/lib/recurly/gift_card.rb
CHANGED
@@ -3,7 +3,8 @@ module Recurly
|
|
3
3
|
belongs_to :invoice
|
4
4
|
belongs_to :gifter_account, class_name: :Account, readonly: false
|
5
5
|
belongs_to :recipient_account, class_name: :Account, readonly: false
|
6
|
-
has_one :delivery, readonly: false
|
6
|
+
has_one :delivery, readonly: false, class_name: :Delivery
|
7
|
+
has_one :address, readonly: false, class_name: :Address
|
7
8
|
|
8
9
|
define_attribute_methods %w(
|
9
10
|
balance_in_cents
|
data/lib/recurly/helper.rb
CHANGED
@@ -18,7 +18,7 @@ module Recurly
|
|
18
18
|
|
19
19
|
def singularize word
|
20
20
|
word = word.to_s
|
21
|
-
return
|
21
|
+
return word if word.end_with?('address')
|
22
22
|
return "shipping_address" if word == "shipping_addresses"
|
23
23
|
word.sub(/s$/, '').sub(/ie$/, 'y')
|
24
24
|
end
|
data/lib/recurly/invoice.rb
CHANGED
data/lib/recurly/plan.rb
CHANGED
@@ -34,16 +34,5 @@ module Recurly
|
|
34
34
|
updated_at
|
35
35
|
)
|
36
36
|
alias to_param plan_code
|
37
|
-
|
38
|
-
#TODO this can be removed after the server update
|
39
|
-
def trial_requires_billing_info
|
40
|
-
val = read_attribute(:trial_requires_billing_info)
|
41
|
-
case val
|
42
|
-
when String
|
43
|
-
val == 'true'
|
44
|
-
else
|
45
|
-
val
|
46
|
-
end
|
47
|
-
end
|
48
37
|
end
|
49
38
|
end
|
data/lib/recurly/purchase.rb
CHANGED
@@ -57,7 +57,7 @@ module Recurly
|
|
57
57
|
# })
|
58
58
|
#
|
59
59
|
# begin
|
60
|
-
# preview_invoice = Recurly::Purchase.
|
60
|
+
# preview_invoice = Recurly::Purchase.preview!(purchase)
|
61
61
|
# puts preview_invoice.inspect
|
62
62
|
# rescue Recurly::Resource::Invalid => e
|
63
63
|
# # Invalid data
|
@@ -82,13 +82,20 @@ module Recurly
|
|
82
82
|
has_many :adjustments, class_name: :Adjustment, readonly: false
|
83
83
|
|
84
84
|
# @return [Account, nil]
|
85
|
-
has_one :account, readonly: false
|
85
|
+
has_one :account, class_name: :Account, readonly: false
|
86
|
+
|
87
|
+
# @return [GiftCard, nil]
|
88
|
+
has_one :gift_card, class_name: :GiftCard, readonly: false
|
89
|
+
|
90
|
+
# @return [[Subscription], nil]
|
91
|
+
has_many :subscriptions, class_name: :Subscription, readonly: false
|
86
92
|
|
87
93
|
define_attribute_methods %w(
|
88
94
|
currency
|
89
95
|
collection_method
|
90
96
|
po_number
|
91
97
|
net_terms
|
98
|
+
coupon_codes
|
92
99
|
)
|
93
100
|
|
94
101
|
class << self
|
data/lib/recurly/subscription.rb
CHANGED
@@ -90,8 +90,8 @@ module Recurly
|
|
90
90
|
end
|
91
91
|
|
92
92
|
# @return [Subscription] A new subscription.
|
93
|
-
def initialize
|
94
|
-
super(
|
93
|
+
def initialize(attributes = {})
|
94
|
+
super(attributes)
|
95
95
|
end
|
96
96
|
|
97
97
|
# Assign a Plan resource (rather than a plan code).
|
data/lib/recurly/transaction.rb
CHANGED
data/lib/recurly/version.rb
CHANGED
data/lib/recurly/webhook.rb
CHANGED
@@ -33,6 +33,7 @@ module Recurly
|
|
33
33
|
autoload :ExpiredSubscriptionNotification, 'recurly/webhook/expired_subscription_notification'
|
34
34
|
autoload :FailedPaymentNotification, 'recurly/webhook/failed_payment_notification'
|
35
35
|
autoload :NewAccountNotification, 'recurly/webhook/new_account_notification'
|
36
|
+
autoload :UpdatedAccountNotification, 'recurly/webhook/updated_account_notification'
|
36
37
|
autoload :NewInvoiceNotification, 'recurly/webhook/new_invoice_notification'
|
37
38
|
autoload :NewSubscriptionNotification, 'recurly/webhook/new_subscription_notification'
|
38
39
|
autoload :PastDueInvoiceNotification, 'recurly/webhook/past_due_invoice_notification'
|
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.10.
|
4
|
+
version: 2.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -212,6 +212,7 @@ files:
|
|
212
212
|
- lib/recurly/webhook/successful_payment_notification.rb
|
213
213
|
- lib/recurly/webhook/successful_refund_notification.rb
|
214
214
|
- lib/recurly/webhook/transaction_notification.rb
|
215
|
+
- lib/recurly/webhook/updated_account_notification.rb
|
215
216
|
- lib/recurly/webhook/updated_subscription_notification.rb
|
216
217
|
- lib/recurly/webhook/void_payment_notification.rb
|
217
218
|
- lib/recurly/xml.rb
|