recurly 3.17.0 → 4.1.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 +1 -1
- data/.changelog_config.yaml +11 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +97 -350
- data/GETTING_STARTED.md +20 -17
- data/lib/recurly/client.rb +45 -20
- data/lib/recurly/client/operations.rb +770 -549
- data/lib/recurly/errors.rb +5 -22
- data/lib/recurly/errors/api_errors.rb +3 -0
- data/lib/recurly/errors/network_errors.rb +1 -4
- data/lib/recurly/pager.rb +5 -15
- data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
- data/lib/recurly/requests/account_create.rb +2 -2
- data/lib/recurly/requests/account_purchase.rb +2 -2
- data/lib/recurly/requests/add_on_create.rb +4 -4
- data/lib/recurly/requests/add_on_pricing.rb +5 -1
- data/lib/recurly/requests/add_on_update.rb +4 -4
- data/lib/recurly/requests/address.rb +0 -8
- data/lib/recurly/requests/billing_info_create.rb +5 -25
- data/lib/recurly/requests/coupon_create.rb +1 -1
- data/lib/recurly/requests/coupon_redemption_create.rb +4 -0
- data/lib/recurly/requests/external_transaction.rb +1 -1
- data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
- data/lib/recurly/requests/line_item_create.rb +1 -1
- data/lib/recurly/requests/subscription_add_on_create.rb +6 -2
- data/lib/recurly/requests/subscription_add_on_tier.rb +5 -1
- 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/subscription_create.rb +3 -3
- data/lib/recurly/requests/subscription_purchase.rb +1 -1
- data/lib/recurly/requests/tier.rb +7 -3
- data/lib/recurly/requests/tier_pricing.rb +22 -0
- data/lib/recurly/resources/add_on.rb +1 -1
- data/lib/recurly/resources/add_on_pricing.rb +5 -1
- data/lib/recurly/resources/address.rb +0 -8
- data/lib/recurly/resources/address_with_name.rb +46 -0
- data/lib/recurly/resources/billing_info.rb +4 -0
- data/lib/recurly/resources/coupon.rb +5 -17
- data/lib/recurly/resources/coupon_redemption.rb +4 -0
- data/lib/recurly/resources/invoice.rb +6 -2
- data/lib/recurly/resources/line_item.rb +4 -0
- data/lib/recurly/resources/plan.rb +1 -1
- data/lib/recurly/resources/subscription_add_on.rb +6 -2
- data/lib/recurly/resources/subscription_add_on_tier.rb +5 -1
- data/lib/recurly/resources/subscription_change.rb +0 -4
- data/lib/recurly/resources/tier.rb +7 -3
- data/lib/recurly/resources/tier_pricing.rb +22 -0
- data/lib/recurly/resources/transaction.rb +6 -2
- data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
- data/lib/recurly/resources/usage.rb +5 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +1917 -1860
- data/scripts/build +2 -2
- data/scripts/format +2 -2
- data/scripts/prepare-release +43 -29
- data/scripts/release +5 -20
- metadata +13 -13
- data/.github_changelog_generator +0 -8
- data/lib/recurly/resources/line_item_list.rb +0 -26
- data/lib/recurly/resources/subscription_change_preview.rb +0 -78
- data/scripts/bump +0 -11
- data/scripts/changelog +0 -14
data/scripts/build
CHANGED
data/scripts/format
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
if [ "$1" == "--check" ]; then
|
4
|
-
|
4
|
+
bundle exec rufo . --check
|
5
5
|
RESULT=$?
|
6
6
|
if [ $RESULT != 0 ]; then
|
7
7
|
echo "Code is not properly formatted. Please execute ./scripts/format to autoformat the code."
|
8
8
|
exit $RESULT
|
9
9
|
fi
|
10
10
|
else
|
11
|
-
|
11
|
+
bundle exec rufo . -x
|
12
12
|
fi
|
data/scripts/prepare-release
CHANGED
@@ -1,36 +1,50 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
# major,minor,patch
|
5
|
-
PART=${1}
|
6
|
-
NEXT_VERSION=$(./scripts/bump --next-version "$PART")
|
7
|
-
UNRELEASED_LOG="/tmp/ruby-pending-changes.md"
|
8
|
-
|
9
|
-
if [ -z "$NEXT_VERSION" ]; then
|
10
|
-
echo "Failed to get next version"
|
11
|
-
else
|
12
|
-
# Generate pending changes in tmpfile
|
13
|
-
./scripts/changelog --pending $UNRELEASED_LOG
|
14
|
-
# Add a git message header of Release X.Y.Z
|
15
|
-
printf "Release %s\n\n$(cat $UNRELEASED_LOG)" "$NEXT_VERSION" > $UNRELEASED_LOG
|
16
|
-
# Delete credit line
|
17
|
-
sed -i '' -e '$ d' $UNRELEASED_LOG
|
18
|
-
|
19
|
-
git checkout -b "release-$NEXT_VERSION"
|
20
2
|
|
21
|
-
|
22
|
-
|
3
|
+
# Usage
|
4
|
+
#
|
5
|
+
# ./prepare-release major|minor|patch [--notes-out <path>] [--tag-out <path>]
|
6
|
+
#
|
23
7
|
|
24
|
-
|
25
|
-
./scripts/build
|
8
|
+
set -e
|
26
9
|
|
27
|
-
|
28
|
-
|
29
|
-
|
10
|
+
if [ -n "$(git status --porcelain)" ]; then
|
11
|
+
echo "Working directory is not clean. Aborting."
|
12
|
+
exit 1
|
13
|
+
fi
|
30
14
|
|
31
|
-
|
32
|
-
|
15
|
+
if [ -z "$GITHUB_TOKEN" ]; then
|
16
|
+
echo "GITHUB_TOKEN must be set. Aborting."
|
17
|
+
exit 1
|
18
|
+
fi
|
33
19
|
|
34
|
-
|
35
|
-
|
20
|
+
# Bump version
|
21
|
+
# major|minor|patch
|
22
|
+
part=${1}
|
23
|
+
if [ "$part" != "patch" ] && [ "$part" != "minor" ] && [ "$part" != "major" ]; then
|
24
|
+
echo "'$part' is not a valid option: major|minor|patch"
|
25
|
+
exit 1
|
36
26
|
fi
|
27
|
+
new_version=$(bump2version --list "$part" | grep new_version | cut -d "=" -f 2)
|
28
|
+
|
29
|
+
# Generate Changelog
|
30
|
+
changelogly --future-release "$new_version"
|
31
|
+
|
32
|
+
while [[ "$#" -gt 0 ]]; do
|
33
|
+
case $1 in
|
34
|
+
# Create release notes artifact
|
35
|
+
-n|--notes-out)
|
36
|
+
echo "$new_version
|
37
|
+
|
38
|
+
$(
|
39
|
+
cat CHANGELOG.md | sed -n "/^## \[$new_version\]/,/^##/p" | sed '$d;1d'
|
40
|
+
)" | awk '{$1=$1};1' > $2
|
41
|
+
shift
|
42
|
+
;;
|
43
|
+
|
44
|
+
# Create release notes artifact
|
45
|
+
-t|--tag-out)
|
46
|
+
echo "$new_version" > $2
|
47
|
+
;;
|
48
|
+
esac
|
49
|
+
shift
|
50
|
+
done
|
data/scripts/release
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
2
|
|
4
|
-
|
5
|
-
RELEASED_LOG="/tmp/ruby-pending-changes.md"
|
6
|
-
THIS_VERSION=$(./scripts/bump --this-version)
|
3
|
+
set -e
|
7
4
|
|
8
|
-
#
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
git push origin master
|
5
|
+
# Usage
|
6
|
+
#
|
7
|
+
# ./release
|
8
|
+
#
|
13
9
|
|
14
10
|
# publish
|
15
11
|
# Clean up any leftover gems
|
@@ -19,14 +15,3 @@ gem build recurly.gemspec
|
|
19
15
|
# Push what should be the only gem present
|
20
16
|
gem push ./*.gem
|
21
17
|
|
22
|
-
# create release
|
23
|
-
hub release create -c -F "$RELEASED_LOG" "$THIS_VERSION"
|
24
|
-
|
25
|
-
# Copy-pasteable messages for announcments
|
26
|
-
echo ":ruby: Ruby $THIS_VERSION Released :ruby:"
|
27
|
-
echo ":rubygems: Rubygems: https://rubygems.org/gems/recurly/versions/$THIS_VERSION"
|
28
|
-
echo "Release: https://github.com/recurly/recurly-client-ruby/releases/tag/$THIS_VERSION"
|
29
|
-
echo "Changelog:"
|
30
|
-
echo "\`\`\`"
|
31
|
-
cat "$RELEASED_LOG"
|
32
|
-
echo "\`\`\`"
|
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:
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -116,10 +116,10 @@ extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- ".bumpversion.cfg"
|
119
|
+
- ".changelog_config.yaml"
|
119
120
|
- ".github/ISSUE_TEMPLATE/bug-report.md"
|
120
121
|
- ".github/ISSUE_TEMPLATE/question-or-other.md"
|
121
122
|
- ".github/workflows/docs.yml"
|
122
|
-
- ".github_changelog_generator"
|
123
123
|
- ".gitignore"
|
124
124
|
- ".rspec"
|
125
125
|
- ".travis.yml"
|
@@ -146,7 +146,7 @@ files:
|
|
146
146
|
- lib/recurly/request.rb
|
147
147
|
- lib/recurly/requests.rb
|
148
148
|
- lib/recurly/requests/account_acquisition_cost.rb
|
149
|
-
- lib/recurly/requests/
|
149
|
+
- lib/recurly/requests/account_acquisition_update.rb
|
150
150
|
- lib/recurly/requests/account_create.rb
|
151
151
|
- lib/recurly/requests/account_purchase.rb
|
152
152
|
- lib/recurly/requests/account_update.rb
|
@@ -167,7 +167,7 @@ files:
|
|
167
167
|
- lib/recurly/requests/invoice_collect.rb
|
168
168
|
- lib/recurly/requests/invoice_create.rb
|
169
169
|
- lib/recurly/requests/invoice_refund.rb
|
170
|
-
- lib/recurly/requests/
|
170
|
+
- lib/recurly/requests/invoice_update.rb
|
171
171
|
- lib/recurly/requests/item_create.rb
|
172
172
|
- lib/recurly/requests/item_update.rb
|
173
173
|
- lib/recurly/requests/line_item_create.rb
|
@@ -200,6 +200,7 @@ files:
|
|
200
200
|
- lib/recurly/requests/subscription_shipping_update.rb
|
201
201
|
- lib/recurly/requests/subscription_update.rb
|
202
202
|
- lib/recurly/requests/tier.rb
|
203
|
+
- lib/recurly/requests/tier_pricing.rb
|
203
204
|
- lib/recurly/requests/usage_create.rb
|
204
205
|
- lib/recurly/resource.rb
|
205
206
|
- lib/recurly/resources.rb
|
@@ -214,6 +215,7 @@ files:
|
|
214
215
|
- lib/recurly/resources/add_on_mini.rb
|
215
216
|
- lib/recurly/resources/add_on_pricing.rb
|
216
217
|
- lib/recurly/resources/address.rb
|
218
|
+
- lib/recurly/resources/address_with_name.rb
|
217
219
|
- lib/recurly/resources/billing_info.rb
|
218
220
|
- lib/recurly/resources/billing_info_updated_by.rb
|
219
221
|
- lib/recurly/resources/binary_file.rb
|
@@ -240,7 +242,6 @@ files:
|
|
240
242
|
- lib/recurly/resources/item.rb
|
241
243
|
- lib/recurly/resources/item_mini.rb
|
242
244
|
- lib/recurly/resources/line_item.rb
|
243
|
-
- lib/recurly/resources/line_item_list.rb
|
244
245
|
- lib/recurly/resources/measured_unit.rb
|
245
246
|
- lib/recurly/resources/payment_method.rb
|
246
247
|
- lib/recurly/resources/plan.rb
|
@@ -257,14 +258,15 @@ files:
|
|
257
258
|
- lib/recurly/resources/subscription_add_on.rb
|
258
259
|
- lib/recurly/resources/subscription_add_on_tier.rb
|
259
260
|
- lib/recurly/resources/subscription_change.rb
|
260
|
-
- lib/recurly/resources/subscription_change_preview.rb
|
261
261
|
- lib/recurly/resources/subscription_shipping.rb
|
262
262
|
- lib/recurly/resources/tax_info.rb
|
263
263
|
- lib/recurly/resources/tier.rb
|
264
|
+
- lib/recurly/resources/tier_pricing.rb
|
264
265
|
- lib/recurly/resources/transaction.rb
|
265
266
|
- lib/recurly/resources/transaction_error.rb
|
266
267
|
- lib/recurly/resources/transaction_payment_gateway.rb
|
267
268
|
- lib/recurly/resources/unique_coupon_code.rb
|
269
|
+
- lib/recurly/resources/unique_coupon_code_params.rb
|
268
270
|
- lib/recurly/resources/usage.rb
|
269
271
|
- lib/recurly/resources/user.rb
|
270
272
|
- lib/recurly/schema.rb
|
@@ -278,8 +280,6 @@ files:
|
|
278
280
|
- openapi/api.yaml
|
279
281
|
- recurly.gemspec
|
280
282
|
- scripts/build
|
281
|
-
- scripts/bump
|
282
|
-
- scripts/changelog
|
283
283
|
- scripts/clean
|
284
284
|
- scripts/format
|
285
285
|
- scripts/prepare-release
|
@@ -293,8 +293,8 @@ metadata:
|
|
293
293
|
changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
|
294
294
|
documentation_uri: https://recurly.github.io/recurly-client-ruby/
|
295
295
|
homepage_uri: https://github.com/recurly/recurly-client-ruby
|
296
|
-
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/
|
297
|
-
post_install_message:
|
296
|
+
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.1.0
|
297
|
+
post_install_message:
|
298
298
|
rdoc_options: []
|
299
299
|
require_paths:
|
300
300
|
- lib
|
@@ -310,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
310
310
|
version: '0'
|
311
311
|
requirements: []
|
312
312
|
rubygems_version: 3.0.3
|
313
|
-
signing_key:
|
313
|
+
signing_key:
|
314
314
|
specification_version: 4
|
315
315
|
summary: The ruby client for Recurly's V3 API
|
316
316
|
test_files: []
|
data/.github_changelog_generator
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# This file is automatically created by Recurly's OpenAPI generation process
|
2
|
-
# and thus any edits you make by hand will be lost. If you wish to make a
|
3
|
-
# change to this file, please create a Github issue explaining the changes you
|
4
|
-
# need and we will usher them to the appropriate places.
|
5
|
-
module Recurly
|
6
|
-
module Resources
|
7
|
-
class LineItemList < Resource
|
8
|
-
|
9
|
-
# @!attribute data
|
10
|
-
# @return [Array[LineItem]]
|
11
|
-
define_attribute :data, Array, { :item_type => :LineItem }
|
12
|
-
|
13
|
-
# @!attribute has_more
|
14
|
-
# @return [Boolean] Indicates there are more results on subsequent pages.
|
15
|
-
define_attribute :has_more, :Boolean
|
16
|
-
|
17
|
-
# @!attribute next
|
18
|
-
# @return [String] Path to subsequent page of results.
|
19
|
-
define_attribute :next, String
|
20
|
-
|
21
|
-
# @!attribute object
|
22
|
-
# @return [String] Will always be List.
|
23
|
-
define_attribute :object, String
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# This file is automatically created by Recurly's OpenAPI generation process
|
2
|
-
# and thus any edits you make by hand will be lost. If you wish to make a
|
3
|
-
# change to this file, please create a Github issue explaining the changes you
|
4
|
-
# need and we will usher them to the appropriate places.
|
5
|
-
module Recurly
|
6
|
-
module Resources
|
7
|
-
class SubscriptionChangePreview < Resource
|
8
|
-
|
9
|
-
# @!attribute activate_at
|
10
|
-
# @return [DateTime] Activated at
|
11
|
-
define_attribute :activate_at, DateTime
|
12
|
-
|
13
|
-
# @!attribute activated
|
14
|
-
# @return [Boolean] Returns `true` if the subscription change is activated.
|
15
|
-
define_attribute :activated, :Boolean
|
16
|
-
|
17
|
-
# @!attribute add_ons
|
18
|
-
# @return [Array[SubscriptionAddOn]] These add-ons will be used when the subscription renews.
|
19
|
-
define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
|
20
|
-
|
21
|
-
# @!attribute created_at
|
22
|
-
# @return [DateTime] Created at
|
23
|
-
define_attribute :created_at, DateTime
|
24
|
-
|
25
|
-
# @!attribute custom_fields
|
26
|
-
# @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
|
27
|
-
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
28
|
-
|
29
|
-
# @!attribute deleted_at
|
30
|
-
# @return [DateTime] Deleted at
|
31
|
-
define_attribute :deleted_at, DateTime
|
32
|
-
|
33
|
-
# @!attribute id
|
34
|
-
# @return [String] The ID of the Subscription Change.
|
35
|
-
define_attribute :id, String
|
36
|
-
|
37
|
-
# @!attribute invoice_collection
|
38
|
-
# @return [InvoiceCollection] Invoice Collection
|
39
|
-
define_attribute :invoice_collection, :InvoiceCollection
|
40
|
-
|
41
|
-
# @!attribute object
|
42
|
-
# @return [String] Object type
|
43
|
-
define_attribute :object, String
|
44
|
-
|
45
|
-
# @!attribute plan
|
46
|
-
# @return [PlanMini] Just the important parts.
|
47
|
-
define_attribute :plan, :PlanMini
|
48
|
-
|
49
|
-
# @!attribute quantity
|
50
|
-
# @return [Integer] Subscription quantity
|
51
|
-
define_attribute :quantity, Integer
|
52
|
-
|
53
|
-
# @!attribute revenue_schedule_type
|
54
|
-
# @return [String] Revenue schedule type
|
55
|
-
define_attribute :revenue_schedule_type, String
|
56
|
-
|
57
|
-
# @!attribute setup_fee_revenue_schedule_type
|
58
|
-
# @return [String] Setup fee revenue schedule type
|
59
|
-
define_attribute :setup_fee_revenue_schedule_type, String
|
60
|
-
|
61
|
-
# @!attribute shipping
|
62
|
-
# @return [SubscriptionShipping] Subscription shipping details
|
63
|
-
define_attribute :shipping, :SubscriptionShipping
|
64
|
-
|
65
|
-
# @!attribute subscription_id
|
66
|
-
# @return [String] The ID of the subscription that is going to be changed.
|
67
|
-
define_attribute :subscription_id, String
|
68
|
-
|
69
|
-
# @!attribute unit_amount
|
70
|
-
# @return [Float] Unit amount
|
71
|
-
define_attribute :unit_amount, Float
|
72
|
-
|
73
|
-
# @!attribute updated_at
|
74
|
-
# @return [DateTime] Updated at
|
75
|
-
define_attribute :updated_at, DateTime
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
data/scripts/bump
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
if [ "$1" == "--next-version" ]; then
|
5
|
-
shift
|
6
|
-
bump2version --dry-run --list "$@" | grep new_version | cut -d "=" -f 2
|
7
|
-
elif [ "$1" == "--this-version" ]; then
|
8
|
-
grep current_version .bumpversion.cfg | awk -F" = " '{print $2}'
|
9
|
-
else
|
10
|
-
bump2version "$@"
|
11
|
-
fi
|
data/scripts/changelog
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
if [ -z "$GITHUB_TOKEN" ]; then
|
5
|
-
echo "Environment variable GITHUB_TOKEN must be set"
|
6
|
-
else
|
7
|
-
if [ "$1" == "--pending" ]; then
|
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"
|
11
|
-
else
|
12
|
-
github_changelog_generator -t $GITHUB_TOKEN
|
13
|
-
fi
|
14
|
-
fi
|