From 636dff0b6d29335597962b1882fd86abf35ebdcd Mon Sep 17 00:00:00 2001 From: Dan McFadden Date: Tue, 12 Dec 2023 06:30:49 -0500 Subject: [PATCH] Quick patch to add back broken functionally to get connect account by id refs https://github.com/beam-community/stripity-stripe/pull/786 --- lib/generated/account.ex | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/lib/generated/account.ex b/lib/generated/account.ex index 3425fd5c..256fc8a3 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -627,6 +627,37 @@ defmodule Stripe.Account do |> Stripe.Request.put_method(:get) |> Stripe.Request.make_request() end + + @spec retrieve_by_id(account :: binary, params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) :: + {:ok, Stripe.Account.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} + def retrieve_by_id(account, params \\ %{}, opts \\ []) do + path = + Stripe.OpenApi.Path.replace_path_params( + "/v1/accounts/{account}", + [ + %OpenApiGen.Blueprint.Parameter{ + in: "path", + name: "account", + required: true, + schema: %OpenApiGen.Blueprint.Parameter.Schema{ + name: "account", + title: nil, + type: "string", + items: [], + properties: [], + any_of: [] + } + } + ], + [account] + ) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end ) )