Skip to content

Commit

Permalink
Update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenvanvliet committed Aug 21, 2023
1 parent ff4c50f commit 89b9221
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/openapi/phases/build_modules.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defmodule Stripe.OpenApi.Phases.BuildModules do
@method_name_overrides %{
["Account"] => %{
{"retrieve", "/v1/account"} => "retrieve",
{"retrieve", "/v1/accounts/{account}"} => "retrieve_by_id"
{"retrieve", "/v1/account"} => "show",
{"retrieve", "/v1/accounts/{account}"} => "retrieve"
},
["BankAccount"] => %{
{"delete", "/v1/customers/{customer}/sources/{id}"} => "delete_source",
Expand Down
4 changes: 2 additions & 2 deletions test/stripe/connect/account_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ defmodule Stripe.AccountTest do
use Stripe.StripeCase, async: true

test "is retrievable using singular endpoint" do
assert {:ok, %Stripe.Account{}} = Stripe.Account.retrieve()
assert {:ok, %Stripe.Account{}} = Stripe.Account.show()
assert_stripe_requested(:get, "/v1/account")
end

test "is retrievable using plural endpoint" do
assert {:ok, %Stripe.Account{}} = Stripe.Account.retrieve_by_id("acct_123")
assert {:ok, %Stripe.Account{}} = Stripe.Account.retrieve("acct_123")
assert_stripe_requested(:get, "/v1/accounts/acct_123")
end

Expand Down
4 changes: 2 additions & 2 deletions test/stripe/payment_methods/bank_account_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ defmodule Stripe.BankAccountTest do

describe "update/2" do
test "updates a bank account" do
assert {:ok, _} = Stripe.BankAccount.update("cus_123", "ba_123")
assert {:ok, _} = Stripe.BankAccount.update_source("cus_123", "ba_123")
assert_stripe_requested(:post, "/v1/customers/cus_123/sources/ba_123")
end
end

describe "delete/2" do
test "deletes a bank account" do
assert {:ok, _} = Stripe.BankAccount.delete("cus_123", "ba_123")
assert {:ok, _} = Stripe.BankAccount.delete_source("cus_123", "ba_123")
assert_stripe_requested(:delete, "/v1/customers/cus_123/sources/ba_123")
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/stripe/payment_methods/card_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ defmodule Stripe.CardTest do

describe "update/2" do
test "updates a card" do
assert {:ok, _} = Stripe.Card.update("cus_123", "card_123", %{name: "sco"})
assert {:ok, _} = Stripe.Card.update_source("cus_123", "card_123", %{name: "sco"})
assert_stripe_requested(:post, "/v1/customers/cus_123/sources/card_123")
end
end

describe "delete/2" do
test "deletes a card" do
assert {:ok, _} = Stripe.Card.delete("cus_123", "card_123")
assert {:ok, _} = Stripe.Card.delete_source("cus_123", "card_123")
assert_stripe_requested(:delete, "/v1/customers/cus_123/sources/card_123")
end
end
Expand Down

0 comments on commit 89b9221

Please sign in to comment.