Giter Site home page Giter Site logo

funstripe's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thorium edgarfgp

funstripe's Issues

Inconsistent casing in expand field

Stripe has an optional "expand" field that takes a list of strings representing fields to expand, e.g. ["latest_charge"] on a payment intent retrieve request will expand the field from a simple payment-intent ID string to a full-blown payment intent object.

However, sometimes the "expand" field is a query-string parameter and sometimes it is a form parameter. In the former case it needs to be formatted as expand = ["latest_charge"] but in the latter case as expand = ["latestCharge"]. This is inconsistent behaviour and needs addressing but might break existing implementations.

Missing endpoints?

The Cards endpoint is not present in StripeRequest, likely because it is not defined in the paths in the OpenAPI spec. The API documentation lists a number of methods available on this endpoint that are useful, e.g. find a card by ID, but this cannot currently be done with the FunStripe library. But so far no one has said they're missing this functionality.

Code generation

Hey Simon, I saw this pass by on Twitter found it an interesting read.
I was curious how you are generating the F# code and it seems like some good old string concatenation.

If you are interested you could actually use Fantomas to generate the code instead.
You could create the matching F# Syntax tree and pass it to Fantomas to print the source code.

Example:
https://github.com/nojaf/presentations/blob/b6dde5e49ba850f312082bfc32ce9a3354e2a0ee/formatting-fsharp-code/sql-type-generation/build.fsx#L190-L195

You could use the online tool to easily discover what AST nodes you need.

Just wanted to let you know...

Improvements to strong typing

Many string values in requests could be strongly typed if the type can be identified unambiguously.

Also, country codes and currency codes could be sourced from the relevant ISO lists.

Possible future improvements

  • Multiple Stripe versions within the same version of the FunStripe library?
  • Handle lists and paging better
  • Order the types to avoid recursion
  • Simplify names by using nested modules?
  • Ensure XML comments are visible from calling code

Stripe.net comparison

Hi Simon! Thanks for this library ๐Ÿ™‚

It would be useful to have a comparison against Stripe.net, perhaps in the README. I'm working for a client who wants Stripe integration and, given Stripe.net is supported by the Stripe team, I'd like some justification if choosing this library over Stripe.net.

What was the reason that you created this library in the first place? Does it enable you to get access to API updates sooner? Write more idiomatic F#? Handle errors in a way that you prefer? Something else? Basically anything that points out why an F# dev might choose FunStripe over Stripe.net would be useful.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.