recurly 2.18.0 → 2.18.1
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 +4 -4
- data/lib/recurly/gift_card.rb +3 -0
- data/lib/recurly/invoice.rb +13 -6
- data/lib/recurly/subscription.rb +3 -0
- data/lib/recurly/version.rb +1 -1
- data/lib/recurly/webhook.rb +1 -0
- data/lib/recurly/webhook/account_notification.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54d02262c0576c5815a42475a47f3c5fc538604d
|
4
|
+
data.tar.gz: a329e6dab7f4fc71e6a2a987f111b4c704fc65ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23a3975f33addab379a20893a61fb5c66ce1768b75e1fda8e23b93a681c651dfbd0ba4f514b0d120ce6fd548c79d7ec05db0fa2f3a4fac5a2ae47f0d5f1f84fc
|
7
|
+
data.tar.gz: a3d7dc1eb216a1a2319cc953189069d52da6118f851300a3e43c09d67688e549c1aff3f91e0d2db8c009c2845aa727bbc2e361b58c2d284ee8923f7ddd0773d5
|
data/lib/recurly/gift_card.rb
CHANGED
@@ -18,6 +18,9 @@ module Recurly
|
|
18
18
|
# @return [Invoice, nil] The charge invoice for the gift card redemption.
|
19
19
|
has_one :purchase_invoice, class_name: :Invoice, readonly: true
|
20
20
|
|
21
|
+
# @return [BillingInfo, nil]
|
22
|
+
has_one :billing_info, class_name: :BillingInfo, readonly: false
|
23
|
+
|
21
24
|
define_attribute_methods %w(
|
22
25
|
balance_in_cents
|
23
26
|
currency
|
data/lib/recurly/invoice.rb
CHANGED
@@ -153,8 +153,8 @@ module Recurly
|
|
153
153
|
def force_collect(options = {})
|
154
154
|
return false unless link? :force_collect
|
155
155
|
http_opts = {}
|
156
|
-
if options
|
157
|
-
http_opts[:body] =
|
156
|
+
if body = force_collect_xml(options)
|
157
|
+
http_opts[:body] = body
|
158
158
|
end
|
159
159
|
reload follow_link(:force_collect, http_opts)
|
160
160
|
true
|
@@ -276,14 +276,21 @@ module Recurly
|
|
276
276
|
builder.to_s
|
277
277
|
end
|
278
278
|
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
279
|
+
# Returns an xml body or nil given some options
|
280
|
+
def force_collect_xml(options = {})
|
281
|
+
if options[:transaction_type] || options[:billing_info]
|
282
|
+
ForceCollect.new(options).to_xml
|
283
|
+
end
|
283
284
|
end
|
284
285
|
|
285
286
|
# Invoices are only writeable through {Account} instances.
|
286
287
|
embedded! true
|
287
288
|
undef destroy
|
289
|
+
|
290
|
+
# Represents a body for the force collect endpoint
|
291
|
+
class ForceCollect < Resource
|
292
|
+
has_one :billing_info, class_name: :BillingInfo, readonly: false
|
293
|
+
define_attribute_methods %w[transaction_type]
|
294
|
+
end
|
288
295
|
end
|
289
296
|
end
|
data/lib/recurly/subscription.rb
CHANGED
@@ -41,6 +41,9 @@ module Recurly
|
|
41
41
|
# @return [InvoiceCollection, nil]
|
42
42
|
has_one :invoice_collection, class_name: :InvoiceCollection, readonly: true
|
43
43
|
|
44
|
+
# @return [BillingInfo, nil]
|
45
|
+
has_one :billing_info, class_name: :BillingInfo, readonly: false
|
46
|
+
|
44
47
|
define_attribute_methods %w(
|
45
48
|
uuid
|
46
49
|
state
|
data/lib/recurly/version.rb
CHANGED
data/lib/recurly/webhook.rb
CHANGED
@@ -70,6 +70,7 @@ module Recurly
|
|
70
70
|
autoload :LowBalanceGiftCardNotification, 'recurly/webhook/low_balance_gift_card_notification'
|
71
71
|
autoload :TransactionStatusUpdatedNotification, 'recurly/webhook/transaction_status_updated_notification'
|
72
72
|
autoload :UpdatedInvoiceNotification, 'recurly/webhook/updated_invoice_notification'
|
73
|
+
autoload :NewShippingAddressNotification, 'recurly/webhook/new_shipping_address_notification'
|
73
74
|
# This exception is raised if the Webhook Notification initialization fails
|
74
75
|
class NotificationError < Error
|
75
76
|
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.18.
|
4
|
+
version: 2.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|