Skip to content

Commit

Permalink
Update generated code (#1241)
Browse files Browse the repository at this point in the history
* Update generated code for v405

* Update generated code for v406

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Jul 6, 2023
1 parent 3ba3e10 commit 9d0c014
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v387
v406
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

module Stripe
module FinancialConnections
# Describes an owner of an account.
class AccountOwner < StripeObject
OBJECT_NAME = "financial_connections.account_owner"
end
Expand Down
38 changes: 32 additions & 6 deletions test/stripe/generated_examples_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ class CodegennedExampleTest < Test::Unit::TestCase
assert_requested :get, "#{Stripe.api_base}/v1/accounts?limit=3"
end
end
context "Account.persons" do
should "support requests with args: limit, parent_id" do
Stripe::Account.persons("acct_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/persons?limit=3"
end
end
context "Account.reject" do
should "support requests with args: reason, id" do
Stripe::Account.reject("acct_xxxxxxxxxxxxx", { reason: "fraud" })
Expand Down Expand Up @@ -1312,6 +1306,32 @@ class CodegennedExampleTest < Test::Unit::TestCase
assert_requested :post, "#{Stripe.api_base}/v1/payment_methods/pm_xxxxxxxxxxxxx"
end
end
context "PaymentSource.update" do
should "support requests with args: customer, card, account_holder_name" do
Stripe::Customer.update_source(
"cus_123",
"card_123",
{ account_holder_name: "Kamil" }
)
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_123/sources/card_123"
end
should "support requests with args: metadata, parent_id, id" do
Stripe::Customer.update_source(
"cus_xxxxxxxxxxxxx",
"ba_xxxxxxxxxxxxx",
{ metadata: { order_id: "6735" } }
)
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx"
end
should "support requests with args: name, parent_id, id" do
Stripe::Customer.update_source(
"cus_xxxxxxxxxxxxx",
"card_xxxxxxxxxxxxx",
{ name: "Jenny Rosen" }
)
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx"
end
end
context "Payout.cancel" do
should "support requests with args: id" do
Stripe::Payout.cancel("po_xxxxxxxxxxxxx")
Expand Down Expand Up @@ -1354,6 +1374,12 @@ class CodegennedExampleTest < Test::Unit::TestCase
assert_requested :post, "#{Stripe.api_base}/v1/payouts/po_xxxxxxxxxxxxx"
end
end
context "Person.list" do
should "support requests with args: limit, parent_id" do
Stripe::Account.list_persons("acct_xxxxxxxxxxxxx", { limit: 3 })
assert_requested :get, "#{Stripe.api_base}/v1/accounts/acct_xxxxxxxxxxxxx/persons?limit=3"
end
end
context "Person.retrieve" do
should "support requests with args: parent_id, id" do
Stripe::Account.retrieve_person(
Expand Down

0 comments on commit 9d0c014

Please sign in to comment.