recurly 3.18.1 → 3.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.changelog_config.yaml +11 -0
  4. data/.github/workflows/docs.yml +1 -1
  5. data/.travis.yml +2 -0
  6. data/CHANGELOG.md +231 -163
  7. data/GETTING_STARTED.md +1 -1
  8. data/lib/recurly/client/operations.rb +212 -134
  9. data/lib/recurly/client.rb +5 -3
  10. data/lib/recurly/errors/api_errors.rb +2 -0
  11. data/lib/recurly/pager.rb +1 -1
  12. data/lib/recurly/requests/account_create.rb +4 -0
  13. data/lib/recurly/requests/account_purchase.rb +4 -0
  14. data/lib/recurly/requests/account_update.rb +4 -0
  15. data/lib/recurly/requests/add_on_create.rb +3 -3
  16. data/lib/recurly/requests/add_on_pricing.rb +4 -0
  17. data/lib/recurly/requests/add_on_update.rb +1 -1
  18. data/lib/recurly/requests/address.rb +1 -1
  19. data/lib/recurly/requests/billing_info_create.rb +6 -2
  20. data/lib/recurly/requests/billing_info_verify.rb +14 -0
  21. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +18 -0
  22. data/lib/recurly/requests/invoice_address.rb +1 -1
  23. data/lib/recurly/requests/invoice_collect.rb +1 -1
  24. data/lib/recurly/requests/line_item_create.rb +6 -2
  25. data/lib/recurly/requests/plan_create.rb +4 -0
  26. data/lib/recurly/requests/plan_pricing.rb +4 -0
  27. data/lib/recurly/requests/plan_update.rb +4 -0
  28. data/lib/recurly/requests/pricing.rb +4 -0
  29. data/lib/recurly/requests/purchase_create.rb +1 -1
  30. data/lib/recurly/requests/shipping_address_create.rb +1 -1
  31. data/lib/recurly/requests/shipping_address_update.rb +1 -1
  32. data/lib/recurly/requests/subscription_change_billing_info_create.rb +14 -0
  33. data/lib/recurly/requests/subscription_change_create.rb +8 -0
  34. data/lib/recurly/requests/subscription_create.rb +6 -2
  35. data/lib/recurly/requests/subscription_pause.rb +1 -1
  36. data/lib/recurly/requests/subscription_purchase.rb +6 -2
  37. data/lib/recurly/requests/subscription_update.rb +5 -1
  38. data/lib/recurly/resources/account.rb +4 -0
  39. data/lib/recurly/resources/account_mini.rb +4 -0
  40. data/lib/recurly/resources/add_on_pricing.rb +4 -0
  41. data/lib/recurly/resources/address.rb +1 -1
  42. data/lib/recurly/resources/billing_info.rb +5 -1
  43. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  44. data/lib/recurly/resources/dunning_campaign.rb +50 -0
  45. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +18 -0
  46. data/lib/recurly/resources/dunning_cycle.rb +58 -0
  47. data/lib/recurly/resources/dunning_interval.rb +18 -0
  48. data/lib/recurly/resources/invoice.rb +6 -2
  49. data/lib/recurly/resources/invoice_address.rb +1 -1
  50. data/lib/recurly/resources/line_item.rb +7 -3
  51. data/lib/recurly/resources/payment_method.rb +4 -0
  52. data/lib/recurly/resources/plan.rb +4 -0
  53. data/lib/recurly/resources/plan_pricing.rb +4 -0
  54. data/lib/recurly/resources/pricing.rb +4 -0
  55. data/lib/recurly/resources/shipping_address.rb +1 -1
  56. data/lib/recurly/resources/subscription.rb +4 -0
  57. data/lib/recurly/resources/subscription_change.rb +8 -0
  58. data/lib/recurly/resources/subscription_change_billing_info.rb +14 -0
  59. data/lib/recurly/resources/subscription_change_preview.rb +8 -0
  60. data/lib/recurly/resources/tax_detail.rb +26 -0
  61. data/lib/recurly/resources/tax_info.rb +4 -0
  62. data/lib/recurly/resources/transaction.rb +5 -1
  63. data/lib/recurly/version.rb +1 -1
  64. data/openapi/api.yaml +796 -122
  65. data/scripts/build +2 -2
  66. data/scripts/format +2 -2
  67. data/scripts/prepare-release +43 -29
  68. data/scripts/release +5 -20
  69. metadata +16 -9
  70. data/.github_changelog_generator +0 -8
  71. data/scripts/bump +0 -11
  72. data/scripts/changelog +0 -14
data/scripts/build CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- bundle install --binstubs --quiet
5
- ./bin/yard --quiet
4
+ bundle install --quiet
5
+ bundle exec yard --quiet
data/scripts/format CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  if [ "$1" == "--check" ]; then
4
- ./bin/rufo . --check
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
- ./bin/rufo . -x
11
+ bundle exec rufo . -x
12
12
  fi
@@ -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
- # Actually bump the version
22
- ./scripts/bump "$PART"
3
+ # Usage
4
+ #
5
+ # ./prepare-release major|minor|patch [--notes-out <path>] [--tag-out <path>]
6
+ #
23
7
 
24
- # Rebuild docs
25
- ./scripts/build
8
+ set -e
26
9
 
27
- # Make the commit
28
- git add . --all
29
- git commit -F "$UNRELEASED_LOG"
10
+ if [ -n "$(git status --porcelain)" ]; then
11
+ echo "Working directory is not clean. Aborting."
12
+ exit 1
13
+ fi
30
14
 
31
- # Push up this branch for PR
32
- git push origin "release-$NEXT_VERSION"
15
+ if [ -z "$GITHUB_TOKEN" ]; then
16
+ echo "GITHUB_TOKEN must be set. Aborting."
17
+ exit 1
18
+ fi
33
19
 
34
- # Create PR
35
- hub pull-request -c -F "$UNRELEASED_LOG"
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
- # TODO this file could be gone
5
- RELEASED_LOG="/tmp/ruby-pending-changes.md"
6
- THIS_VERSION=$(./scripts/bump --this-version)
3
+ set -e
7
4
 
8
- # Generate the changelog with changes in this release
9
- ./scripts/changelog --release-tag "$THIS_VERSION"
10
- git add CHANGELOG.md
11
- git commit -m "Update Changelog for Release $THIS_VERSION"
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: 3.18.1
4
+ version: 3.19.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: 2021-02-22 00:00:00.000000000 Z
11
+ date: 2022-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"
@@ -155,12 +155,14 @@ files:
155
155
  - lib/recurly/requests/add_on_update.rb
156
156
  - lib/recurly/requests/address.rb
157
157
  - lib/recurly/requests/billing_info_create.rb
158
+ - lib/recurly/requests/billing_info_verify.rb
158
159
  - lib/recurly/requests/coupon_bulk_create.rb
159
160
  - lib/recurly/requests/coupon_create.rb
160
161
  - lib/recurly/requests/coupon_pricing.rb
161
162
  - lib/recurly/requests/coupon_redemption_create.rb
162
163
  - lib/recurly/requests/coupon_update.rb
163
164
  - lib/recurly/requests/custom_field.rb
165
+ - lib/recurly/requests/dunning_campaigns_bulk_update.rb
164
166
  - lib/recurly/requests/external_refund.rb
165
167
  - lib/recurly/requests/external_transaction.rb
166
168
  - lib/recurly/requests/invoice_address.rb
@@ -190,6 +192,7 @@ files:
190
192
  - lib/recurly/requests/subscription_add_on_tier.rb
191
193
  - lib/recurly/requests/subscription_add_on_update.rb
192
194
  - lib/recurly/requests/subscription_cancel.rb
195
+ - lib/recurly/requests/subscription_change_billing_info_create.rb
193
196
  - lib/recurly/requests/subscription_change_create.rb
194
197
  - lib/recurly/requests/subscription_change_shipping_create.rb
195
198
  - lib/recurly/requests/subscription_create.rb
@@ -227,6 +230,10 @@ files:
227
230
  - lib/recurly/resources/credit_payment.rb
228
231
  - lib/recurly/resources/custom_field.rb
229
232
  - lib/recurly/resources/custom_field_definition.rb
233
+ - lib/recurly/resources/dunning_campaign.rb
234
+ - lib/recurly/resources/dunning_campaigns_bulk_update_response.rb
235
+ - lib/recurly/resources/dunning_cycle.rb
236
+ - lib/recurly/resources/dunning_interval.rb
230
237
  - lib/recurly/resources/error.rb
231
238
  - lib/recurly/resources/error_may_have_transaction.rb
232
239
  - lib/recurly/resources/export_dates.rb
@@ -257,8 +264,10 @@ files:
257
264
  - lib/recurly/resources/subscription_add_on.rb
258
265
  - lib/recurly/resources/subscription_add_on_tier.rb
259
266
  - lib/recurly/resources/subscription_change.rb
267
+ - lib/recurly/resources/subscription_change_billing_info.rb
260
268
  - lib/recurly/resources/subscription_change_preview.rb
261
269
  - lib/recurly/resources/subscription_shipping.rb
270
+ - lib/recurly/resources/tax_detail.rb
262
271
  - lib/recurly/resources/tax_info.rb
263
272
  - lib/recurly/resources/tier.rb
264
273
  - lib/recurly/resources/transaction.rb
@@ -278,8 +287,6 @@ files:
278
287
  - openapi/api.yaml
279
288
  - recurly.gemspec
280
289
  - scripts/build
281
- - scripts/bump
282
- - scripts/changelog
283
290
  - scripts/clean
284
291
  - scripts/format
285
292
  - scripts/prepare-release
@@ -293,8 +300,8 @@ metadata:
293
300
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
294
301
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
295
302
  homepage_uri: https://github.com/recurly/recurly-client-ruby
296
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.18.1
297
- post_install_message:
303
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.19.0
304
+ post_install_message:
298
305
  rdoc_options: []
299
306
  require_paths:
300
307
  - lib
@@ -310,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
317
  version: '0'
311
318
  requirements: []
312
319
  rubygems_version: 3.0.3
313
- signing_key:
320
+ signing_key:
314
321
  specification_version: 4
315
322
  summary: The ruby client for Recurly's V3 API
316
323
  test_files: []
@@ -1,8 +0,0 @@
1
- user=recurly
2
- project=recurly-client-ruby
3
- unreleased=false
4
- exclude-labels=question,bug?,duplicate,V2
5
- exclude-tags-regex=^[^3]+\..*
6
- issues-wo-labels=false
7
- verbose=false
8
- since-tag=3.0.0.beta.1
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