Is your feature request related to a problem? Please describe.
since the account id must be specified on the client struct with fn with_stripe_account(mut self, ..., this means that if one is managing many connected accounts, they need to take ownership of the client that's making the request, which means either (lazily) cloning the client on every request, even though post_form only needs &self, or (eagerly) managing a cache of client struct set to the account id's of the connected they are managing
Describe the solution you'd like
i want to avoid both cloning the client and managing cached client structs by allowing the specification of the account id in an alternative way not tied to the client
one solution (definitely not the best) is to introduce a new function
which would allow setting the account id header in the request_transformer although i'm not sure how ergonomic this would be with how the endpoints are currently called or in the new codegen branch e.g.
which would mean generating an extra _with function for everyone of these functions to expose the lower level request from the high level api, which seems undesirable ...
Is your feature request related to a problem? Please describe.
since the account id must be specified on the client struct with
fn with_stripe_account(mut self, ...
, this means that if one is managing many connected accounts, they need to take ownership of the client that's making the request, which means either (lazily) cloning the client on every request, even thoughpost_form
only needs&self
, or (eagerly) managing a cache of client struct set to the account id's of the connected they are managingDescribe the solution you'd like
i want to avoid both cloning the client and managing cached client structs by allowing the specification of the account id in an alternative way not tied to the client
one solution (definitely not the best) is to introduce a new function
which would allow setting the account id header in the
request_transformer
although i'm not sure how ergonomic this would be with how the endpoints are currently called or in the new codegen branch e.g.which would mean generating an extra
_with
function for everyone of these functions to expose the lower level request from the high level api, which seems undesirable ...Describe alternatives you've considered
No response
Additional context
No response