recurly 2.18.32 → 2.18.34

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: 380b5b8231cc9062f6275a2a5828cf51eae88aaa65aca50b6ea989c62dbf630d
4
- data.tar.gz: 10994ca6ae6a77b269a9fe68f0c50858781adf161bbc4e38fb464d46169aaeb6
3
+ metadata.gz: 9760d9361ce3ff01fb7fdf89bc4138ec1b2103c8d0e76cd19f180fc708e975b7
4
+ data.tar.gz: f4cc5d1522cded81e6172b3664b226ec85d09c01b1dc378d7278d8158dfd3ccc
5
5
  SHA512:
6
- metadata.gz: 49b6f26d5151d156c47046fb6a7ee41174e8b42f69e1c932a19f35fea7ab8ddffb2056bd127e20ea21d3101858abc4c5f940284791043e07d4c1c9316ee352e5
7
- data.tar.gz: 3aac2a23498e485be20c61bd3f53bbd392c75a02df3f5619b66519054ed1f0fe4cd5274bf52b4698c786206d4a077a2c8fc2c7eb6c98e481acc3d04cb5e8aff6
6
+ metadata.gz: 5d106b7ed9938da57a1133ca11dbb002c7f919fddeca10e4a22d22438720b777db55296c2d2c5d041752d23053badc1a96f7300bf8c4345413557b32619e518f
7
+ data.tar.gz: 167d7fe3dc8c6d8aeabb46839110ef3c2c59c2962ee25ffaf4f1a08021c1d91dff7857428831b80f8859d224d99fb65128a4a2869cd21b03c038db298a46eb35
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.34'
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
@@ -4,15 +4,12 @@ module Recurly
4
4
  # @return [Account]
5
5
  belongs_to :account
6
6
 
7
- # @return [ExternalResource]
8
- has_one :external_resource
9
-
10
7
  # @return [ExternalProductReference]
11
8
  belongs_to :external_product_reference
12
9
 
13
10
  define_attribute_methods %w(
14
11
  account
15
- external_resource
12
+ external_id
16
13
  external_product_reference
17
14
  quantity
18
15
  activated_at
@@ -22,6 +19,7 @@ module Recurly
22
19
  last_purchased
23
20
  auto_renew
24
21
  app_identifier
22
+ state
25
23
  )
26
24
 
27
25
  # We do not expose PUT or POST in the v2 API.
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.34"
4
4
 
5
5
  class << self
6
6
  def inspect
data/lib/recurly.rb CHANGED
@@ -22,7 +22,6 @@ module Recurly
22
22
  require 'recurly/entitlement'
23
23
  require 'recurly/external_product'
24
24
  require 'recurly/external_product_reference'
25
- require 'recurly/external_resource'
26
25
  require 'recurly/external_subscription'
27
26
  require 'recurly/helper'
28
27
  require 'recurly/invoice'
@@ -56,6 +55,7 @@ module Recurly
56
55
  require 'recurly/percentage_tier'
57
56
  require 'recurly/currency_percentage_tier'
58
57
  require 'recurly/sub_add_on_percentage_tier'
58
+ require 'recurly/custom_field_definition'
59
59
 
60
60
  @subdomain = nil
61
61
 
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.34
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-22 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
@@ -149,7 +150,6 @@ files:
149
150
  - lib/recurly/error.rb
150
151
  - lib/recurly/external_product.rb
151
152
  - lib/recurly/external_product_reference.rb
152
- - lib/recurly/external_resource.rb
153
153
  - lib/recurly/external_subscription.rb
154
154
  - lib/recurly/gift_card.rb
155
155
  - 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