recurly 2.18.20 → 2.18.23

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17c82b3ed4385ef449530e65f3cf37fef29fc7b1459829672be9c0cc7557ec77
4
- data.tar.gz: c8f9bdbcff45857a02bac6af75a82bd3f090ae332781e2df7592bf2f6776daaa
3
+ metadata.gz: fd2a6275f99c0018d36fbaa9e825dc17b559ea85e7de03e0c939b36110e5f3a9
4
+ data.tar.gz: a73a5a0fdc4a711e78441be22b9f3a4f5244b60214d8b9a3ec8a0f0121268d7c
5
5
  SHA512:
6
- metadata.gz: a07c1273b0da9046fb4dcf5e490318eab5a28fd38d7390a5c8b7b516dfeb66f7cb1967931ac99c500a0bb0778fe09338ea213cd87f1186407ce3233f77133ad7
7
- data.tar.gz: 9267adfa03c7c1da06f9abfd9f178d15a239c0e243467853f1880b15b778bec700c4874d96e28fd9419040474fb02a3d89381b40e17fb7cb953f624509a6377f
6
+ metadata.gz: edc527fa06b7b42d791c54b6be18625ceb2004b2e7d0f55adc092f83d0ea5a9acd4ae22953be7304007996b134f6492e828b6e41d4426e4a8c3613f7205ac18b
7
+ data.tar.gz: 344b0d5627a8876373297f23d9648002a37f1897d3be6b6c8feac5021e6b07af9426f929bcf885e5ccd709d8173e53fb9d5604ed45c8b74ee0f7e284eacea8d4
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.20'
17
+ gem 'recurly', '~> 2.18.23'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -57,6 +57,9 @@ module Recurly
57
57
  # @return [AccountAcquisition, nil]
58
58
  has_one :account_acquisition, class_name: :AccountAcquisition, readonly: false
59
59
 
60
+ # @return [InvoiceTemplate, nil]
61
+ belongs_to :invoice_template, class_name: :InvoiceTemplate, readonly: true
62
+
60
63
  # Get's the first redemption given a coupon code
61
64
  # @deprecated Use #{redemptions} instead
62
65
  # @param coupon_code [String] The coupon code for the redemption
@@ -95,6 +98,8 @@ module Recurly
95
98
  has_paused_subscription
96
99
  preferred_locale
97
100
  transaction_type
101
+ dunning_campaign_id
102
+ invoice_template_uuid
98
103
  )
99
104
  alias to_param account_code
100
105
 
@@ -13,6 +13,8 @@ module Recurly
13
13
 
14
14
  # @return [Account, nil]
15
15
  belongs_to :account
16
+ # @return [Account, nil]
17
+ belongs_to :bill_for_account, class_name: :Account, readonly: true
16
18
  # @return [Invoice, nil]
17
19
  belongs_to :invoice
18
20
  # @return [Subscription, nil]
@@ -45,6 +45,8 @@ module Recurly
45
45
  tax_identifier_type
46
46
  primary_payment_method
47
47
  backup_payment_method
48
+ cc_bin_country
49
+ online_banking_payment_type
48
50
  ) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES | SEPA_ATTRIBUTES | BACS_ATTRIBUTES | BECS_ATTRIBUTES
49
51
 
50
52
  # Verify an account's stored billing info
@@ -0,0 +1,30 @@
1
+ module Recurly
2
+ # Recurly Documentation: https://developers.recurly.com/api-v2/latest/index.html#tag/dunning-campaigns
3
+ class DunningCampaign < Resource
4
+ # @return [[DunningCycle], []]
5
+ has_many :dunning_cycles
6
+
7
+ define_attribute_methods %w(
8
+ id
9
+ name
10
+ code
11
+ description
12
+ default_campaign
13
+ dunning_cycles
14
+ created_at
15
+ updated_at
16
+ deleted_at
17
+ )
18
+
19
+ def bulk_update(plan_codes)
20
+ return false unless link? :bulk_update
21
+
22
+ builder = XML.new("<dunning_campaign/>")
23
+ node = builder.add_element("plan_codes")
24
+ plan_codes.each { |plan_code| node.add_element "plan_code", plan_code }
25
+
26
+ reload follow_link(:bulk_update, :body => builder.to_s)
27
+ true
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,18 @@
1
+ module Recurly
2
+ class DunningCycle < Resource
3
+ define_attribute_methods %w(
4
+ type
5
+ applies_to_manual_trial
6
+ first_communication_interval
7
+ send_immediately_on_hard_decline
8
+ intervals
9
+ expire_subscription
10
+ fail_invoice
11
+ total_dunning_days
12
+ total_recycling_days
13
+ version
14
+ created_at
15
+ updated_at
16
+ )
17
+ end
18
+ end
@@ -115,6 +115,7 @@ module Recurly
115
115
  surcharge_in_cents
116
116
  tax_details
117
117
  billing_info_uuid
118
+ dunning_campaign_id
118
119
  )
119
120
  alias to_param invoice_number_with_prefix
120
121
 
@@ -0,0 +1,14 @@
1
+ module Recurly
2
+ class InvoiceTemplate < Resource
3
+ has_many :accounts, class_name: :Account, readonly: true
4
+
5
+ define_attribute_methods %w(
6
+ uuid
7
+ name
8
+ code
9
+ description
10
+ created_at
11
+ updated_at
12
+ )
13
+ end
14
+ end
data/lib/recurly/plan.rb CHANGED
@@ -35,6 +35,7 @@ module Recurly
35
35
  allow_any_item_on_subscriptions
36
36
  avalara_transaction_type
37
37
  avalara_service_type
38
+ dunning_campaign_id
38
39
  created_at
39
40
  updated_at
40
41
  )
@@ -608,7 +608,7 @@ module Recurly
608
608
 
609
609
  def find_resource_class(name)
610
610
  resource_name = Helper.classify(name)
611
- if Recurly.const_defined?(resource_name, false)
611
+ if Recurly.const_defined?(resource_name, false) && Recurly.const_get(resource_name, false).instance_of?(Class)
612
612
  Recurly.const_get(resource_name, false)
613
613
  end
614
614
  end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.20"
3
+ VERSION = "2.18.23"
4
4
 
5
5
  class << self
6
6
  def inspect
data/lib/recurly.rb CHANGED
@@ -42,6 +42,9 @@ module Recurly
42
42
  require 'recurly/webhook'
43
43
  require 'recurly/verify'
44
44
  require 'recurly/tier'
45
+ require 'recurly/dunning_campaign'
46
+ require 'recurly/dunning_cycle'
47
+ require 'recurly/invoice_template'
45
48
 
46
49
  @subdomain = nil
47
50
 
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.20
4
+ version: 2.18.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-16 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -141,11 +141,14 @@ files:
141
141
  - lib/recurly/credit_payment.rb
142
142
  - lib/recurly/custom_field.rb
143
143
  - lib/recurly/delivery.rb
144
+ - lib/recurly/dunning_campaign.rb
145
+ - lib/recurly/dunning_cycle.rb
144
146
  - lib/recurly/error.rb
145
147
  - lib/recurly/gift_card.rb
146
148
  - lib/recurly/helper.rb
147
149
  - lib/recurly/invoice.rb
148
150
  - lib/recurly/invoice_collection.rb
151
+ - lib/recurly/invoice_template.rb
149
152
  - lib/recurly/item.rb
150
153
  - lib/recurly/js.rb
151
154
  - lib/recurly/juris_detail.rb