diff --git a/lib/stripe/connect/country_spec.ex b/lib/stripe/connect/country_spec.ex index 01054ae7..3be7d782 100644 --- a/lib/stripe/connect/country_spec.ex +++ b/lib/stripe/connect/country_spec.ex @@ -9,25 +9,25 @@ defmodule Stripe.CountrySpec do import Stripe.Request @type t :: %__MODULE__{ - id: Stripe.id, - object: String.t, - default_currency: String.t, - supported_bank_account_currencies: %{ - String.t => list(String.t) - }, - supported_payment_currencies: list(String.t), - supported_payment_methods: list(Stripe.Source.source_type | String.t), - verification_fields: %{ - individual: %{ - minimum: list(String.t), - additional: list(String.t) - }, - company: %{ - minimum: list(String.t), - additional: list(String.t) - } - } - } + id: Stripe.id(), + object: String.t(), + default_currency: String.t(), + supported_bank_account_currencies: %{ + String.t() => list(String.t()) + }, + supported_payment_currencies: list(String.t()), + supported_payment_methods: list(Stripe.Source.source_type() | String.t()), + verification_fields: %{ + individual: %{ + minimum: list(String.t()), + additional: list(String.t()) + }, + company: %{ + minimum: list(String.t()), + additional: list(String.t()) + } + } + } defstruct [ :id, @@ -44,7 +44,7 @@ defmodule Stripe.CountrySpec do @doc """ Retrieve a country spec. """ - @spec retrieve(Stripe.id | t, Stripe.options) :: {:ok, t} | {:error, Stripe.Error.t} + @spec retrieve(Stripe.id() | t, Stripe.options()) :: {:ok, t} | {:error, Stripe.Error.t()} def retrieve(id, opts \\ []) do new_request(opts) |> put_endpoint(@plural_endpoint <> "/#{get_id!(id)}") @@ -55,7 +55,7 @@ defmodule Stripe.CountrySpec do @doc """ List all country specs. """ - @spec list(map, Stripe.options) :: {:ok, Stripe.List.of(t)} | {:error, Stripe.Error.t} + @spec list(map, Stripe.options()) :: {:ok, Stripe.List.of(t)} | {:error, Stripe.Error.t()} def list(params \\ %{}, opts \\ []) do new_request(opts) |> put_endpoint(@plural_endpoint) diff --git a/test/stripe/connect/country_spec_test.exs b/test/stripe/connect/country_spec_test.exs index 09fce3f1..73a95bcb 100644 --- a/test/stripe/connect/country_spec_test.exs +++ b/test/stripe/connect/country_spec_test.exs @@ -4,14 +4,14 @@ defmodule Stripe.CountrySpecTest do describe "retrieve/2" do test "retrieves a country spec" do assert {:ok, %Stripe.CountrySpec{}} = Stripe.CountrySpec.retrieve("US") - assert_stripe_requested :get, "/v1/country_specs/US" + assert_stripe_requested(:get, "/v1/country_specs/US") end end describe "list/2" do test "lists all country specs" do assert {:ok, %Stripe.List{data: country_specs}} = Stripe.CountrySpec.list() - assert_stripe_requested :get, "/v1/country_specs" + assert_stripe_requested(:get, "/v1/country_specs") assert is_list(country_specs) assert %Stripe.CountrySpec{} = hd(country_specs) end