Closed maheshsattala closed 3 months ago
The recent updates enhance the Razorpay integration by introducing support for handling additional contextual information through a notes
feature. This involves modifications to the action execution method, data models, and test cases, facilitating better tracking and management of supplementary information during API interactions. The changes improve functionality, debugging capabilities, and testing comprehensiveness, ensuring a robust integration with the Razorpay API.
Files | Change Summary |
---|---|
kairon/actions/definitions/razorpay.py |
Modified execute method to handle notes from action_config , logging enhancements added. |
kairon/api/models.py |
Added optional notes attribute as a list of HttpActionParameters in RazorpayActionRequest class. |
kairon/shared/actions/data_objects.py |
Introduced notes field as a ListField in RazorpayAction class to store associated notes. |
kairon/shared/data/processor.py |
Updated edit_razorpay_action method to process a list of notes from request_data . |
tests/integration_test/action_service_test.py |
Added test_process_razorpay_action_with_notes function; updated existing tests to include notes field. |
tests/integration_test/services_test.py |
Enhanced test cases with new notes field and added test_list_razorpay_actions_after_update function. |
tests/unit_test/data_processor/data_processor_test.py |
Modified tests to include notes field; added assertions for notes retention after updates. |
sequenceDiagram
participant User
participant RazorpayAPI
participant ActionUtility
participant Logger
User->>RazorpayAPI: Send Razorpay action with notes
RazorpayAPI->>ActionUtility: Prepare request with notes
ActionUtility->>Logger: Log notes for debugging
ActionUtility->>RazorpayAPI: Send request with notes included
RazorpayAPI->>User: Respond with action status
ππ« "In a world of notes and APIs,
A rabbit hops with merry eyes.
With details shared, the path is bright,
Enhancing actions, a joyous sight!
So letβs embrace this change with cheer,
For every note brings us more near!" πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Added notes field in Razorpay action and added and fixed test cases for the same.
Summary by CodeRabbit
New Features
notes
attribute in the Razorpay action request model.Bug Fixes
Tests