recurly 2.17.6 → 2.17.7

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: a7917c21001eb4112fd3c5bbc96fbbbe40ef166301505413115ee976377b90a2
4
- data.tar.gz: d0857e6d2e28accbf0fad9997b211f53739ad50fe2f9d05510ff166f51207498
3
+ metadata.gz: 04d76a0b8838006d176e6ca39f16885a069b532eb368195168e336c70d56ccb9
4
+ data.tar.gz: 0ee2e4827a538d857849ba744932e0f6a276493ed147d28b9c45bfed7b8afa10
5
5
  SHA512:
6
- metadata.gz: 4636d69dca6b6ffe8dcd9cd740192fdd177796d916865ae1fba8993a785cac4029683ffab7b2bc5524a63b9a74ffbdd8f4f7c9754081793e2bb135363f18ed20
7
- data.tar.gz: 030642fdb5369ce47820a0636d82707db447c954da5c1da8049834db95456a855d8e633a653551f44018c973dc948ffc0df94e14bb34021014052aa7d9d3b063
6
+ metadata.gz: 28875b556350b50d81bde17dc9c5a614acffd3db40bae2de644bea41d9bc6df70ce5f4688f83675c465d2edd6453292ecceaf3f2047a14f8b9f31f9d2aefd4b1
7
+ data.tar.gz: c5cee0f2e9f226ff2e38ad01a882d2752401a21b05ec00ccdfaa597be5f3759aaa9423d1e43ae47e8b0e87958fca1b6d965471856be5214aa687fc16d45f50c0
data/lib/recurly.rb CHANGED
@@ -7,6 +7,7 @@ module Recurly
7
7
  require 'recurly/shipping_address'
8
8
  require 'recurly/billing_info'
9
9
  require 'recurly/custom_field'
10
+ require 'recurly/account_acquisition'
10
11
  require 'recurly/account'
11
12
  require 'recurly/account_balance'
12
13
  require 'recurly/add_on'
@@ -48,6 +48,9 @@ module Recurly
48
48
  # @return [[CustomField], []]
49
49
  has_many :custom_fields, class_name: :CustomField, readonly: false
50
50
 
51
+ # @return [AccountAcquisition, nil]
52
+ has_one :account_acquisition, class_name: :AccountAcquisition, readonly: false
53
+
51
54
  # Get's the first redemption given a coupon code
52
55
  # @deprecated Use #{redemptions} instead
53
56
  # @param coupon_code [String] The coupon code for the redemption
@@ -0,0 +1,19 @@
1
+ module Recurly
2
+ # Recurly Documentation: https://dev.recurly.com/docs/create-account-acquisition
3
+ class AccountAcquisition < Resource
4
+ # @return [Account]
5
+ belongs_to :account
6
+
7
+ define_attribute_methods %w(
8
+ cost_in_cents
9
+ currency
10
+ channel
11
+ subchannel
12
+ campaign
13
+ )
14
+
15
+ # Acquisitions are only writeable and readable through {Account} instances.
16
+ embedded!
17
+ private_class_method :find
18
+ end
19
+ end
@@ -1068,7 +1068,7 @@ module Recurly
1068
1068
  else
1069
1069
  child, k, v = attribute_path.shift.scan(/[^\[\]=]+/)
1070
1070
  if c = k ? self[child].find { |d| d[k] == v } : self[child]
1071
- c.invalid! attribute_path, error
1071
+ c.invalid! attribute_path, error if c.methods.include? :invalid!
1072
1072
  e = errors[child] << 'is invalid' and e.uniq!
1073
1073
  end
1074
1074
  end
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 17
5
- PATCH = 6
5
+ PATCH = 7
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
data/lib/recurly/xml.rb CHANGED
@@ -91,7 +91,7 @@ if defined? Nokogiri
91
91
  You are attempting to use an insecure version of
92
92
  nokogiri on an insecure version of ruby. Please see
93
93
  the documentation on supported versions for more information:
94
- https://github.com/recurly/recurly-client-ruby#supported-versions
94
+ https://github.com/recurly/recurly-client-ruby#supported-ruby-versions
95
95
 
96
96
  MSG
97
97
  if RUBY_VERSION < "2.1.0"
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.17.6
4
+ version: 2.17.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-19 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -210,6 +210,7 @@ files:
210
210
  - README.md
211
211
  - lib/recurly.rb
212
212
  - lib/recurly/account.rb
213
+ - lib/recurly/account_acquisition.rb
213
214
  - lib/recurly/account_balance.rb
214
215
  - lib/recurly/add_on.rb
215
216
  - lib/recurly/address.rb