recurly 2.19.10 → 2.19.12

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: 26bec9d46599a315823b85423806564f155b1777efc09fa47fa32dd1894e0159
4
- data.tar.gz: c0bf35d79d87a6e2e22f861c407a0526743fcc4ae8c90693bc395ed501abc0a0
3
+ metadata.gz: 07b5067661c7758323506e342b179b0b3f96a3671bdba48c71bd903fad474b00
4
+ data.tar.gz: f9ce39d6f582c8ec0821ac49186d22e0b9e336c10106bf7f32830d7e2290378c
5
5
  SHA512:
6
- metadata.gz: c02c83650818cf6cc5c04cd8cb222ec598000d3f4ca8ce5208adc51ef8dfbd60966e59fad9baada38b85a38b5a9ad6f89408d2e519ccb0d10994c717977e87db
7
- data.tar.gz: f8d56a24d903654a9fcdd2a36dcdf178db3aa0e3b1611aff5c20a677060beb21f6e453c60a403a16cead98bb5305ef5abe50b1c8640633c76a3c57a2a300c13d
6
+ metadata.gz: 14a567ea3a7453fd427c280d82550aa293e12fae9191ec32a0d2e6cb3169fc15aed203b9efc82e1f269d2a35977598ec0051c50667c137d2789b75d848c0e340
7
+ data.tar.gz: 5c36086de3d53793fc0ee604fdeec7dad264a2607bbe63f219021bda5adb200d843bf48045e5aa11f28a8a6006f4e23403d16f6281b1e1b9fab73215679113d1
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.19.10'
17
+ gem 'recurly', '~> 2.19.12'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -31,7 +31,7 @@ module Recurly
31
31
  external_sku
32
32
  avalara_service_type
33
33
  avalara_transaction_type
34
- )
34
+ ) + RevRec::PRODUCT_ATTRIBUTES
35
35
  alias to_param add_on_code
36
36
  alias quantity default_quantity
37
37
 
@@ -68,7 +68,7 @@ module Recurly
68
68
  avalara_transaction_type
69
69
  avalara_service_type
70
70
  refundable_total_in_cents
71
- ]
71
+ ] + RevRec::ALL_ATTRIBUTES
72
72
  alias to_param uuid
73
73
 
74
74
  # @return ["charge", "credit", nil] The type of adjustment.
@@ -50,6 +50,7 @@ module Recurly
50
50
  backup_payment_method
51
51
  cc_bin_country
52
52
  online_banking_payment_type
53
+ card_network_preference
53
54
  ) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES | SEPA_ATTRIBUTES | BACS_ATTRIBUTES | BECS_ATTRIBUTES | VENMO_ATTRIBUTES
54
55
 
55
56
  # Verify an account's stored billing info
@@ -1,9 +1,10 @@
1
1
  module Recurly
2
2
  class BusinessEntity < Resource
3
3
  belongs_to :site
4
+ belongs_to :default_revenue_gl_account, class_name: 'GeneralLedgerAccount'
5
+ belongs_to :default_liability_gl_account, class_name: 'GeneralLedgerAccount'
4
6
 
5
7
  has_many :invoices
6
-
7
8
  has_many :accounts
8
9
 
9
10
  define_attribute_methods %w(
@@ -15,6 +16,8 @@ module Recurly
15
16
  subscriber_location_countries
16
17
  default_vat_number
17
18
  default_registration_number
19
+ default_revenue_gl_account_id
20
+ default_liability_gl_account_id
18
21
  created_at
19
22
  updated_at
20
23
  )
@@ -0,0 +1,16 @@
1
+ module Recurly
2
+ class GeneralLedgerAccount < Resource
3
+ belongs_to :site
4
+
5
+ define_attribute_methods %w(
6
+ id
7
+ code
8
+ description
9
+ account_type
10
+ )
11
+
12
+ def self.collection_path
13
+ "general_ledger_accounts"
14
+ end
15
+ end
16
+ end
@@ -36,7 +36,7 @@ module Recurly
36
36
  gifter_account_code
37
37
  recipient_account_code
38
38
  invoice_number
39
- )
39
+ ) + RevRec::PRODUCT_ATTRIBUTES
40
40
  alias to_param id
41
41
 
42
42
  # Preview a GiftCard given some attributes
data/lib/recurly/item.rb CHANGED
@@ -16,7 +16,7 @@ module Recurly
16
16
  created_at
17
17
  updated_at
18
18
  deleted_at
19
- )
19
+ ) + RevRec::PRODUCT_ATTRIBUTES
20
20
 
21
21
  def changed_attributes
22
22
  attrs = super
@@ -0,0 +1,15 @@
1
+ module Recurly
2
+ class PerformanceObligation < Resource
3
+
4
+ define_attribute_methods %w(
5
+ id
6
+ name
7
+ created_at
8
+ updated_at
9
+ )
10
+
11
+ def self.collection_path
12
+ "performance_obligations"
13
+ end
14
+ end
15
+ end
data/lib/recurly/plan.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module Recurly
2
2
  # Recurly Documentation: https://dev.recurly.com/docs/list-plans
3
3
  class Plan < Resource
4
+
4
5
  # @return [Pager<AddOn>, []]
