recurly 2.18.31 → 2.18.33

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: 912d1b45d04c83c3506c375f50e8849ab302dfc305fed4da9a12955fc1bfb1b7
4
- data.tar.gz: 7114fa3829dbef3ddcc4c34ffad3f94e58f638878b0eb1e2947a8feb2ae9a1a0
3
+ metadata.gz: bbaf0998408e516fc11249946b64bc4518ccc987e08504ce99929208292e5e56
4
+ data.tar.gz: d0895760275f8c2f9f65b3d6c102c4d14482cf9d94e189675fdfe1c60136edf7
5
5
  SHA512:
6
- metadata.gz: 8df421cb571be12bf410ebabd4ebd7d10180d44838c2aa4e57341a6fb4f3c25b0c4cae7ccd1b99d0bf3efdd4553075d653860cdef31f84e81ae3580f0daf1598
7
- data.tar.gz: 2b86033aac54329ed83c8085f2ff41edae9020bda46a194d4fb4fd63dbedffd081fe33c2265305cd781f2ab73e132f24bcd57dd685b8d2810f24c1f3dbb2e557
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.31'
17
+ gem 'recurly', '~> 2.18.33'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -103,6 +103,7 @@ module Recurly
103
103
  has_past_due_invoice
104
104
  has_paused_subscription
105
105
  preferred_locale
106
+ preferred_time_zone
106
107
  transaction_type
107
108
  dunning_campaign_id
108
109
  invoice_template_uuid
@@ -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.31"
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.31
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: 2022-11-30 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