recurly 2.15.3 → 2.15.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/lib/recurly/api.rb +1 -1
- data/lib/recurly/gift_card.rb +6 -0
- data/lib/recurly/purchase.rb +10 -0
- data/lib/recurly/version.rb +1 -1
- data/lib/recurly/webhook.rb +46 -32
- data/lib/recurly/webhook/closed_credit_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/credit_payment_notification.rb +12 -0
- data/lib/recurly/webhook/failed_charge_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/new_charge_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/new_credit_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/new_credit_payment_notification.rb +6 -0
- data/lib/recurly/webhook/paid_charge_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/past_due_charge_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/processing_charge_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/processing_credit_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/reopened_charge_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/reopened_credit_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/voided_credit_invoice_notification.rb +6 -0
- data/lib/recurly/webhook/voided_credit_payment_notification.rb +6 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 606d1c9d57755bcce599e207966798eac016a633bd332da79403a4d0829b1fa5
|
4
|
+
data.tar.gz: 1217a5a9ec5b891ed2dfd3fc034653d1d745392da17e1b7204e2f0a179900ac9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ba12353016250cd6b368fc05c1c33cf329e8e4e81d46ea4b88aed6d9009fd96ec2c59486775011bad516cd84ef1fafae99255fb73af28cbd089936edb0b6d99
|
7
|
+
data.tar.gz: a4440689f97dce2be180062f5ddcc6c5fb09a7124246b467583186549866c6446d5815892e91e9e183180fe07eaec98da1470bfbab2006a134935aedef496fc7
|
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.4'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
@@ -94,17 +94,20 @@ Any configuration items you do not include in the above config call will be defa
|
|
94
94
|
configuration items. For example if you do not define default_currency then Recurly.default_currency
|
95
95
|
will be used.
|
96
96
|
|
97
|
-
## Supported Versions
|
97
|
+
## Supported Ruby Versions
|
98
98
|
|
99
|
-
We are currently supporting versions `2.
|
99
|
+
We are currently supporting ruby language versions `2.2` and above. `1.9`, `2.0`, and `2.1` may still work but are not officially supported.
|
100
100
|
|
101
101
|
If you are still using one of these rubies, you should know that support for them ended in
|
102
|
-
2015 (1.9)
|
102
|
+
2015 (1.9), 2016 (2.0), and 2017 (2.1) and continuing to use them is a security risk.
|
103
103
|
|
104
104
|
- https://www.ruby-lang.org/en/news/2015/02/23/support-for-ruby-1-9-3-has-ended/
|
105
105
|
- https://www.ruby-lang.org/en/news/2016/02/24/support-plan-of-ruby-2-0-0-and-2-1/
|
106
|
+
- https://www.ruby-lang.org/en/news/2017/04/01/support-of-ruby-2-1-has-ended/
|
106
107
|
|
107
|
-
|
108
|
+
## Nokogiri Support
|
109
|
+
|
110
|
+
For now, we are still running the tests on 2.0 and below but without `nokogiri` and only `rexml`. Nokogiri is
|
108
111
|
no longer supported on 1.9 or 2.0 and has patched known vulnerabilities since dropping support.
|
109
112
|
If you must run one of these rubies (this includes jruby1.7), you must use rexml and not nokogiri.
|
110
113
|
|
data/lib/recurly/api.rb
CHANGED
data/lib/recurly/gift_card.rb
CHANGED
@@ -12,6 +12,12 @@ module Recurly
|
|
12
12
|
# @return [Delivery, nil] Delivery information of the recipient.
|
13
13
|
has_one :delivery, class_name: :Delivery, readonly: false
|
14
14
|
|
15
|
+
# @return [Invoice, nil] The credit invoice for the gift card redemption.
|
16
|
+
has_one :redemption_invoice, class_name: :Invoice, readonly: true
|
17
|
+
|
18
|
+
# @return [Invoice, nil] The charge invoice for the gift card redemption.
|
19
|
+
has_one :purchase_invoice, class_name: :Invoice, readonly: true
|
20
|
+
|
15
21
|
define_attribute_methods %w(
|
16
22
|
balance_in_cents
|
17
23
|
currency
|
data/lib/recurly/purchase.rb
CHANGED
@@ -160,6 +160,16 @@ module Recurly
|
|
160
160
|
post(purchase, "#{collection_path}/authorize")
|
161
161
|
end
|
162
162
|
|
163
|
+
# Use for Adyen HPP transaction requests. Runs validations
|
164
|
+
# but does not run any transactions.
|
165
|
+
#
|
166
|
+
# @param purchase [Purchase] The purchase data for the request.
|
167
|
+
# @return [InvoiceCollection] The authorized invoice collection representing this purchase.
|
168
|
+
# @raise [Invalid] Raised if the purchase cannot be invoiced.
|
169
|
+
def pending!(purchase)
|
170
|
+
post(purchase, "#{collection_path}/pending")
|
171
|
+
end
|
172
|
+
|
163
173
|
def post(purchase, path)
|
164
174
|
response = API.send(:post, path, purchase.to_xml)
|
165
175
|
InvoiceCollection.from_response(response)
|
data/lib/recurly/version.rb
CHANGED
data/lib/recurly/webhook.rb
CHANGED
@@ -20,38 +20,52 @@ module Recurly
|
|
20
20
|
# ...
|
21
21
|
# end
|
22
22
|
module Webhook
|
23
|
-
autoload :Notification,
|
24
|
-
autoload :AccountNotification,
|
25
|
-
autoload :SubscriptionNotification,
|
26
|
-
autoload :InvoiceNotification,
|
27
|
-
autoload :TransactionNotification,
|
28
|
-
autoload :DunningNotification,
|
29
|
-
autoload :
|
30
|
-
autoload :
|
31
|
-
autoload :
|
32
|
-
autoload :
|
33
|
-
autoload :
|
34
|
-
autoload :
|
35
|
-
autoload :
|
36
|
-
autoload :
|
37
|
-
autoload :
|
38
|
-
autoload :
|
39
|
-
autoload :
|
40
|
-
autoload :
|
41
|
-
autoload :
|
42
|
-
autoload :
|
43
|
-
autoload :
|
44
|
-
autoload :
|
45
|
-
autoload :
|
46
|
-
autoload :
|
47
|
-
autoload :
|
48
|
-
autoload :
|
49
|
-
autoload :
|
50
|
-
autoload :
|
51
|
-
autoload :
|
52
|
-
autoload :
|
53
|
-
autoload :
|
54
|
-
autoload :
|
23
|
+
autoload :Notification, 'recurly/webhook/notification'
|
24
|
+
autoload :AccountNotification, 'recurly/webhook/account_notification'
|
25
|
+
autoload :SubscriptionNotification, 'recurly/webhook/subscription_notification'
|
26
|
+
autoload :InvoiceNotification, 'recurly/webhook/invoice_notification'
|
27
|
+
autoload :TransactionNotification, 'recurly/webhook/transaction_notification'
|
28
|
+
autoload :DunningNotification, 'recurly/webhook/dunning_notification'
|
29
|
+
autoload :CreditPaymentNotification, 'recurly/webhook/credit_payment_notification'
|
30
|
+
autoload :BillingInfoUpdatedNotification, 'recurly/webhook/billing_info_updated_notification'
|
31
|
+
autoload :CanceledSubscriptionNotification, 'recurly/webhook/canceled_subscription_notification'
|
32
|
+
autoload :CanceledAccountNotification, 'recurly/webhook/canceled_account_notification'
|
33
|
+
autoload :ClosedInvoiceNotification, 'recurly/webhook/closed_invoice_notification'
|
34
|
+
autoload :ClosedCreditInvoiceNotification, 'recurly/webhook/closed_credit_invoice_notification'
|
35
|
+
autoload :NewCreditInvoiceNotification, 'recurly/webhook/new_credit_invoice_notification'
|
36
|
+
autoload :ProcessingCreditInvoiceNotification, 'recurly/webhook/processing_credit_invoice_notification'
|
37
|
+
autoload :ReopenedCreditInvoiceNotification, 'recurly/webhook/reopened_credit_invoice_notification'
|
38
|
+
autoload :VoidedCreditInvoiceNotification, 'recurly/webhook/voided_credit_invoice_notification'
|
39
|
+
autoload :NewCreditPaymentNotification, 'recurly/webhook/new_credit_payment_notification'
|
40
|
+
autoload :VoidedCreditPaymentNotification, 'recurly/webhook/voided_credit_payment_notification'
|
41
|
+
autoload :ExpiredSubscriptionNotification, 'recurly/webhook/expired_subscription_notification'
|
42
|
+
autoload :FailedPaymentNotification, 'recurly/webhook/failed_payment_notification'
|
43
|
+
autoload :NewAccountNotification, 'recurly/webhook/new_account_notification'
|
44
|
+
autoload :UpdatedAccountNotification, 'recurly/webhook/updated_account_notification'
|
45
|
+
autoload :NewInvoiceNotification, 'recurly/webhook/new_invoice_notification'
|
46
|
+
autoload :NewChargeInvoiceNotification, 'recurly/webhook/new_charge_invoice_notification'
|
47
|
+
autoload :ProcessingChargeInvoiceNotification, 'recurly/webhook/processing_charge_invoice_notification'
|
48
|
+
autoload :PastDueChargeInvoiceNotification, 'recurly/webhook/past_due_charge_invoice_notification'
|
49
|
+
autoload :PaidChargeInvoiceNotification, 'recurly/webhook/paid_charge_invoice_notification'
|
50
|
+
autoload :FailedChargeInvoiceNotification, 'recurly/webhook/failed_charge_invoice_notification'
|
51
|
+
autoload :ReopenedChargeInvoiceNotification, 'recurly/webhook/reopened_charge_invoice_notification'
|
52
|
+
autoload :NewSubscriptionNotification, 'recurly/webhook/new_subscription_notification'
|
53
|
+
autoload :PastDueInvoiceNotification, 'recurly/webhook/past_due_invoice_notification'
|
54
|
+
autoload :ReactivatedAccountNotification, 'recurly/webhook/reactivated_account_notification'
|
55
|
+
autoload :RenewedSubscriptionNotification, 'recurly/webhook/renewed_subscription_notification'
|
56
|
+
autoload :SuccessfulPaymentNotification, 'recurly/webhook/successful_payment_notification'
|
57
|
+
autoload :SuccessfulRefundNotification, 'recurly/webhook/successful_refund_notification'
|
58
|
+
autoload :UpdatedSubscriptionNotification, 'recurly/webhook/updated_subscription_notification'
|
59
|
+
autoload :VoidPaymentNotification, 'recurly/webhook/void_payment_notification'
|
60
|
+
autoload :ProcessingPaymentNotification, 'recurly/webhook/processing_payment_notification'
|
61
|
+
autoload :ProcessingInvoiceNotification, 'recurly/webhook/processing_invoice_notification'
|
62
|
+
autoload :ScheduledPaymentNotification, 'recurly/webhook/scheduled_payment_notification'
|
63
|
+
autoload :NewDunningEventNotification, 'recurly/webhook/new_dunning_event_notification'
|
64
|
+
autoload :GiftCardNotification, 'recurly/webhook/gift_card_notification'
|
65
|
+
autoload :PurchasedGiftCardNotification, 'recurly/webhook/purchased_gift_card_notification'
|
66
|
+
autoload :RedeemedGiftCardNotification, 'recurly/webhook/redeemed_gift_card_notification'
|
67
|
+
autoload :UpdatedBalanceGiftCardNotification, 'recurly/webhook/updated_balance_gift_card_notification'
|
68
|
+
autoload :NewUsageNotification, 'recurly/webhook/new_usage_notification'
|
55
69
|
# This exception is raised if the Webhook Notification initialization fails
|
56
70
|
class NotificationError < Error
|
57
71
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Recurly
|
2
|
+
module Webhook
|
3
|
+
# The CreditPayment class provides a generic interface
|
4
|
+
# for credit-payment-related webhook notifications.
|
5
|
+
class CreditPaymentNotification < Notification
|
6
|
+
# @return [Account]
|
7
|
+
has_one :account
|
8
|
+
# @return [CreditPayment]
|
9
|
+
has_one :credit_payment
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -206,25 +206,37 @@ files:
|
|
206
206
|
- lib/recurly/webhook/billing_info_updated_notification.rb
|
207
207
|
- lib/recurly/webhook/canceled_account_notification.rb
|
208
208
|
- lib/recurly/webhook/canceled_subscription_notification.rb
|
209
|
+
- lib/recurly/webhook/closed_credit_invoice_notification.rb
|
209
210
|
- lib/recurly/webhook/closed_invoice_notification.rb
|
211
|
+
- lib/recurly/webhook/credit_payment_notification.rb
|
210
212
|
- lib/recurly/webhook/dunning_notification.rb
|
211
213
|
- lib/recurly/webhook/expired_subscription_notification.rb
|
214
|
+
- lib/recurly/webhook/failed_charge_invoice_notification.rb
|
212
215
|
- lib/recurly/webhook/failed_payment_notification.rb
|
213
216
|
- lib/recurly/webhook/gift_card_notification.rb
|
214
217
|
- lib/recurly/webhook/invoice_notification.rb
|
215
218
|
- lib/recurly/webhook/new_account_notification.rb
|
219
|
+
- lib/recurly/webhook/new_charge_invoice_notification.rb
|
220
|
+
- lib/recurly/webhook/new_credit_invoice_notification.rb
|
221
|
+
- lib/recurly/webhook/new_credit_payment_notification.rb
|
216
222
|
- lib/recurly/webhook/new_dunning_event_notification.rb
|
217
223
|
- lib/recurly/webhook/new_invoice_notification.rb
|
218
224
|
- lib/recurly/webhook/new_subscription_notification.rb
|
219
225
|
- lib/recurly/webhook/new_usage_notification.rb
|
220
226
|
- lib/recurly/webhook/notification.rb
|
227
|
+
- lib/recurly/webhook/paid_charge_invoice_notification.rb
|
228
|
+
- lib/recurly/webhook/past_due_charge_invoice_notification.rb
|
221
229
|
- lib/recurly/webhook/past_due_invoice_notification.rb
|
230
|
+
- lib/recurly/webhook/processing_charge_invoice_notification.rb
|
231
|
+
- lib/recurly/webhook/processing_credit_invoice_notification.rb
|
222
232
|
- lib/recurly/webhook/processing_invoice_notification.rb
|
223
233
|
- lib/recurly/webhook/processing_payment_notification.rb
|
224
234
|
- lib/recurly/webhook/purchased_gift_card_notification.rb
|
225
235
|
- lib/recurly/webhook/reactivated_account_notification.rb
|
226
236
|
- lib/recurly/webhook/redeemed_gift_card_notification.rb
|
227
237
|
- lib/recurly/webhook/renewed_subscription_notification.rb
|
238
|
+
- lib/recurly/webhook/reopened_charge_invoice_notification.rb
|
239
|
+
- lib/recurly/webhook/reopened_credit_invoice_notification.rb
|
228
240
|
- lib/recurly/webhook/scheduled_payment_notification.rb
|
229
241
|
- lib/recurly/webhook/subscription_notification.rb
|
230
242
|
- lib/recurly/webhook/successful_payment_notification.rb
|
@@ -234,6 +246,8 @@ files:
|
|
234
246
|
- lib/recurly/webhook/updated_balance_gift_card_notification.rb
|
235
247
|
- lib/recurly/webhook/updated_subscription_notification.rb
|
236
248
|
- lib/recurly/webhook/void_payment_notification.rb
|
249
|
+
- lib/recurly/webhook/voided_credit_invoice_notification.rb
|
250
|
+
- lib/recurly/webhook/voided_credit_payment_notification.rb
|
237
251
|
- lib/recurly/xml.rb
|
238
252
|
- lib/recurly/xml/nokogiri.rb
|
239
253
|
- lib/recurly/xml/rexml.rb
|