Tracking issue for missing APIs
arlyon opened this issue ยท 29 comments
API requests will be closed to keep the issue tracker clean and the issue will be added to this list. If it is unchecked, it is unaddressed. Any PR's addressing these will be handled speedily (I promise! ๐ )
@arlyon hi, I actually just ran into this, as you made the ticket 9 minutes ago ๐
. I need the AccountLink
API's for stripe as i'm integrating stripe connect into the backend i'm working on.
You also have listed payment_intent
but I see it in the API in the docs that it's available, is that wrong?
https://docs.rs/async-stripe/0.13.0-rc2/stripe/struct.CreatePaymentIntent.html
https://docs.rs/async-stripe/0.13.0-rc2/stripe/struct.PaymentIntent.html
The Link to the stripe docs:
https://stripe.com/docs/api/account_links
Is there any shot these can get generated?
The short answer is yes, that list is modules that are being generated, but aren't exported (yet). I have been working to try and simplify the code gen from the previous project but there's still a ways to go. For example, payment_intent
and event
exist in two places, one is generated and one is hand written so we need to figure out which is which.
The next step for that is to run tests in CI for modules that aren't being included, as part of the automatic openapi CI updates.
8206f6e addresses that at least partially, so you can target that and at least test out AccountLink
edit: missed a line, its exported properly on master now.
@arlyon thank you, i'll start using master branch to get access to it. Do you want me to report back with how it goes using the AccountLink?
Just to add to this list, it seems like the SetupIntent confirmation flow is missing and/or incorrect.
@Ryanmtate thanks for the report, could you open an issue with some details about what is / isn't working?
@Ryanmtate thanks for the report, could you open an issue with some details about what is / isn't working?
@arlyon Thanks for the response. I've opened #36 to track conversation.
@Ryanmtate are you sure? I use it currently in my backend and it works fine, even checked the stripe logs
EDIT: I just saw that mean the confirmation flow, that I have not setup yet.
@arlyon I did not forget about feedback using connected accounts stripe APIs like AccountLink
, etc. Just in the process of getting stripe to allow me to use them by enrolling in Stripe Connect that takes some time.
@Ryanmtate are you sure? I use it currently in my backend and it works fine, even checked the stripe logs
EDIT: I just saw that mean the confirmation flow, that I have not setup yet.
@kennetpostigo If you set confirm = true
in the SetupIntent, it appear to work. I am able to test the SetupIntent flow and confirm it works. I closed #36; but happy to re-open if others find it to be useful.
@arlyon The account API's seem to be working for me for Account
and AccountLink
, at least the API's to create them do work. I just got accepted in stripe connect to try them out. Will be trying out more of the API's this week/end
Is creating a card token will be supported?
I can't find card
field in stripe::CreateToken. I see stripe-rs also doesn't have this feature.
Update:
There was already an ongoing PR
Yes, that is the plan. I believe the mentioned PR directly modifies generated code which we want to avoid so it is not mergeable in its current form. If you are interested in this feature, you can either:
- figure out how to get the codegen to correctly generate the code for the create token API
- devise some sort of patching system as part of the codegen process, so we can modify generated code (such as adding a new field to a generated type)
I currently do not have the bandwidth to tackle this myself but I am happy to provide guidance and (prompt) code review if needed.
Hello,
i saw billing_portal_session is on the list and is missing. from the tutorial for subscriptions of stripe, i seem need it to let user update the pay info when PAY info is expired or has issue.
what's the plan to support it? or is there any quick workaround? thanks.
The APIs are generated, just not exported / tested. If you'd like to include them and test them out you can make sure they are exported in src/resources/generated
, and write any extension code if needed. Once you get it working, feel free to open a PR :)
Yes you are correct, thanks for bringing this to my attention :)
i believe BillingPortalConfiguration::create
is missing, shouldn't it be auto generated?
edit: it is available in the new codegen branch
It's been a while and no search API.. Is this gonna be added?
Search workaround if anyone needs it
#[derive(Serialize, Default, Debug)]
pub(crate) struct SearchParams {
pub query: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub page: Option<u64>,
}
pub(crate) async fn stripe_search<R: DeserializeOwned + 'static + Send>(
client: &stripe::Client,
resource: &str,
params: SearchParams,
) -> Result<List<R>, stripe::StripeError> {
client
.get_query(&format!("/{}/search", resource), ¶ms)
.await
}