Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1514

Merged
merged 22 commits into from
Jan 18, 2025
Merged
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
467e034
Update generated code for v1439
stripe-openapi[bot] Jan 10, 2025
463efa5
Update generated code for v1441
stripe-openapi[bot] Jan 10, 2025
da19166
pinned the ubuntu version in the Test action, to ensure support for j…
jar-stripe Jan 13, 2025
36b1c7c
ThinEvent reason and livemode (#1516)
jar-stripe Jan 13, 2025
80c41a7
Merge upstream and update generated code for v1441
stripe-openapi[bot] Jan 13, 2025
6e39505
Import global configuration for options not available on StripeClient…
helenye-stripe Jan 13, 2025
57dd25a
Bump version to 13.3.1
helenye-stripe Jan 13, 2025
7daac5c
Merge upstream and update generated code for v1442
stripe-openapi[bot] Jan 14, 2025
9d54b5c
Update generated code for v1443
stripe-openapi[bot] Jan 14, 2025
39283a3
Update generated code for v1444
stripe-openapi[bot] Jan 14, 2025
f21e023
Update generated code for v1446
stripe-openapi[bot] Jan 14, 2025
4c7a289
Update generated code for v1448
stripe-openapi[bot] Jan 15, 2025
ef7e6ee
added CONTRIBUTING.md file (#1515)
jar-stripe Jan 15, 2025
c1ca972
Merge upstream and update generated code for v1448
stripe-openapi[bot] Jan 15, 2025
7ec394e
Update generated code for v1449
stripe-openapi[bot] Jan 15, 2025
1402ac7
Update generated code for v1450
stripe-openapi[bot] Jan 15, 2025
08020d3
add justfile (#1513)
xavdid-stripe Jan 16, 2025
b03b022
Fixed typos in CONTRIBUTING.MD (#1519)
jar-stripe Jan 17, 2025
5304640
pipe rubocop output to devnull (#1521)
xavdid-stripe Jan 17, 2025
43e3ecd
Merge upstream and update generated code for v1453
stripe-openapi[bot] Jan 17, 2025
1e9681f
Update generated code for v1454
stripe-openapi[bot] Jan 17, 2025
d9118a2
added CONTRIBUTING.md
jar-stripe Jan 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -20,16 +20,17 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: extractions/setup-just@v2
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Lint
run: bundle install && bundle exec rake rubocop
run: just lint
- name: Build
run: gem build stripe.gemspec
- name: 'Upload Artifact'
@@ -40,20 +41,21 @@ jobs:

test:
name: Test (${{ matrix.ruby-version }})
# this is needed because our JRuby test version isnt supported on ubuntu-24 (which is now ubuntu-latest)
# this version of jruby isn't available in the new latest (24.04) so we have to pin (or update jruby)
runs-on: ubuntu-22.04
strategy:
matrix:
ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, '3.3', jruby-9.4.0.0, truffleruby-head]
steps:
- uses: extractions/setup-just@v2
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- uses: stripe/openapi/actions/stripe-mock@master
- name: test
run: make ci-test
run: just test typecheck
env:
GITHUB_TOKEN: ${{ secrets.github_token }}

@@ -64,7 +66,7 @@ jobs:
startsWith(github.ref, 'refs/tags/v') &&
endsWith(github.actor, '-stripe')
needs: [build, test]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# NOTE: this file is deprecated and slated for deletion; prefer using the equivalent `just` commands.

.PHONY: update-version codegen-format test ci-test
update-version:
@echo "$(VERSION)" > VERSION
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1450
v1453
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -364,19 +364,20 @@ New features and bug fixes are released on the latest major version of the Strip

[Contribution guidelines for this project](CONTRIBUTING.md)

The test suite depends on [stripe-mock], so make sure to fetch and run it from a
background terminal ([stripe-mock's README][stripe-mock] also contains
instructions for installing via Homebrew and other methods):
The test suite depends on [stripe-mock], so make sure to fetch and run it from a background terminal ([stripe-mock's README][stripe-mock] also contains instructions for installing via Homebrew and other methods):

```sh
go install github.com/stripe/stripe-mock@latest
stripe-mock
```

We use [just](https://github.com/casey/just) for common development tasks. You can install it or run the underlying commands directly (by copying them from the `justfile`). Common tasks include:

Run all tests:

```sh
bundle exec rake test
just test
# or: bundle exec rake test
```

Run a single test suite:
@@ -394,13 +395,15 @@ bundle exec ruby -Ilib/ test/stripe/util_test.rb -n /should.convert.names.to.sym
Run the linter:

```sh
bundle exec rake rubocop
just lint
# or: bundle exec rubocop
```

Update bundled CA certificates from the [Mozilla cURL release][curl]:

```sh
bundle exec rake update_certs
just update-certs
# or: bundle exec rake update_certs
```

Update the bundled [stripe-mock] by editing the version number found in
5 changes: 0 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -8,11 +8,6 @@ Rake::TestTask.new do |t|
t.pattern = "./test/**/*_test.rb"
end

if RUBY_VERSION >= "2.7.0"
require "rubocop/rake_task"
RuboCop::RakeTask.new
end

desc "Update bundled certs"
task :update_certs do
require "net/http"
43 changes: 43 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
set quiet

import? '../sdk-codegen/utils.just'

_default:
just --list --unsorted

install *args:
bundle install {{ if is_dependency() == "true" {"--quiet"} else {""} }} {{ args }}

# ⭐ run all unit tests
test: install
bundle exec rake test

# check linting / formatting status of files
format-check *args: install
bundle exec rubocop {{ args }}
alias lint-check := format-check

# ⭐ check style & formatting for all files, fixing what we can
lint: (format-check "--autocorrect")

# NOTE: "-o /dev/null" is vital - rubocop has super noisy output and codegen will crash when formatting ruby if everything gets printed
# so, we send all its output to the void
# copy of `lint` with less output
format: (format-check "-o /dev/null --autocorrect")

update-certs: install
bundle exec rake update_certs

# run sorbet to check type definitions
typecheck: install
{{ if semver_matches(`ruby -e "puts RUBY_VERSION"`, ">=2.7") == "true" { \
"bundle exec srb tc" \
} else { \
"echo \"Ruby version < 2.7, skipping srb tc\"" \
} }}

# called by tooling
[private]
update-version version:
echo "{{ version }}" > VERSION
perl -pi -e 's|VERSION = "[.\-\w\d]+"|VERSION = "{{ version }}"|' lib/stripe/version.rb
4 changes: 2 additions & 2 deletions lib/stripe/resources/billing_portal/configuration.rb
Original file line number Diff line number Diff line change
@@ -202,7 +202,7 @@ def initialize(enabled: nil, options: nil)
attr_accessor :enabled
# Whether to cancel subscriptions immediately or at the end of the billing period.
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
attr_accessor :proration_behavior

def initialize(
@@ -410,7 +410,7 @@ def initialize(enabled: nil, options: nil)
attr_accessor :enabled
# Whether to cancel subscriptions immediately or at the end of the billing period.
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
attr_accessor :proration_behavior

def initialize(
2 changes: 1 addition & 1 deletion lib/stripe/resources/financial_connections/transaction.rb
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ def initialize(after: nil)
@after = after
end
end
# The ID of the Stripe account whose transactions will be retrieved.
# The ID of the Financial Connections Account whose transactions will be retrieved.
attr_accessor :account
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before
4 changes: 2 additions & 2 deletions lib/stripe/services/billing_portal/configuration_service.rb
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ def initialize(enabled: nil, options: nil)
attr_accessor :enabled
# Whether to cancel subscriptions immediately or at the end of the billing period.
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
attr_accessor :proration_behavior

def initialize(
@@ -308,7 +308,7 @@ def initialize(enabled: nil, options: nil)
attr_accessor :enabled
# Whether to cancel subscriptions immediately or at the end of the billing period.
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
attr_accessor :proration_behavior

def initialize(
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ def initialize(after: nil)
@after = after
end
end
# The ID of the Stripe account whose transactions will be retrieved.
# The ID of the Financial Connections Account whose transactions will be retrieved.
attr_accessor :account
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before
4 changes: 2 additions & 2 deletions rbi/stripe/resources/billing_portal/configuration.rbi
Original file line number Diff line number Diff line change
@@ -252,7 +252,7 @@ module Stripe
# Whether to cancel subscriptions immediately or at the end of the billing period.
sig { returns(String) }
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
sig { returns(String) }
attr_accessor :proration_behavior
sig {
@@ -467,7 +467,7 @@ module Stripe
# Whether to cancel subscriptions immediately or at the end of the billing period.
sig { returns(String) }
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
sig { returns(String) }
attr_accessor :proration_behavior
sig {
2 changes: 1 addition & 1 deletion rbi/stripe/resources/financial_connections/transaction.rbi
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ module Stripe
sig { params(after: String).void }
def initialize(after: nil); end
end
# The ID of the Stripe account whose transactions will be retrieved.
# The ID of the Financial Connections Account whose transactions will be retrieved.
sig { returns(String) }
attr_accessor :account
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
4 changes: 2 additions & 2 deletions rbi/stripe/services/billing_portal/configuration_service.rbi
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ module Stripe
# Whether to cancel subscriptions immediately or at the end of the billing period.
sig { returns(String) }
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
sig { returns(String) }
attr_accessor :proration_behavior
sig {
@@ -316,7 +316,7 @@ module Stripe
# Whether to cancel subscriptions immediately or at the end of the billing period.
sig { returns(String) }
attr_accessor :mode
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
sig { returns(String) }
attr_accessor :proration_behavior
sig {
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ module Stripe
sig { params(after: String).void }
def initialize(after: nil); end
end
# The ID of the Stripe account whose transactions will be retrieved.
# The ID of the Financial Connections Account whose transactions will be retrieved.
sig { returns(String) }
attr_accessor :account
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.