Skip to content

Expose connect account id in Stripe::StripeObject #1101

@ryanseys

Description

@ryanseys

Is your feature request related to a problem? Please describe.

I'd like to get access to the Stripe connect account id e.g. acct_123 associated with a Stripe::StripeObject.

Currently the only way to do this through publicly accessible methods is via Stripe::StripeObject#marshal_dump like so:

stripe_object = Stripe::Treasury::ReceivedCredit.retrieve(...)

stripe_object.marshal_dump[1][:stripe_account] #=> acct_123

This is pretty clunky.

Describe the solution you'd like

Exposing a method like so would be nice:

stripe_object = Stripe::Treasury::ReceivedCredit.retrieve(...)

stripe_object.stripe_account #=> acct_123

Or even an object that wraps all those client values that we can more easily dig into:

stripe_object = Stripe::Treasury::ReceivedCredit.retrieve(...)

stripe_object.client_options.stripe_account

Could also expose api_version via a similar mechanism.

Describe alternatives you've considered

Seems like this is the only way to do this right now:

stripe_object.marshal_dump[1][:stripe_account] #=> acct_123

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions