Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typespec for date query to make keys optional #421

Merged
merged 1 commit into from
Nov 7, 2018

Conversation

mmmries
Copy link
Contributor

@mmmries mmmries commented Nov 7, 2018

👋 Hi!
Many thanks for building and maintaining stripity_stripe. It makes integrating with Stripe really nice. I noticed that when I pulled it into my project I started to get a dialyzer error because I was doing a query like Stripe.Event.list(%{created: %{gt: timestamp}, limit: 50, starting_after: cursor}, api: api_key)

The call above works just fine, but dialyzer is throwing an error because the typespec for the datequery specifies all 4 keys of gt, gte, lt, lte. Putting all of them right into the typespec will treat them as required keys. So I just changed the typespec to make each of those keys optional the way they are documented in the stripe api.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 82.505% when pulling c339c40 on mmmries:fix_typespec into 19ccd62 on code-corps:master.

Copy link
Contributor

@begedin begedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you for submitting the fix and thank you for the great explanation on why it's needed. 👍

@begedin begedin merged commit 298911c into beam-community:master Nov 7, 2018
@mmmries mmmries deleted the fix_typespec branch November 7, 2018 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants