From 89b9221630301e8dffb24ce9c3aa46c4ea56dd2c Mon Sep 17 00:00:00 2001 From: Maarten van Vliet Date: Mon, 21 Aug 2023 21:42:43 +0200 Subject: [PATCH] Update naming --- lib/openapi/phases/build_modules.ex | 4 ++-- test/stripe/connect/account_test.exs | 4 ++-- test/stripe/payment_methods/bank_account_test.exs | 4 ++-- test/stripe/payment_methods/card_test.exs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/openapi/phases/build_modules.ex b/lib/openapi/phases/build_modules.ex index a091daad..07404857 100644 --- a/lib/openapi/phases/build_modules.ex +++ b/lib/openapi/phases/build_modules.ex @@ -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", diff --git a/test/stripe/connect/account_test.exs b/test/stripe/connect/account_test.exs index 77f42711..be760857 100644 --- a/test/stripe/connect/account_test.exs +++ b/test/stripe/connect/account_test.exs @@ -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 diff --git a/test/stripe/payment_methods/bank_account_test.exs b/test/stripe/payment_methods/bank_account_test.exs index 9117f551..1b876bcc 100644 --- a/test/stripe/payment_methods/bank_account_test.exs +++ b/test/stripe/payment_methods/bank_account_test.exs @@ -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 diff --git a/test/stripe/payment_methods/card_test.exs b/test/stripe/payment_methods/card_test.exs index e3e28ccf..fa157543 100644 --- a/test/stripe/payment_methods/card_test.exs +++ b/test/stripe/payment_methods/card_test.exs @@ -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