recurly 2.16.1 → 2.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/recurly/address.rb +4 -0
- data/lib/recurly/api.rb +1 -1
- data/lib/recurly/invoice.rb +17 -1
- data/lib/recurly/subscription.rb +13 -1
- data/lib/recurly/version.rb +1 -1
- data/lib/recurly/webhook.rb +1 -0
- data/lib/recurly/webhook/transaction_authorized_notification.rb +6 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c88aeded1f841b46fca644e8b89977c68111e609a13ed580bde4a692acf0fd25
|
4
|
+
data.tar.gz: cffcae2d4baa388b880206f705a81cb2a62dfc83948dc1b2bdecf1aea0e2fbe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 676ce8e9f2a8e731931ed89dd4a1b293a10a19b5419e18ba60388b2548a6b1c2425faa2081e5ca91c1aa1e6f61b43ccc6d13167841c9ba1f6f6ae402678ea06d
|
7
|
+
data.tar.gz: c0104c602b86fbbb68efda6e9b35271a051d9c3a6bdff25b01d367b065d3a4df6562bd96c3275421b5e2ff20f1a722b4ad18752f95577ec3c61e03ad98fdd3aa
|
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.16.
|
17
|
+
gem 'recurly', '~> 2.16.2'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/address.rb
CHANGED
data/lib/recurly/api.rb
CHANGED
data/lib/recurly/invoice.rb
CHANGED
@@ -86,6 +86,7 @@ module Recurly
|
|
86
86
|
line_items
|
87
87
|
transactions
|
88
88
|
terms_and_conditions
|
89
|
+
vat_reverse_charge_notes # Only shows if reverse charge invoice
|
89
90
|
customer_notes
|
90
91
|
address
|
91
92
|
net_terms
|
@@ -201,6 +202,22 @@ module Recurly
|
|
201
202
|
super - ['currency']
|
202
203
|
end
|
203
204
|
|
205
|
+
# Attempts to update the invoice, returning the success of the request.
|
206
|
+
# Raises an error if attempting to create an invoice using this method.
|
207
|
+
#
|
208
|
+
# @return [true, false]
|
209
|
+
# @raise [RuntimeError] Raises error if you attempt to create an invoice.
|
210
|
+
# @example
|
211
|
+
# invoice = Recurly::Invoice.find('1000')
|
212
|
+
# invoice.po_number = '1234'
|
213
|
+
# invoice.save # => true
|
214
|
+
def save
|
215
|
+
unless persisted?
|
216
|
+
raise "Invoices can only be updated with Invoice#save. New invoices cannot be created using this method."
|
217
|
+
end
|
218
|
+
super
|
219
|
+
end
|
220
|
+
|
204
221
|
private
|
205
222
|
|
206
223
|
def initialize(attributes = {})
|
@@ -230,7 +247,6 @@ module Recurly
|
|
230
247
|
|
231
248
|
# Invoices are only writeable through {Account} instances.
|
232
249
|
embedded! true
|
233
|
-
undef save
|
234
250
|
undef destroy
|
235
251
|
end
|
236
252
|
end
|
data/lib/recurly/subscription.rb
CHANGED
@@ -230,7 +230,19 @@ module Recurly
|
|
230
230
|
true
|
231
231
|
end
|
232
232
|
|
233
|
-
# Update the notes sections of the subscription
|
233
|
+
# Update the notes sections of the subscription. This endpoint also allows you to
|
234
|
+
# update the custom fields.
|
235
|
+
#
|
236
|
+
# @example
|
237
|
+
# subscription.custom_fields.first.value = nil
|
238
|
+
# subscription.update_notes(terms_and_conditions: 'New T&C')
|
239
|
+
# #=>
|
240
|
+
# # <subscription>
|
241
|
+
# # <custom_fields><custom_field><name>food</name><value nil="nil"/><custom_field></custom_fields>
|
242
|
+
# # <terms_and_conditions>New T&C</terms_and_conditions>
|
243
|
+
# # </subscription>
|
244
|
+
# # it's also okay to call without notes
|
245
|
+
# subscription.update_notes({})
|
234
246
|
#
|
235
247
|
# @param notes [Hash] should be the notes parameters you wish to update
|
236
248
|
# @return [true, false] +true+ when successful, +false+ when unable to
|
data/lib/recurly/version.rb
CHANGED
data/lib/recurly/webhook.rb
CHANGED
@@ -66,6 +66,7 @@ module Recurly
|
|
66
66
|
autoload :RedeemedGiftCardNotification, 'recurly/webhook/redeemed_gift_card_notification'
|
67
67
|
autoload :UpdatedBalanceGiftCardNotification, 'recurly/webhook/updated_balance_gift_card_notification'
|
68
68
|
autoload :NewUsageNotification, 'recurly/webhook/new_usage_notification'
|
69
|
+
autoload :TransactionAuthorizedNotification, 'recurly/webhook/transaction_authorized_notification'
|
69
70
|
# This exception is raised if the Webhook Notification initialization fails
|
70
71
|
class NotificationError < Error
|
71
72
|
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.16.
|
4
|
+
version: 2.16.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-08-
|
11
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -238,6 +238,7 @@ files:
|
|
238
238
|
- lib/recurly/webhook/subscription_notification.rb
|
239
239
|
- lib/recurly/webhook/successful_payment_notification.rb
|
240
240
|
- lib/recurly/webhook/successful_refund_notification.rb
|
241
|
+
- lib/recurly/webhook/transaction_authorized_notification.rb
|
241
242
|
- lib/recurly/webhook/transaction_notification.rb
|
242
243
|
- lib/recurly/webhook/updated_account_notification.rb
|
243
244
|
- lib/recurly/webhook/updated_balance_gift_card_notification.rb
|
@@ -270,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
271
|
version: '0'
|
271
272
|
requirements: []
|
272
273
|
rubyforge_project:
|
273
|
-
rubygems_version: 2.7.
|
274
|
+
rubygems_version: 2.7.7
|
274
275
|
signing_key:
|
275
276
|
specification_version: 4
|
276
277
|
summary: Recurly API Client
|