fix(stripe): upgrade SDK to 2.0.0, add ConnectedAccountHandler, full test suite for all 36 actions#273
Merged
Merged
Conversation
🔍 Integration Validation ResultsCommit: Changed directories:
✅ Structure Check output✅ Code Check output✅ Tests Check output✅ README Check output✅ Version Check output |
Collaborator
|
Would it hurt or be a huge issue to add useful tests to this PR, @Shubhank-Jonnada ? |
4 tasks
…it + integration suite
…6 actions; fix unit_amount_decimal mapping
…inline list params, fix FetchResponse import
…bump version to 3.0.0, fix all validator warnings
…chema - Expanded integration tests from 10 to 13 covering all 36 actions - Added TestDeleteInvoice, TestInvoiceItemStandaloneLifecycle, TestPaymentMethodLifecycle - TestPaymentMethodLifecycle covers attach, list, get, pay_invoice, detach end-to-end - TestProductAndPriceLifecycle now covers update_product and update_price - TestInvoiceLifecycle now covers send_invoice and update_invoice_item - Removed unit_amount from create_price required fields since unit_amount_decimal is also valid
Contributor
Author
Done |
- Remove unused build_list_params helper
- Fix business_profile null crash in ConnectedAccountHandler (use or {} guard)
- Add comment explaining preview API version requirement for unit_amount_decimal
- Add inline comments explaining unit_amount -> unit_amount_decimal coercion
- Add _fetch() wrapper that surfaces Stripe error messages on 4xx/5xx responses
- Add unit test for business_profile: null case
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.
Summary
Fixes a missing ConnectedAccountHandler error, upgrades the Stripe integration to SDK 2.0.0, and adds a complete test suite with end-to-end coverage for all 36 actions.
Changes
Core fixes
ConnectedAccountHandlerto resolve the missing handler error1.0.2to~=2.0.0ActionResult(data={..., result: False})toActionError(message=...)response.get()calls toresponse.data.get()throughout (20 occurrences)unit_amount_decimalfield mapping for invoice items (Stripe preview API requires string)create_priceconfig schema: removedunit_amountfrom required sinceunit_amount_decimalis also accepted3.0.0Tests
test_stripe.pyandcontext.pywith proper pytesttests/conftest.pyprovidesstripe_contextfixture (real aiohttp) andmock_contextfor unitstests/test_stripe_unit.pycovers all 36 actions including ConnectedAccountHandler (48 unit tests)tests/test_stripe_integration.pycovers all 36 actions via end-to-end lifecycle tests (13 live tests)Validation
validate_integration.py— 0 errors, 0 warningscheck_code.py— 0 errors, 0 warnings