beam-community / stripity-stripe

An Elixir Library for Stripe
Other
965 stars 346 forks source link

Fix type spec of line_items on Checkout Session #760

Closed ABuffSeagull closed 1 year ago

ABuffSeagull commented 1 year ago

Noticed that the typespec of the line_items property was wrong, it was kinda doing a nested Stripe.List in a way, so this should fix it.

2 non-essential questions though:

  1. Is there any reason why the line items are a simple map and not Stripe.Checkout.Session.LineItems? I've got the changes to the converter lined up if it should be the struct instead of a map, just wanted to keep the pull request simple.
  2. Is there any reason for using list(foo) over [foo] in the typespecs? Took me a second to realize it was just the builtin list() type and not referring to the Stripe.List, and I personally feel like using the literal would be more explicit. Purely subjective though.
4ndr345 commented 1 year ago

@ABuffSeagull I think our problem with create_params was fixed in https://github.com/beam-community/stripe-elixir/pull/752

ABuffSeagull commented 1 year ago

Cleaning out my outstanding issues/PRs, so I'm just gonna close this cause @4ndr345 is right, it's more or less been fixed. (And I unfortunately don't write Elixir anymore)