recurly 2.18.1 → 2.18.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 54d02262c0576c5815a42475a47f3c5fc538604d
4
- data.tar.gz: a329e6dab7f4fc71e6a2a987f111b4c704fc65ac
2
+ SHA256:
3
+ metadata.gz: 0ecbf1f0769f7a67b1c5f7f8b5ee0d25fdbea9c93a904b3dd8db5c8de4b2b71a
4
+ data.tar.gz: 556898b14903f191423e71d67045cc36a957f85446e13d2cf82122d9b3c52806
5
5
  SHA512:
6
- metadata.gz: 23a3975f33addab379a20893a61fb5c66ce1768b75e1fda8e23b93a681c651dfbd0ba4f514b0d120ce6fd548c79d7ec05db0fa2f3a4fac5a2ae47f0d5f1f84fc
7
- data.tar.gz: a3d7dc1eb216a1a2319cc953189069d52da6118f851300a3e43c09d67688e549c1aff3f91e0d2db8c009c2845aa727bbc2e361b58c2d284ee8923f7ddd0773d5
6
+ metadata.gz: 92c6947d405a13ab65c52380fe7cbc57c10ee0f7118dab82d024488ce3878df8ff822522e8826471b7747d5064ca184c6b4ce91e1b835da762b2216c7981dcd9
7
+ data.tar.gz: 1e221b69ff31a5a07157683572956095d49ea9a893388aeebd98b8d3caada461d24e9bb3f4cc94490d28cce7c80d5925c56d52361f7dcead00449166667170c2
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.18'
17
+ gem 'recurly', '~> 2.18.2'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -90,15 +90,9 @@ will be used.
90
90
 
91
91
  ## Supported Ruby Versions
92
92
 
93
- We are currently supporting ruby language versions `2.3` and above. `1.9`, `2.0`, `2.1`, and `2.2` may still work but are not officially supported.
94
-
95
- If you are still using one of these rubies, you should know that support for them ended in
96
- 2015 (1.9), 2016 (2.0), 2017 (2.1), 2018 (2.2) and continuing to use them is a security risk.
97
-
98
- - https://www.ruby-lang.org/en/news/2015/02/23/support-for-ruby-1-9-3-has-ended/
99
- - https://www.ruby-lang.org/en/news/2016/02/24/support-plan-of-ruby-2-0-0-and-2-1/
100
- - https://www.ruby-lang.org/en/news/2017/04/01/support-of-ruby-2-1-has-ended/
101
- - https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/
93
+ Recurly will support whichever versions the [Ruby maintainers are supporting](https://www.ruby-lang.org/en/downloads/branches/).
94
+ We support all versions with status `* maintenance`. We do not support `eol` versions or `preview` versions. This library
95
+ may work on EOL versions of ruby, but we may not be able to support you if you use one.
102
96
 
103
97
  ## Nokogiri Support
104
98
 
@@ -12,6 +12,14 @@ module Recurly
12
12
  campaign
13
13
  )
14
14
 
15
+ def self.member_name
16
+ "acquisition"
17
+ end
18
+
19
+ def self.xml_root_key
20
+ "account_acquisition"
21
+ end
22
+
15
23
  # Acquisitions are only writeable and readable through {Account} instances.
16
24
  embedded!
17
25
  private_class_method :find
@@ -13,6 +13,7 @@ module Recurly
13
13
  # Recurly::API.delete 'accounts/1' # => #<Net::HTTPNoContent ...>
14
14
  class API
15
15
  require 'recurly/api/errors'
16
+ require 'openssl'
16
17
 
17
18
  @@base_uri = "https://api.recurly.com/v2/"
18
19
  @@valid_domains = [".recurly.com"]
@@ -85,7 +86,15 @@ module Recurly
85
86
 
86
87
  # @return [String]
87
88
  def user_agent
88
- "Recurly/#{Version}; #{RUBY_DESCRIPTION}; #{OpenSSL::OPENSSL_LIBRARY_VERSION}"
89
+ agent_string = "Recurly/#{Version}; #{RUBY_DESCRIPTION};"
90
+
91
+ if OpenSSL.const_defined?(:OPENSSL_VERSION)
92
+ "#{agent_string} #{OpenSSL::OPENSSL_VERSION}"
93
+ elsif OpenSSL.const_defined?(:OPENSSL_LIBRARY_VERSION)
94
+ "#{agent_string} #{OpenSSL::OPENSSL_LIBRARY_VERSION}"
95
+ else
96
+ agent_string
97
+ end
89
98
  end
90
99
 
91
100
  private
