Open sb8244 opened 1 month ago
There is a workaround to define my own list_refunds
function like so:
def list_refunds(params \\ %{}, opts \\ []) do
path = "/v1/refunds"
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
So this is probably a low priority issue
I've also stumbled upon this issue while trying to upgrade from stripity_stripe v"2.17.3" to "3.2.0". %Stripe.PaymentIntent structure no longer contains the list of charges, so I need to pull them from https://docs.stripe.com/api/refunds/list API, which takes either charge or payment_intent ID as a parameter and stripity-stripe only supports charge ID for this API
I have a lot of work to do at https://github.com/beam-community/stripity-stripe/pull/843
Primarily, I need to readjust what I am doing and add another indirection that allows manual mapping of endpoints so that I can avoid breaking changes, for now
.
Existing Issue or Pull Request Verification
Package Version
2.17.1
Are you using the latest version?
Steps to Reproduce
Invoke
Stripe.Refund.list()
and get error about function not existing.Try to invoke it with
Stripe.Refund.list(%{})
and get String replacement functionsExpected Result
Stripe's API supports listing all refunds without passing the charge parameter
Actual Result
The generated code requires charge to be passed in, possibly due to documentation bug on Stripe side?
Stripes docs show it's possible to request refunds without the charge ID: