Open
Conversation
bhtowles
requested changes
Nov 4, 2025
|
|
||
|
|
||
| def setUp(self): | ||
| """Verify that you have set the prerequisites to run the tap (creds, etc.)""" |
Contributor
There was a problem hiding this comment.
We don't need to call it in both places right?
Contributor
Author
There was a problem hiding this comment.
It was mainly kept as a safety net kind of to check if the classmethod works or not. I can remove it.
| def setUpClass(cls): | ||
| """Run the class-level balance ensure (so setUpClass-level creates are safe).""" | ||
| # run the existing ensure_available_balance logic early | ||
| cls.ensure_available_balance() |
Contributor
There was a problem hiding this comment.
Would like to add logging to the ensure balance method so we can monitor this over time. Also consider bumping the check from 1,000 to 10,000 for both comparison and top-up amount.
Suggested change
| cls.ensure_available_balance() | |
| if balance.get('currency') == 'usd': | |
| balance_usd = balance.get('currency', 0) | |
| LOGGER.info("balance_usd: %s, pending_usd: %s", balance_usd, pending_amount_usd) | |
| if balance_usd - pending_amount_usd <= 100000: | |
| LOGGER.info("Balance - Pending has fallen below $1,000. Adding $1,000 to balance") | |
| stripe_client.PaymentIntent.create( |
Co-authored-by: bhtowles <bhtowles@gmail.com>
Contributor
Author
|
@bhtowles updated logic and expected keys for all fields |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
JIRA: https://qlik-dev.atlassian.net/browse/SAC-29321
Manual QA steps
Risks
Rollback steps
AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code