Skip to content

Add new fields to Quote object: uuid, order_numbers, metadata#76

Merged
adeang47 merged 5 commits intopart-os:masterfrom
jeccles12:quote-header-update
Oct 23, 2025
Merged

Add new fields to Quote object: uuid, order_numbers, metadata#76
adeang47 merged 5 commits intopart-os:masterfrom
jeccles12:quote-header-update

Conversation

@jeccles12
Copy link

  • Added uuid field (Optional[str]) to Quote class
  • Added order_numbers field (List[str]) to Quote class
  • Added metadata field (Optional[Dict]) to Quote class
  • Updated QuoteDetailsMapper to handle new fields
  • Added special handling for order_numbers default value
  • Maintains backward compatibility with existing code

validator=attr.validators.optional(attr.validators.instance_of(str)),
default=None
)
order_numbers: List[str] = attr.ib(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be int @jeccles12

default=None
)
order_numbers: List[str] = attr.ib(
converter=optional_convert(convert_iterable(str)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too @jeccles12

@jeccles12
Copy link
Author

@andrew-deangelis47 I think this should be good now I updated the mock data and fixed something else on the types for this new field.

@adeang47
Copy link
Collaborator

@jeccles12 do you mind tagging the branch as v1.2.0 so we can cut a release?

@jeccles12 jeccles12 force-pushed the quote-header-update branch from b201411 to ca7d53b Compare October 23, 2025 15:59
@jeccles12
Copy link
Author

@andrew-deangelis47 should be all set

Jack Eccles added 5 commits October 23, 2025 12:07
- Added uuid field (Optional[str]) to Quote class
- Added order_numbers field (List[str]) to Quote class
- Added metadata field (Optional[Dict]) to Quote class
- Updated QuoteDetailsMapper to handle new fields
- Added special handling for order_numbers default value
- Maintains backward compatibility with existing code
- Changed order_numbers converter from convert_iterable(str) to a simple lambda
- convert_iterable is designed for attrs classes, not primitives like strings
- Added converter that handles None values and converts to empty list
- Fixed mapper to ensure order_numbers defaults to empty list when None
- Added uuid field to quote.json mock data
- Added metadata field to quote.json mock data with sample values
- Added test assertions to verify new fields are accessible
- All 57 tests pass
@adeang47 adeang47 force-pushed the quote-header-update branch from ca7d53b to b72b044 Compare October 23, 2025 16:07
@adeang47 adeang47 merged commit 29dfcc9 into part-os:master Oct 23, 2025
5 checks passed
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.

3 participants