recurly 2.18.33 → 2.19.0

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: bbaf0998408e516fc11249946b64bc4518ccc987e08504ce99929208292e5e56
4
- data.tar.gz: d0895760275f8c2f9f65b3d6c102c4d14482cf9d94e189675fdfe1c60136edf7
3
+ metadata.gz: 621d3fdceef9b44283b4eb9100e3e2ea08347706a16d27dace4419743ee2a961
4
+ data.tar.gz: 27c32771f27b55b2f4a54eb4d8ea6afef0a32223075b86aa877c13986ea90063
5
5
  SHA512:
6
- metadata.gz: 6a2483199dc5a468bf64577e19d2991e5b0adad5bf285dd12743de56681149f7fca46c4ac8c10620dea08396f28ed81fa605f242289a5c61a8c22d4e05d6218d
7
- data.tar.gz: 2a447aa7e37f72cfa916114e7fcd14531fdcfdc282402d540fc259f5cf566864ac497a746270ae6c6ef30e0376715ca8e5c1bc33e15ed0b46ff8f760d0a91b4f
6
+ metadata.gz: e4de95fd9931d04ea34dd2f9ca2e092c765613b3f2f0e21e24db15a7a4f6c07c908d4afe7241ea885e91e62b365d4b962795ac131d62fa4995e89b4755072a8f
7
+ data.tar.gz: 3f613fd2f69d06aa91ca16dbd3eed35b0c39a0b1a7189acc974fd0d83aef98e3067197659b7976939785ba7a2cea5978936958560db0f3d5de968ada97ad8d1d
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.33'
17
+ gem 'recurly', '~> 2.19.0'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -29,6 +29,9 @@ module Recurly
29
29
  # @return [Pager<ExternalSubscription>, []] A pager that yields External Subscriptions for persisted
30
30
  has_many :external_subscriptions
31
31
 
32
+ # @return [Pager<ExternalInvoice>, []] A pager that yields External Subscriptions for persisted
33
+ has_many :external_invoices
34
+
32
35
  # @return [Pager<Entitlement>, []] A pager that yields Entitlement for persisted
33
36
  has_many :entitlements
34
37
 
@@ -0,0 +1,20 @@
1
+ module Recurly
2
+ class ExternalCharge < Resource
3
+ belongs_to :account
4
+ belongs_to :external_invoice
5
+ belongs_to :external_product_reference, optional: true
6
+
7
+ define_attribute_methods %w(
8
+ description
9
+ unit_amount
10
+ currency
11
+ quantity
12
+ created_at
13
+ updated_at
14
+ )
15
+
16
+ # We do not expose POST or PUT via the v2 API
17
+ protected(*%w(save save!))
18
+ private_class_method(*%w(create! create))
19
+ end
20
+ end
@@ -0,0 +1,26 @@
1
+ module Recurly
2
+ class ExternalInvoice < Resource
3
+
4
+ # @return [Plan]
5
+ belongs_to :site
6
+ belongs_to :account
7
+ belongs_to :external_subscription
8
+
9
+ # @return [[ExternalCharge], nil]
10
+ has_many :line_items, class_name: :ExternalCharge
11
+
12
+ define_attribute_methods %w(
13
+ external_id
14
+ state
15
+ currency
16
+ total
17
+ purchased_at
18
+ created_at
19
+ updated_at
20
+ )
21
+
22
+ # We do not expose POST or PUT via the v2 API
23
+ protected(*%w(save save!))
24
+ private_class_method(*%w(create! create))
25
+ end
26
+ end
@@ -1,18 +1,18 @@
1
1
  module Recurly
2
2
  class ExternalSubscription < Resource
3
3
 
4
- # @return [Account]
5
- belongs_to :account
4
+ # @return [Account]
5
+ belongs_to :account
6
6
 
7
- # @return [ExternalResource]
8
- has_one :external_resource
9
-
10
- # @return [ExternalProductReference]
11
- belongs_to :external_product_reference
7
+ # @return [ExternalProductReference]
8
+ belongs_to :external_product_reference
9
+
10
+ # @return [ExternalInvoice]
11
+ has_many :external_invoices
12
12
 
13
13
  define_attribute_methods %w(
14
14
  account
15
- external_resource
15
+ external_id
16
16
  external_product_reference
17
17
  quantity
18
18
  activated_at
@@ -22,6 +22,7 @@ module Recurly
22
22
  last_purchased
23
23
  auto_renew
24
24
  app_identifier
25
+ state
25
26
  )
26
27
 
27
28
  # We do not expose PUT or POST in the v2 API.
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.33"
3
+ VERSION = "2.19.0"
4
4
 
5
5
  class << self
6
6
  def inspect
data/lib/recurly.rb CHANGED
@@ -20,9 +20,10 @@ module Recurly
20
20
  require 'recurly/credit_payment'
21
21
  require 'recurly/customer_permission'
22
22
  require 'recurly/entitlement'
23
+ require 'recurly/external_charge'
24
+ require 'recurly/external_invoice'
23
25
  require 'recurly/external_product'
24
26
  require 'recurly/external_product_reference'
25
- require 'recurly/external_resource'
26
27
  require 'recurly/external_subscription'
27
28
  require 'recurly/helper'
28
29
  require 'recurly/invoice'
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.33
4
+ version: 2.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-06 00:00:00.000000000 Z
11
+ date: 2023-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -148,9 +148,10 @@ files:
148
148
  - lib/recurly/dunning_cycle.rb
149
149
  - lib/recurly/entitlement.rb
150
150
  - lib/recurly/error.rb
151
+ - lib/recurly/external_charge.rb
152
+ - lib/recurly/external_invoice.rb
151
153
  - lib/recurly/external_product.rb
152
154
  - lib/recurly/external_product_reference.rb
153
- - lib/recurly/external_resource.rb
154
155
  - lib/recurly/external_subscription.rb
155
156
  - lib/recurly/gift_card.rb
156
157
  - lib/recurly/helper.rb
@@ -1,11 +0,0 @@
1
- module Recurly
2
- class ExternalResource < Resource
3
-
4
- define_attribute_methods %w(
5
- external_object_reference
6
- )
7
-
8
- protected(*%w(save save!))
9
- private_class_method(*%w(all first paginate scoped where create create!))
10
- end
11
- end