Skip to content

Add CodiNotificationRequest model and update imports and tests#415

Open
rcabrera-py wants to merge 1 commit into
mainfrom
feat/add-request-for-codi
Open

Add CodiNotificationRequest model and update imports and tests#415
rcabrera-py wants to merge 1 commit into
mainfrom
feat/add-request-for-codi

Conversation

@rcabrera-py

@rcabrera-py rcabrera-py commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
  • Introduced CodiNotificationRequest class with various fields for payment notifications.
  • Updated init.py to include CodiNotificationRequest in the exports.
  • Added a test case for CodiNotificationRequest to validate its instantiation and field values.

Summary by CodeRabbit

Release Notes

  • New Features

    • Extended validation capabilities to support CoDi payment notifications
  • Other

    • Version incremented to 2.1.39.dev0

- Introduced CodiNotificationRequest class with various fields for payment notifications.
- Updated __init__.py to include CodiNotificationRequest in the exports.
- Added a test case for CodiNotificationRequest to validate its instantiation and field values.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d701c696-30f9-4843-8bb6-c1f020548451

📥 Commits

Reviewing files that changed from the base of the PR and between 62957a5 and e4d9752.

📒 Files selected for processing (4)
  • cuenca_validations/types/__init__.py
  • cuenca_validations/types/requests.py
  • cuenca_validations/version.py
  • tests/test_requests.py

Walkthrough

A new CodiNotificationRequest Pydantic model is added to cuenca_validations/types/requests.py, extending BaseRequest. It declares three required fields (clave_rastreo, status, folio_esquema) and multiple optional CoDi transaction fields covering payment type, amount, concept, orderer/beneficiary account identifiers and names, phone alias/digit-verifier pairs, and an optional charge timestamp. The class is registered in cuenca_validations/types/__init__.py via __all__ and a new import statement. A round-trip serialization test is added, and the package version is bumped to 2.1.39.dev0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • rogelioLpz
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding the CodiNotificationRequest model, updating imports, and adding tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-request-for-codi

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (62957a5) to head (e4d9752).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #415   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines         1502      1519   +17     
=========================================
+ Hits          1502      1519   +17     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cuenca_validations/types/__init__.py 100.00% <ø> (ø)
cuenca_validations/types/requests.py 100.00% <100.00%> (ø)
cuenca_validations/version.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62957a5...e4d9752. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant