recurly 2.18.32 → 2.18.33

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: 380b5b8231cc9062f6275a2a5828cf51eae88aaa65aca50b6ea989c62dbf630d
4
- data.tar.gz: 10994ca6ae6a77b269a9fe68f0c50858781adf161bbc4e38fb464d46169aaeb6
3
+ metadata.gz: bbaf0998408e516fc11249946b64bc4518ccc987e08504ce99929208292e5e56
4
+ data.tar.gz: d0895760275f8c2f9f65b3d6c102c4d14482cf9d94e189675fdfe1c60136edf7
5
5
  SHA512:
6
- metadata.gz: 49b6f26d5151d156c47046fb6a7ee41174e8b42f69e1c932a19f35fea7ab8ddffb2056bd127e20ea21d3101858abc4c5f940284791043e07d4c1c9316ee352e5
7
- data.tar.gz: 3aac2a23498e485be20c61bd3f53bbd392c75a02df3f5619b66519054ed1f0fe4cd5274bf52b4698c786206d4a077a2c8fc2c7eb6c98e481acc3d04cb5e8aff6
6
+ metadata.gz: 6a2483199dc5a468bf64577e19d2991e5b0adad5bf285dd12743de56681149f7fca46c4ac8c10620dea08396f28ed81fa605f242289a5c61a8c22d4e05d6218d
7
+ data.tar.gz: 2a447aa7e37f72cfa916114e7fcd14531fdcfdc282402d540fc259f5cf566864ac497a746270ae6c6ef30e0376715ca8e5c1bc33e15ed0b46ff8f760d0a91b4f
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.32'
17
+ gem 'recurly', '~> 2.18.33'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -26,7 +26,10 @@ module Recurly
26
26
  # @return [ShippingAddress, nil]
27
27
  has_one :shipping_address, class_name: :ShippingAddress, readonly: false
28
28
 
29
- define_attribute_methods %w(
29
+ # @return [[CustomField], []]
30
+ has_many :custom_fields, class_name: :CustomField, readonly: false
31
+
32
+ define_attribute_methods %w[
30
33
  uuid
31
34
  state
32
35
  description
@@ -65,7 +68,7 @@ module Recurly
65
68
  avalara_transaction_type
66
69
  avalara_service_type
67
70
  refundable_total_in_cents
68
- )
71
+ ]
69
72
  alias to_param uuid
70
73
 
71
74
  # @return ["charge", "credit", nil] The type of adjustment.
@@ -81,6 +84,14 @@ module Recurly
81
84
  super({ :currency => Recurly.default_currency }.merge attributes)
82
85
  end
83
86
 
87
+ def changed_attributes
88
+ attrs = super
89
+ if custom_fields.any?(&:changed?)
90
+ attrs['custom_fields'] = custom_fields.select(&:changed?)
91
+ end
92
+ attrs
93
+ end
94
+
84
95
  # Adjustments are only writeable through an {Account} instance.
85
96
  embedded! true
86
97
  end
@@ -0,0 +1,14 @@
1
+ module Recurly
2
+ class CustomFieldDefinition < Resource
3
+ define_attribute_methods %w(
4
+ id
5
+ related_type
6
+ name
7
+ user_access
8
+ display_name
9
+ tooltip
10
+ created_at
11
+ updated_at
12
+ )
13
+ end
14
+ end
data/lib/recurly/plan.rb CHANGED
@@ -10,6 +10,9 @@ module Recurly
10
10
  # @return [[PlanRampInterval], nil]
11
11
  has_many :ramp_intervals, class_name: :PlanRampInterval
12
12
 
13
+ # @return [[CustomField], []]
14
+ has_many :custom_fields, class_name: :CustomField, readonly: false
15
+
13
16
  define_attribute_methods %w(
14
17
  plan_code
15
18
  name
@@ -44,6 +47,7 @@ module Recurly
44
47
  avalara_transaction_type
45
48
  avalara_service_type
46
49
  dunning_campaign_id
50
+ custom_fields
47
51
  created_at
48
52
  updated_at
49
53
  )
@@ -48,6 +48,10 @@ module Recurly
48
48
  xml.text '/errors/transaction_error/gateway_error_code'
49
49
  end
50
50
 
51
+ def decline_code
52
+ xml.text '/errors/transaction_error/decline_code'
53
+ end
54
+
51
55
  private
52
56
 
53
57
  def update_transaction transaction
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.32"
3
+ VERSION = "2.18.33"
4
4
 
5
5
  class << self
6
6
  def inspect
data/lib/recurly.rb CHANGED
@@ -56,6 +56,7 @@ module Recurly
56
56
  require 'recurly/percentage_tier'
57
57
  require 'recurly/currency_percentage_tier'
58
58
  require 'recurly/sub_add_on_percentage_tier'
59
+ require 'recurly/custom_field_definition'
59
60
 
60
61
  @subdomain = nil
61
62
 
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.32
4
+ version: 2.18.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-11 00:00:00.000000000 Z
11
+ date: 2023-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -141,6 +141,7 @@ files:
141
141
  - lib/recurly/credit_payment.rb
142
142
  - lib/recurly/currency_percentage_tier.rb
143
143
  - lib/recurly/custom_field.rb
144
+ - lib/recurly/custom_field_definition.rb
144
145
  - lib/recurly/customer_permission.rb
145
146
  - lib/recurly/delivery.rb
146
147
  - lib/recurly/dunning_campaign.rb