recurly 2.18.6 → 2.18.7
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 +4 -4
- data/README.md +1 -1
- data/lib/recurly/adjustment.rb +1 -0
- data/lib/recurly/api.rb +1 -1
- data/lib/recurly/subscription.rb +29 -0
- data/lib/recurly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfc1b1631c0eff809f13744b592123e8f4e05b171ae9f8315532878ca54d693b
|
4
|
+
data.tar.gz: 36f192d5fc2a23529acd0aea8f734a8a5e3b9913a079423eb8e6e11a8c4bd001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab2406a05aa914d27d05638fc52956295da64aba4f1b3e065f06312d478aeec1d080a0741490f6f283ad7cd9f6e12be804312756ef693fde6d3ea25f46569474
|
7
|
+
data.tar.gz: 97916a77c38c1dbf1308971f1ef021e32266c8c6981945c4764cf09e90c2a6a11bf61d6361ca0df2332426acfc5b3305c2c73e1ae1c4bf9aeba5fb6904ee4875
|
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.
|
17
|
+
gem 'recurly', '~> 2.18.7'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/adjustment.rb
CHANGED
data/lib/recurly/api.rb
CHANGED
data/lib/recurly/subscription.rb
CHANGED
@@ -174,6 +174,35 @@ module Recurly
|
|
174
174
|
sub.tap {|e| e.currency = currency} if sub.is_a? Subscription
|
175
175
|
end
|
176
176
|
|
177
|
+
# Convert free trial to paid subscription when transaction_type is "moto"
|
178
|
+
# which stands for "Mail Order Telephone Order".
|
179
|
+
#
|
180
|
+
# @return true
|
181
|
+
def convert_trial_moto()
|
182
|
+
builder = XML.new("<subscription/>")
|
183
|
+
builder.add_element('transaction_type', "moto")
|
184
|
+
reload API.put("#{uri}/convert_trial", builder.to_s)
|
185
|
+
true
|
186
|
+
end
|
187
|
+
|
188
|
+
# Convert free trial to paid subscription. Optionally uses a 3ds token.
|
189
|
+
#
|
190
|
+
# @param three_d_secure_action_result_token_id [String] three_d_secure_action_result_token_id
|
191
|
+
# returned by Recurly.js referencing the result of the 3DS authentication for PSD2
|
192
|
+
# @return true when payment is accepted
|
193
|
+
def convert_trial(three_d_secure_action_result_token_id = nil)
|
194
|
+
body = if three_d_secure_action_result_token_id != nil
|
195
|
+
builder = Recurly::XML.new("<subscription/>")
|
196
|
+
account = builder.add_element('account')
|
197
|
+
billing_info = account.add_element('billing_info')
|
198
|
+
billing_info.add_element('three_d_secure_action_result_token_id', three_d_secure_action_result_token_id)
|
199
|
+
builder.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
reload API.put("#{uri}/convert_trial", body)
|
203
|
+
true
|
204
|
+
end
|
205
|
+
|
177
206
|
# Cancel a subscription so that it will not renew.
|
178
207
|
#
|
179
208
|
# @param [String] optional timeframe. Choose one of "bill_date" or "term_end"
|
data/lib/recurly/version.rb
CHANGED
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.
|
4
|
+
version: 2.18.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|