recurly 2.18.34 → 2.19.1

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
2
  SHA256:
3
- metadata.gz: 9760d9361ce3ff01fb7fdf89bc4138ec1b2103c8d0e76cd19f180fc708e975b7
4
- data.tar.gz: f4cc5d1522cded81e6172b3664b226ec85d09c01b1dc378d7278d8158dfd3ccc
3
+ metadata.gz: 69469dc138a9a12534568a6c597253329c834f129fa58f38c763ea24ee97268d
4
+ data.tar.gz: 6618f8671f3fcdeb8b17b5f26e71af6dd10497ef9f675366811e24058441d9f8
5
5
  SHA512:
6
- metadata.gz: 5d106b7ed9938da57a1133ca11dbb002c7f919fddeca10e4a22d22438720b777db55296c2d2c5d041752d23053badc1a96f7300bf8c4345413557b32619e518f
7
- data.tar.gz: 167d7fe3dc8c6d8aeabb46839110ef3c2c59c2962ee25ffaf4f1a08021c1d91dff7857428831b80f8859d224d99fb65128a4a2869cd21b03c038db298a46eb35
6
+ metadata.gz: aee231e848059714146662a5cafc3df52419c12d710dd755080a8ad0da42dd0ca2aaa03d193bde21693135773aa3a4a60ef80b766aba2bc1b289d9db529a8f5f
7
+ data.tar.gz: 3be1e1b82cfc47187f491cbd7f7af9d0d020bcd554ce99eaea6bebe63f3222766cd9c5673ad5d274974d6a27784376aab874b12e5d47c0e18ccc29fa0547d529
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.34'
17
+ gem 'recurly', '~> 2.19.1'
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,11 +1,14 @@
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 [ExternalProductReference]
8
- belongs_to :external_product_reference
7
+ # @return [ExternalProductReference]
8
+ belongs_to :external_product_reference
9
+
10
+ # @return [ExternalInvoice]
11
+ has_many :external_invoices
9
12
 
10
13
  define_attribute_methods %w(
11
14
  account
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.34"
3
+ VERSION = "2.19.1"
4
4
 
5
5
  class << self
6
6
  def inspect
data/lib/recurly.rb CHANGED
@@ -20,6 +20,8 @@ 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
27
  require 'recurly/external_subscription'
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.34
4
+ version: 2.19.1
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-22 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -148,6 +148,8 @@ 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
155
  - lib/recurly/external_subscription.rb