Skip to content

Add ledger entity API endpoints and supporting models#71

Merged
jfrench9 merged 1 commit intomainfrom
feature/ledger-entity
Mar 27, 2026
Merged

Add ledger entity API endpoints and supporting models#71
jfrench9 merged 1 commit intomainfrom
feature/ledger-entity

Conversation

@jfrench9
Copy link
Copy Markdown
Member

Summary

Introduces ledger entity support to the robosystems client library by adding new API endpoints for retrieving and updating ledger entities, along with their corresponding request/response models. Also includes a minor update to the existing MaterializeRequest class.

Key Accomplishments

New API Endpoints

  • get_ledger_entity – New endpoint for fetching ledger entity data from the API, with full support for both sync and async HTTP clients
  • update_ledger_entity – New endpoint for updating ledger entities, also supporting both sync and async execution patterns

New Models

  • LedgerEntityResponse – Comprehensive response model (623 lines) for deserializing ledger entity data returned by the API
  • UpdateEntityRequest – Request model (498 lines) for constructing and validating ledger entity update payloads

Updated Models

  • MaterializeRequest – Updated with additional field(s) to support new ledger entity functionality
  • models/__init__.py – Updated exports to include the newly added models

Breaking Changes

  • The MaterializeRequest model has been modified with field changes. Consumers relying on the previous structure of this class should verify compatibility, though the change appears to be additive in nature (net +23 lines).

Testing Notes

  • Verify get_ledger_entity returns properly deserialized LedgerEntityResponse objects for valid entity lookups
  • Verify update_ledger_entity correctly serializes UpdateEntityRequest payloads and handles success/error responses
  • Test both sync and async client paths for the new endpoints
  • Confirm the MaterializeRequest changes do not regress existing materialization workflows
  • Validate edge cases around optional/nullable fields in the new models

Infrastructure Considerations

  • No new dependencies are introduced; the new code follows existing patterns in the client library
  • The new endpoints will require corresponding API availability on the server side — ensure the ledger entity API is deployed before rolling out client updates that depend on these features
  • The substantial size of the new models (~1,100 lines combined) suggests complex entity structures; documentation of the ledger entity schema may be beneficial for consumers

🤖 Generated with Claude Code

Branch Info:

  • Source: feature/ledger-entity
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

## Summary

This commit introduces the `LedgerEntityResponse` and `UpdateEntityRequest` models to the client library, enhancing support for ledger and entity management. Additionally, the `MaterializeRequest` class is updated to include a new `source` parameter, allowing for better specification of data sources during materialization.

## Key Accomplishments

- **New Models**: Added `LedgerEntityResponse` and `UpdateEntityRequest` to improve API capabilities.
- **MaterializeRequest Update**: Introduced `source` parameter to the `MaterializeRequest` class, with appropriate serialization and deserialization logic.

## Changes Breakdown

- Updated `models/__init__.py` to include new model imports and registrations.
- Modified `materialize_request.py` to add the `source` parameter and its handling in the `to_dict` and `from_dict` methods.

## Testing Notes

- Verify that the new models are correctly integrated and accessible.
- Ensure that the `source` parameter functions as expected in materialization requests.

## Infrastructure Considerations

- No breaking changes introduced; existing functionality remains intact.
@jfrench9 jfrench9 merged commit b7eebf6 into main Mar 27, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/ledger-entity branch March 27, 2026 17:04
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