recurly 3.3.1 → 3.7.0
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/.bumpversion.cfg +5 -1
- data/.github/workflows/docs.yml +28 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +92 -1
- data/GETTING_STARTED.md +61 -1
- data/README.md +1 -1
- data/lib/data/ca-certificates.crt +3464 -29
- data/lib/recurly.rb +1 -0
- data/lib/recurly/client.rb +217 -111
- data/lib/recurly/client/operations.rb +301 -1
- data/lib/recurly/connection_pool.rb +40 -0
- data/lib/recurly/errors.rb +30 -0
- data/lib/recurly/errors/network_errors.rb +2 -0
- data/lib/recurly/http.rb +13 -8
- data/lib/recurly/pager.rb +31 -12
- data/lib/recurly/requests/add_on_create.rb +15 -3
- data/lib/recurly/requests/add_on_update.rb +9 -1
- data/lib/recurly/requests/billing_info_create.rb +26 -2
- data/lib/recurly/requests/external_transaction.rb +26 -0
- data/lib/recurly/requests/plan_create.rb +8 -0
- data/lib/recurly/requests/plan_update.rb +8 -0
- data/lib/recurly/requests/shipping_method_create.rb +26 -0
- data/lib/recurly/requests/shipping_method_update.rb +26 -0
- data/lib/recurly/requests/subscription_add_on_create.rb +5 -1
- data/lib/recurly/requests/subscription_add_on_tier.rb +18 -0
- data/lib/recurly/requests/subscription_add_on_update.rb +6 -2
- data/lib/recurly/requests/subscription_change_create.rb +1 -1
- data/lib/recurly/requests/tier.rb +18 -0
- data/lib/recurly/resources/add_on.rb +8 -0
- data/lib/recurly/resources/line_item.rb +1 -1
- data/lib/recurly/resources/payment_method.rb +4 -0
- data/lib/recurly/resources/plan.rb +8 -0
- data/lib/recurly/resources/shipping_method.rb +4 -0
- data/lib/recurly/resources/subscription_add_on.rb +12 -0
- data/lib/recurly/resources/subscription_add_on_tier.rb +18 -0
- data/lib/recurly/resources/tier.rb +18 -0
- data/lib/recurly/resources/transaction.rb +4 -0
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +5325 -2782
- data/recurly.gemspec +8 -3
- data/scripts/changelog +2 -0
- data/scripts/format +5 -1
- data/scripts/release +5 -3
- metadata +17 -38
- data/lib/recurly/client/adapter.rb +0 -39
data/recurly.gemspec
CHANGED
@@ -14,6 +14,14 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/recurly/recurly-client-ruby"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
+
spec.metadata = {
|
18
|
+
"bug_tracker_uri" => "#{spec.homepage}/issues",
|
19
|
+
"changelog_uri" => "#{spec.homepage}/blob/master/CHANGELOG.md",
|
20
|
+
"documentation_uri" => "https://recurly.github.io/recurly-client-ruby/",
|
21
|
+
"homepage_uri" => spec.homepage,
|
22
|
+
"source_code_uri" => "#{spec.homepage}/tree/#{spec.version}",
|
23
|
+
}
|
24
|
+
|
17
25
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
26
|
f.match(%r{^(test|spec|features)/})
|
19
27
|
end
|
@@ -21,9 +29,6 @@ Gem::Specification.new do |spec|
|
|
21
29
|
# spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
30
|
spec.require_paths = ["lib"]
|
23
31
|
|
24
|
-
spec.add_dependency "faraday", ">= 0.8.11", "< 1.0.0"
|
25
|
-
|
26
|
-
spec.add_development_dependency "net-http-persistent", "~> 2.9.4"
|
27
32
|
spec.add_development_dependency "bundler", "~> 2.0"
|
28
33
|
spec.add_development_dependency "rake", "~> 12.3.3"
|
29
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
data/scripts/changelog
CHANGED
@@ -6,6 +6,8 @@ if [ -z "$GITHUB_TOKEN" ]; then
|
|
6
6
|
else
|
7
7
|
if [ "$1" == "--pending" ]; then
|
8
8
|
github_changelog_generator -t $GITHUB_TOKEN --unreleased-only -o "$2"
|
9
|
+
elif [ "$1" == "--release-tag" ]; then
|
10
|
+
github_changelog_generator -t $GITHUB_TOKEN --unreleased true --unreleased-label "$2"
|
9
11
|
else
|
10
12
|
github_changelog_generator -t $GITHUB_TOKEN
|
11
13
|
fi
|
data/scripts/format
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
2
|
|
4
3
|
if [ "$1" == "--check" ]; then
|
5
4
|
./bin/rufo . --check
|
5
|
+
RESULT=$?
|
6
|
+
if [ $RESULT != 0 ]; then
|
7
|
+
echo "Code is not properly formatted. Please execute ./scripts/format to autoformat the code."
|
8
|
+
exit $RESULT
|
9
|
+
fi
|
6
10
|
else
|
7
11
|
./bin/rufo . -x
|
8
12
|
fi
|
data/scripts/release
CHANGED
@@ -5,8 +5,8 @@ set -e
|
|
5
5
|
RELEASED_LOG="/tmp/ruby-pending-changes.md"
|
6
6
|
THIS_VERSION=$(./scripts/bump --this-version)
|
7
7
|
|
8
|
-
#
|
9
|
-
./scripts/changelog
|
8
|
+
# Generate the changelog with changes in this release
|
9
|
+
./scripts/changelog --release-tag "$THIS_VERSION"
|
10
10
|
git add CHANGELOG.md
|
11
11
|
git commit -m "Update Changelog for Release $THIS_VERSION"
|
12
12
|
git push origin master
|
@@ -27,4 +27,6 @@ echo ":ruby: Ruby $THIS_VERSION Released :ruby:"
|
|
27
27
|
echo ":rubygems: Rubygems: https://rubygems.org/gems/recurly/versions/$THIS_VERSION"
|
28
28
|
echo "Release: https://github.com/recurly/recurly-client-ruby/releases/tag/$THIS_VERSION"
|
29
29
|
echo "Changelog:"
|
30
|
-
|
30
|
+
echo "\`\`\`"
|
31
|
+
cat "$RELEASED_LOG"
|
32
|
+
echo "\`\`\`"
|
metadata
CHANGED
@@ -1,49 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recurly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: faraday
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.8.11
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.0.0
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.8.11
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.0.0
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: net-http-persistent
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 2.9.4
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 2.9.4
|
47
13
|
- !ruby/object:Gem::Dependency
|
48
14
|
name: bundler
|
49
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,6 +118,7 @@ files:
|
|
152
118
|
- ".bumpversion.cfg"
|
153
119
|
- ".github/ISSUE_TEMPLATE/bug-report.md"
|
154
120
|
- ".github/ISSUE_TEMPLATE/question-or-other.md"
|
121
|
+
- ".github/workflows/docs.yml"
|
155
122
|
- ".github_changelog_generator"
|
156
123
|
- ".gitignore"
|
157
124
|
- ".rspec"
|
@@ -168,8 +135,8 @@ files:
|
|
168
135
|
- lib/data/ca-certificates.crt
|
169
136
|
- lib/recurly.rb
|
170
137
|
- lib/recurly/client.rb
|
171
|
-
- lib/recurly/client/adapter.rb
|
172
138
|
- lib/recurly/client/operations.rb
|
139
|
+
- lib/recurly/connection_pool.rb
|
173
140
|
- lib/recurly/errors.rb
|
174
141
|
- lib/recurly/errors/api_errors.rb
|
175
142
|
- lib/recurly/errors/network_errors.rb
|
@@ -194,6 +161,7 @@ files:
|
|
194
161
|
- lib/recurly/requests/coupon_update.rb
|
195
162
|
- lib/recurly/requests/custom_field.rb
|
196
163
|
- lib/recurly/requests/external_refund.rb
|
164
|
+
- lib/recurly/requests/external_transaction.rb
|
197
165
|
- lib/recurly/requests/invoice_address.rb
|
198
166
|
- lib/recurly/requests/invoice_collect.rb
|
199
167
|
- lib/recurly/requests/invoice_create.rb
|
@@ -212,8 +180,11 @@ files:
|
|
212
180
|
- lib/recurly/requests/shipping_address_create.rb
|
213
181
|
- lib/recurly/requests/shipping_address_update.rb
|
214
182
|
- lib/recurly/requests/shipping_fee_create.rb
|
183
|
+
- lib/recurly/requests/shipping_method_create.rb
|
184
|
+
- lib/recurly/requests/shipping_method_update.rb
|
215
185
|
- lib/recurly/requests/shipping_purchase.rb
|
216
186
|
- lib/recurly/requests/subscription_add_on_create.rb
|
187
|
+
- lib/recurly/requests/subscription_add_on_tier.rb
|
217
188
|
- lib/recurly/requests/subscription_add_on_update.rb
|
218
189
|
- lib/recurly/requests/subscription_cancel.rb
|
219
190
|
- lib/recurly/requests/subscription_change_create.rb
|
@@ -225,6 +196,7 @@ files:
|
|
225
196
|
- lib/recurly/requests/subscription_shipping_purchase.rb
|
226
197
|
- lib/recurly/requests/subscription_shipping_update.rb
|
227
198
|
- lib/recurly/requests/subscription_update.rb
|
199
|
+
- lib/recurly/requests/tier.rb
|
228
200
|
- lib/recurly/resource.rb
|
229
201
|
- lib/recurly/resources.rb
|
230
202
|
- lib/recurly/resources/account.rb
|
@@ -275,9 +247,11 @@ files:
|
|
275
247
|
- lib/recurly/resources/site.rb
|
276
248
|
- lib/recurly/resources/subscription.rb
|
277
249
|
- lib/recurly/resources/subscription_add_on.rb
|
250
|
+
- lib/recurly/resources/subscription_add_on_tier.rb
|
278
251
|
- lib/recurly/resources/subscription_change.rb
|
279
252
|
- lib/recurly/resources/subscription_shipping.rb
|
280
253
|
- lib/recurly/resources/tax_info.rb
|
254
|
+
- lib/recurly/resources/tier.rb
|
281
255
|
- lib/recurly/resources/transaction.rb
|
282
256
|
- lib/recurly/resources/transaction_error.rb
|
283
257
|
- lib/recurly/resources/transaction_payment_gateway.rb
|
@@ -304,7 +278,12 @@ files:
|
|
304
278
|
homepage: https://github.com/recurly/recurly-client-ruby
|
305
279
|
licenses:
|
306
280
|
- MIT
|
307
|
-
metadata:
|
281
|
+
metadata:
|
282
|
+
bug_tracker_uri: https://github.com/recurly/recurly-client-ruby/issues
|
283
|
+
changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
|
284
|
+
documentation_uri: https://recurly.github.io/recurly-client-ruby/
|
285
|
+
homepage_uri: https://github.com/recurly/recurly-client-ruby
|
286
|
+
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.7.0
|
308
287
|
post_install_message:
|
309
288
|
rdoc_options: []
|
310
289
|
require_paths:
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require "openssl"
|
2
|
-
|
3
|
-
module Recurly
|
4
|
-
class Client
|
5
|
-
module NetHttpPersistentAdapter
|
6
|
-
protected
|
7
|
-
|
8
|
-
def configure_net_adapter(faraday)
|
9
|
-
faraday.adapter :net_http_persistent do |http|
|
10
|
-
# yields Net::HTTP::Persistent
|
11
|
-
# for net-http-persistent 2.X, alternative is for 3.X
|
12
|
-
if http.respond_to? :keep_alive_timeout
|
13
|
-
http.keep_alive_timeout = 60
|
14
|
-
else
|
15
|
-
http.keep_alive = 60
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
module NetHttpAdapter
|
22
|
-
protected
|
23
|
-
|
24
|
-
def configure_net_adapter(faraday)
|
25
|
-
faraday.adapter :net_http do |http|
|
26
|
-
# yields Net::HTTP
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
include NetHttpAdapter
|
32
|
-
|
33
|
-
begin
|
34
|
-
require "net/http/persistent"
|
35
|
-
include NetHttpPersistentAdapter
|
36
|
-
rescue LoadError
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|