wyyerd / stripe-rs

Rust API bindings for the Stripe HTTP API.
Apache License 2.0
224 stars 88 forks source link

Missing fn `SubscriptionItem::create` #116

Closed thedodd closed 4 years ago

thedodd commented 4 years ago

Looks like the currently generated SubscriptionItem does not support the pattern described in the docs here: https://stripe.com/docs/api/subscription_items/create

I'll work on opening a PR for this.

thedodd commented 4 years ago

Looks like the reason for this is that the code generator is discriminating, in part, based on whether or not the description of the openapi spec segment contains the word Create or create:

!doc_comment.contains("Create") && !doc_comment.contains("create")

I'll update that discriminator to also check for the words Adds or adds, as it should cover this specific case as well. We'll see what the code generator spits out.