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 +4 -4
- data/lib/recurly.rb +1 -0
- data/lib/recurly/account.rb +3 -0
- data/lib/recurly/account_acquisition.rb +19 -0
- data/lib/recurly/resource.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- data/lib/recurly/xml.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04d76a0b8838006d176e6ca39f16885a069b532eb368195168e336c70d56ccb9
|
4
|
+
data.tar.gz: 0ee2e4827a538d857849ba744932e0f6a276493ed147d28b9c45bfed7b8afa10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28875b556350b50d81bde17dc9c5a614acffd3db40bae2de644bea41d9bc6df70ce5f4688f83675c465d2edd6453292ecceaf3f2047a14f8b9f31f9d2aefd4b1
|
7
|
+
data.tar.gz: c5cee0f2e9f226ff2e38ad01a882d2752401a21b05ec00ccdfaa597be5f3759aaa9423d1e43ae47e8b0e87958fca1b6d965471856be5214aa687fc16d45f50c0
|
data/lib/recurly.rb
CHANGED
data/lib/recurly/account.rb
CHANGED
@@ -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
|
data/lib/recurly/resource.rb
CHANGED
@@ -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
|
data/lib/recurly/version.rb
CHANGED
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.
|
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-
|
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
|