Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing of subaccount #153

Closed
wants to merge 2 commits into from
Closed

Allow passing of subaccount #153

wants to merge 2 commits into from

Conversation

richleland
Copy link
Contributor

WORK IN PROGRESS - DO NOT MERGE

Refs #150. This work extracts subaccount from the kwargs, but I'm not liking how it's the same chunk of code everywhere. The base resource modifications are simple, but passing in subaccount optionally per call, coupled with the subclassing/API design we've set up means we have to allow subaccount to be extracted/passed through on all subclass requesting methods, which is meh.

We could put a method on the base class like extract_subaccount, but when we pass around kwargs and do a pop it's operating on a scoped copy within that method (I tried it) and not the kwargs we passed in. I tried it, but maybe I'm doing something wrong.

Requires some more thought. Additionally with the 2.x implementation under way, we might consider abandoning this as users can instantiate multiple copies of the lib with subaccount API keys.

Comments welcome.

@jgzamora jgzamora closed this Aug 10, 2018
@orval orval deleted the issue-150 branch December 12, 2018 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants