Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the
SetupAttempt
resource and List API (#949)
* Codegen for openapi 3854362 * Fix and add tests
- Loading branch information
1 parent
eb84249
commit 29f321b
Showing
7 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
class SetupAttempt < APIResource | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "setup_attempt" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
require ::File.expand_path("../test_helper", __dir__) | ||
|
||
module Stripe | ||
class SetupAttemptTest < Test::Unit::TestCase | ||
should "be listable" do | ||
setup_attempts = Stripe::SetupAttempt.list({ | ||
setup_intent: "seti_123", | ||
}) | ||
assert_requested :get, "#{Stripe.api_base}/v1/setup_attempts?setup_intent=seti_123" | ||
assert setup_attempts.data.is_a?(Array) | ||
assert setup_attempts.data[0].is_a?(Stripe::SetupAttempt) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters