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

Use the generated API version #1075

Merged
merged 1 commit into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions lib/stripe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
require "forwardable"

# Version
require "stripe/api_version"
require "stripe/version"

# API operations
Expand Down
8 changes: 8 additions & 0 deletions lib/stripe/api_version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module ApiVersion
CURRENT = "2020-08-27"
dcr-stripe marked this conversation as resolved.
Show resolved Hide resolved
end
end
2 changes: 2 additions & 0 deletions lib/stripe/stripe_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def reverse_duplicate_merge(hash)
end

def initialize
@api_version = ApiVersion::CURRENT

@ca_bundle_path = Stripe::DEFAULT_CA_BUNDLE_PATH
@enable_telemetry = true
@verify_ssl_certs = true
Expand Down
2 changes: 1 addition & 1 deletion test/stripe/stripe_configuration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class StripeConfigurationTest < Test::Unit::TestCase
assert_equal "https://api.stripe.com", config.api_base
assert_equal "https://connect.stripe.com", config.connect_base
assert_equal "https://files.stripe.com", config.uploads_base
assert_equal nil, config.api_version
assert !config.api_version.nil?
end

should "allow for overrides when a block is passed" do
Expand Down