@@ -198,6 +198,11 @@ module Recurly
198
198
  [collection_path, uuid].compact.join '/'
199
199
  end
200
200
 
201
+ # @return [String] The root key for this resource's xml document
202
+ def xml_root_key
203
+ self.member_name
204
+ end
205
+
201
206
  # @return [Array] Per attribute, defines readers, writers, boolean and
202
207
  # change-tracking methods.
203
208
  # @param attribute_names [Array] An array of attribute names.
@@ -557,7 +562,7 @@ module Recurly
557
562
  define_method "build_#{member_name}" do |*args|
558
563
  attributes = args.shift || {}
559
564
  self[member_name] = associated.send(
560
- :new, attributes.merge(:uri => "#{path}/#{member_name}")
565
+ :new, attributes.merge(:uri => "#{path}/#{associated.member_name}")
561
566
  ).tap { |child| child.attributes[self.class.member_name] = self }
562
567
  end
563
568
  define_method "create_#{member_name}" do |*args|
@@ -812,7 +817,7 @@ module Recurly
812
817
  # Recurly::Account.new(:account_code => 'code').to_xml
813
818
  # # => "<account><account_code>code</account_code></account>"
814
819
  def to_xml(options = {})
815
- builder = options[:builder] || XML.new("<#{self.class.member_name}/>")
820
+ builder = options[:builder] || XML.new("<#{self.class.xml_root_key}/>")
816
821
  xml_keys.each { |key|
817
822
  value = respond_to?(key) ? send(key) : self[key]
818
823
  node = builder.add_element key
@@ -1,11 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- MAJOR = 2
4
- MINOR = 18
5
- PATCH = 1
6
- PRE = nil
7
-
8
- VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
3
+ VERSION = "2.18.2"
9
4
 
10
5
  class << self
11
6
  def inspect
@@ -28,7 +28,14 @@ module Recurly
28
28
  autoload :DunningNotification, 'recurly/webhook/dunning_notification'
29
29
  autoload :CreditPaymentNotification, 'recurly/webhook/credit_payment_notification'
30
30
  autoload :BillingInfoUpdatedNotification, 'recurly/webhook/billing_info_updated_notification'
31
+ autoload :BillingInfoUpdateFailedNotification, 'recurly/webhook/billing_info_update_failed_notification'
32
+ autoload :SubscriptionPausedNotification, 'recurly/webhook/subscription_paused_notification'
33
+ autoload :SubscriptionPauseCanceledNotification,'recurly/webhook/subscription_pause_canceled_notification'
34
+ autoload :SubscriptionPauseModifiedNotification,'recurly/webhook/subscription_pause_modified_notification'
35
+ autoload :PausedSubscriptionRenewalNotification,'recurly/webhook/paused_subscription_renewal_notification'
36
+ autoload :SubscriptionResumedNotification, 'recurly/webhook/subscription_resumed_notification'
31
37
  autoload :CanceledSubscriptionNotification, 'recurly/webhook/canceled_subscription_notification'
38
+ autoload :ScheduledSubscriptionPauseNotification,'recurly/webhook/scheduled_subscription_pause_notification'
32
39
  autoload :CanceledAccountNotification, 'recurly/webhook/canceled_account_notification'
33
40
  autoload :ClosedInvoiceNotification, 'recurly/webhook/closed_invoice_notification'
34
41
  autoload :ClosedCreditInvoiceNotification, 'recurly/webhook/closed_credit_invoice_notification'
@@ -63,6 +70,9 @@ module Recurly
63
70
  autoload :NewDunningEventNotification, 'recurly/webhook/new_dunning_event_notification'
64
71
  autoload :GiftCardNotification, 'recurly/webhook/gift_card_notification'
65
72
  autoload :PurchasedGiftCardNotification, 'recurly/webhook/purchased_gift_card_notification'
73
+ autoload :UpdatedGiftCardNotification, 'recurly/webhook/updated_gift_card_notification'
74
+ autoload :RegeneratedGiftCardNotification, 'recurly/webhook/regenerated_gift_card_notification'
75
+ autoload :CanceledGiftCardNotification, 'recurly/webhook/canceled_gift_card_notification'
66
76
  autoload :RedeemedGiftCardNotification, 'recurly/webhook/redeemed_gift_card_notification'
67
77
  autoload :UpdatedBalanceGiftCardNotification, 'recurly/webhook/updated_balance_gift_card_notification'
68
78
  autoload :NewUsageNotification, 'recurly/webhook/new_usage_notification'
@@ -71,6 +81,9 @@ module Recurly
71
81
  autoload :TransactionStatusUpdatedNotification, 'recurly/webhook/transaction_status_updated_notification'
72
82
  autoload :UpdatedInvoiceNotification, 'recurly/webhook/updated_invoice_notification'
73
83
  autoload :NewShippingAddressNotification, 'recurly/webhook/new_shipping_address_notification'
84
+ autoload :UpdatedShippingAddressNotification, 'recurly/webhook/updated_shipping_address_notification'
85
+ autoload :DeletedShippingAddressNotification, 'recurly/webhook/deleted_shipping_address_notification'
86
+ autoload :FraudInfoUpdatedNotification, 'recurly/webhook/fraud_info_updated_notification'
74
87
  # This exception is raised if the Webhook Notification initialization fails
75
88
  class NotificationError < Error
76
89
  end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class BillingInfoUpdateFailedNotification < AccountNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class CanceledGiftCardNotification < GiftCardNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class DeletedShippingAddressNotification < AccountNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class FraudInfoUpdatedNotification < TransactionNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class NewShippingAddressNotification < AccountNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class PausedSubscriptionRenewalNotification < SubscriptionNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class RegeneratedGiftCardNotification < GiftCardNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class ScheduledSubscriptionPauseNotification < SubscriptionNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class SubscriptionPauseCanceledNotification < SubscriptionNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class SubscriptionPauseModifiedNotification < SubscriptionNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class SubscriptionPausedNotification < SubscriptionNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class SubscriptionResumedNotification < SubscriptionNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class UpdatedGiftCardNotification < GiftCardNotification
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Recurly
2
+ module Webhook
3
+ class UpdatedShippingAddressNotification < AccountNotification
4
+ end
5
+ end
6
+ 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.1
4
+ version: 2.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-13 00:00:00.000000000 Z
11
+ date: 2019-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -48,42 +48,42 @@ dependencies:
48
48
  name: minitest
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '5.8'
54
51
  - - ">="
55
52
  - !ruby/object:Gem::Version
56
53
  version: 5.8.0
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '5.8'
57
57
  type: :development
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '5.8'
64
61
  - - ">="
65
62
  - !ruby/object:Gem::Version
66
63
  version: 5.8.0
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '5.8'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: addressable
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '2.4'
74
71
  - - ">="
75
72
  - !ruby/object:Gem::Version
76
73
  version: 2.4.0
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '2.4'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '2.4'
84
81
  - - ">="
85
82
  - !ruby/object:Gem::Version
86
83
  version: 2.4.0
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: '2.4'
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: webmock
89
89
  requirement: !ruby/object:Gem::Requirement
@@ -136,22 +136,22 @@ dependencies:
136
136
  name: redcarpet
137
137
  requirement: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: '3.4'
142
139
  - - ">="
143
140
  - !ruby/object:Gem::Version
144
141
  version: 3.4.0
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '3.4'
145
145
  type: :development
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '3.4'
152
149
  - - ">="
153
150
  - !ruby/object:Gem::Version
154
151
  version: 3.4.0
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: '3.4'
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: racc
157
157
  requirement: !ruby/object:Gem::Requirement
@@ -170,22 +170,22 @@ dependencies:
170
170
  name: pry
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - "<"
174
- - !ruby/object:Gem::Version
175
- version: 0.11.0
176
173
  - - ">="
177
174
  - !ruby/object:Gem::Version
178
175
  version: 0.9.10
176
+ - - "<"
177
+ - !ruby/object:Gem::Version
178
+ version: 0.11.0
179
179
  type: :development
180
180
  prerelease: false
181
181
  version_requirements: !ruby/object:Gem::Requirement
182
182
  requirements:
183
- - - "<"
184
- - !ruby/object:Gem::Version
185
- version: 0.11.0
186
183
  - - ">="
187
184
  - !ruby/object:Gem::Version
188
185
  version: 0.9.10
186
+ - - "<"
187
+ - !ruby/object:Gem::Version
188
+ version: 0.11.0
189
189
  - !ruby/object:Gem::Dependency
190
190
  name: pry-nav
191
191
  requirement: !ruby/object:Gem::Requirement
@@ -254,16 +254,20 @@ files:
254
254
  - lib/recurly/version.rb
255
255
  - lib/recurly/webhook.rb
256
256
  - lib/recurly/webhook/account_notification.rb
257
+ - lib/recurly/webhook/billing_info_update_failed_notification.rb
257
258
  - lib/recurly/webhook/billing_info_updated_notification.rb
258
259
  - lib/recurly/webhook/canceled_account_notification.rb
260
+ - lib/recurly/webhook/canceled_gift_card_notification.rb
259
261
  - lib/recurly/webhook/canceled_subscription_notification.rb
260
262
  - lib/recurly/webhook/closed_credit_invoice_notification.rb
261
263
  - lib/recurly/webhook/closed_invoice_notification.rb
262
264
  - lib/recurly/webhook/credit_payment_notification.rb
265
+ - lib/recurly/webhook/deleted_shipping_address_notification.rb
263
266
  - lib/recurly/webhook/dunning_notification.rb
264
267
  - lib/recurly/webhook/expired_subscription_notification.rb
265
268
  - lib/recurly/webhook/failed_charge_invoice_notification.rb
266
269
  - lib/recurly/webhook/failed_payment_notification.rb
270
+ - lib/recurly/webhook/fraud_info_updated_notification.rb
267
271
  - lib/recurly/webhook/gift_card_notification.rb
268
272
  - lib/recurly/webhook/invoice_notification.rb
269
273
  - lib/recurly/webhook/low_balance_gift_card_notification.rb
@@ -273,12 +277,14 @@ files:
273
277
  - lib/recurly/webhook/new_credit_payment_notification.rb
274
278
  - lib/recurly/webhook/new_dunning_event_notification.rb
275
279
  - lib/recurly/webhook/new_invoice_notification.rb
280
+ - lib/recurly/webhook/new_shipping_address_notification.rb
276
281
  - lib/recurly/webhook/new_subscription_notification.rb
277
282
  - lib/recurly/webhook/new_usage_notification.rb
278
283
  - lib/recurly/webhook/notification.rb
279
284
  - lib/recurly/webhook/paid_charge_invoice_notification.rb
280
285
  - lib/recurly/webhook/past_due_charge_invoice_notification.rb
281
286
  - lib/recurly/webhook/past_due_invoice_notification.rb
287
+ - lib/recurly/webhook/paused_subscription_renewal_notification.rb
282
288
  - lib/recurly/webhook/processing_charge_invoice_notification.rb
283
289
  - lib/recurly/webhook/processing_credit_invoice_notification.rb
284
290
  - lib/recurly/webhook/processing_invoice_notification.rb
@@ -286,11 +292,17 @@ files:
286
292
  - lib/recurly/webhook/purchased_gift_card_notification.rb
287
293
  - lib/recurly/webhook/reactivated_account_notification.rb
288
294
  - lib/recurly/webhook/redeemed_gift_card_notification.rb
295
+ - lib/recurly/webhook/regenerated_gift_card_notification.rb
289
296
  - lib/recurly/webhook/renewed_subscription_notification.rb
290
297
  - lib/recurly/webhook/reopened_charge_invoice_notification.rb
291
298
  - lib/recurly/webhook/reopened_credit_invoice_notification.rb
292
299
  - lib/recurly/webhook/scheduled_payment_notification.rb
300
+ - lib/recurly/webhook/scheduled_subscription_pause_notification.rb
293
301
  - lib/recurly/webhook/subscription_notification.rb
302
+ - lib/recurly/webhook/subscription_pause_canceled_notification.rb
303
+ - lib/recurly/webhook/subscription_pause_modified_notification.rb
304
+ - lib/recurly/webhook/subscription_paused_notification.rb
305
+ - lib/recurly/webhook/subscription_resumed_notification.rb
294
306
  - lib/recurly/webhook/successful_payment_notification.rb
295
307
  - lib/recurly/webhook/successful_refund_notification.rb
296
308
  - lib/recurly/webhook/transaction_authorized_notification.rb
@@ -298,7 +310,9 @@ files:
298
310
  - lib/recurly/webhook/transaction_status_updated_notification.rb
299
311
  - lib/recurly/webhook/updated_account_notification.rb
300
312
  - lib/recurly/webhook/updated_balance_gift_card_notification.rb
313
+ - lib/recurly/webhook/updated_gift_card_notification.rb
301
314
  - lib/recurly/webhook/updated_invoice_notification.rb
315
+ - lib/recurly/webhook/updated_shipping_address_notification.rb
302
316
  - lib/recurly/webhook/updated_subscription_notification.rb
303
317
  - lib/recurly/webhook/void_payment_notification.rb
304
318
  - lib/recurly/webhook/voided_credit_invoice_notification.rb
@@ -327,8 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
327
341
  - !ruby/object:Gem::Version
328
342
  version: '0'
329
343
  requirements: []
330
- rubyforge_project:
331
- rubygems_version: 2.6.14.4
344
+ rubygems_version: 3.0.3
332
345
  signing_key:
333
346
  specification_version: 4
334
347
  summary: Recurly API Client