5
6
  has_many :add_ons
6
7
 
@@ -13,6 +14,7 @@ module Recurly
13
14
  # @return [[CustomField], []]
14
15
  has_many :custom_fields, class_name: :CustomField, readonly: false
15
16
 
17
+ # Define attribute methods
16
18
  define_attribute_methods %w(
17
19
  plan_code
18
20
  name
@@ -50,7 +52,7 @@ module Recurly
50
52
  custom_fields
51
53
  created_at
52
54
  updated_at
53
- )
55
+ ) + RevRec::PLAN_ATTRIBUTES
54
56
  alias to_param plan_code
55
57
  end
56
58
  end
@@ -1,5 +1,6 @@
1
1
  require 'date'
2
2
  require 'erb'
3
+ require_relative './rev_rec'
3
4
 
4
5
  module Recurly
5
6
  # The base class for all Recurly resources (e.g. {Account}, {Subscription},
@@ -0,0 +1,18 @@
1
+ module Recurly
2
+ module RevRec
3
+ POB_ATTRIBUTE = %i(performance_obligation_id).freeze
4
+ POB_NATIVE_ATTRIBUTE = %i(performance_obligation_identifier).freeze
5
+
6
+ GLA_ID_ATTRIBUTES = %i(liability_gl_account_id revenue_gl_account_id).freeze
7
+ GLA_CODE_ATTRIBUTES = %i(liability_gl_account_code revenue_gl_account_code).freeze
8
+
9
+ PRODUCT_NATIVE_ATTRS = (POB_NATIVE_ATTRIBUTE + GLA_ID_ATTRIBUTES).freeze
10
+ PRODUCT_ATTRIBUTES = (POB_ATTRIBUTE + GLA_ID_ATTRIBUTES).freeze
11
+
12
+ LINE_ITEM_ATTRIBUTES = (POB_ATTRIBUTE + GLA_CODE_ATTRIBUTES).freeze
13
+ ALL_ATTRIBUTES = (PRODUCT_ATTRIBUTES + LINE_ITEM_ATTRIBUTES).uniq.freeze
14
+
15
+ SETUP_FEE_ATTRIBUTES = PRODUCT_ATTRIBUTES.map { |key| :"setup_fee_#{key}" }.freeze
16
+ PLAN_ATTRIBUTES = [*PRODUCT_ATTRIBUTES, *SETUP_FEE_ATTRIBUTES].freeze
17
+ end
18
+ end
@@ -7,7 +7,7 @@ module Recurly
7
7
  tax_code
8
8
  created_at
9
9
  updated_at
10
- )
10
+ ) + RevRec::PRODUCT_ATTRIBUTES
11
11
  alias to_param code
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.19.10"
3
+ VERSION = "2.19.12"
4
4
 
5
5
  class << self
6
6
  def inspect
@@ -22,7 +22,7 @@ module Recurly
22
22
  def each element = root
23
23
  element.each_element do |el|
24
24
  yield el
25
- each el, &Proc.new
25
+ each el, &Proc.new { |e| yield e }
26
26
  end
27
27
  end
28
28
 
data/lib/recurly.rb CHANGED
@@ -62,6 +62,8 @@ module Recurly
62
62
  require 'recurly/currency_percentage_tier'
63
63
  require 'recurly/sub_add_on_percentage_tier'
64
64
  require 'recurly/custom_field_definition'
65
+ require 'recurly/general_ledger_account'
66
+ require 'recurly/performance_obligation'
65
67
 
66
68
  @subdomain = nil
67
69
 
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.19.10
4
+ version: 2.19.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-06 00:00:00.000000000 Z
11
+ date: 2024-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -239,6 +239,7 @@ files:
239
239
  - lib/recurly/external_product_reference.rb
240
240
  - lib/recurly/external_subscription.rb
241
241
  - lib/recurly/gateway_attribute.rb
242
+ - lib/recurly/general_ledger_account.rb
242
243
  - lib/recurly/gift_card.rb
243
244
  - lib/recurly/helper.rb
244
245
  - lib/recurly/invoice.rb
@@ -251,6 +252,7 @@ files:
251
252
  - lib/recurly/money.rb
252
253
  - lib/recurly/note.rb
253
254
  - lib/recurly/percentage_tier.rb
255
+ - lib/recurly/performance_obligation.rb
254
256
  - lib/recurly/plan.rb
255
257
  - lib/recurly/plan_ramp_interval.rb
256
258
  - lib/recurly/purchase.rb
@@ -259,6 +261,7 @@ files:
259
261
  - lib/recurly/resource/association.rb
260
262
  - lib/recurly/resource/errors.rb
261
263
  - lib/recurly/resource/pager.rb
264
+ - lib/recurly/rev_rec.rb
262
265
  - lib/recurly/shipping_address.rb
263
266
  - lib/recurly/shipping_fee.rb
264
267
  - lib/recurly/shipping_method.rb
@@ -371,7 +374,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
374
  - !ruby/object:Gem::Version
372
375
  version: '0'
373
376
  requirements: []
374
- rubygems_version: 3.4.6
377
+ rubygems_version: 3.4.10
375
378
  signing_key:
376
379
  specification_version: 4
377
380
  summary: Recurly API Client