Conversation
- Introduced the mail_sort field in letter_editable.yml, no_extra_service.yml, registered.yml, and certified.yml to allow for mail batching based on specified values. - Updated letters.yml and letter responses to include mail_sort examples. - Enhanced lob-api-public.yml documentation to explain the mail_sort feature and its requirements. This change enables better mail handling for specific accounts under the mail_sort feature flag.
…stman collection.
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 31. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
Summary of ChangesHello @ZairesDev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on updating the API documentation to formally introduce and describe the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request does a great job of adding comprehensive API documentation for the new mail_sort field. The descriptions are clear and provide all the necessary context for developers.
My review includes a few suggestions to improve maintainability. The main point is to avoid duplicating the mail_sort schema definition across multiple files by extracting it into a reusable component. I've also noted an extraneous dependency in package-lock.json that should be cleaned up.
…an the pre-PR scripts
… concerning mail_sort.
burkematthew
left a comment
There was a problem hiding this comment.
@ZairesDev now that we've changed the name of the field, we should change this as well.
I only set 'mail_partition' to the column within the letters table in the DB. As far as API requests/responses, I left that as mail_sort. That's why I didn't change any of this documentation. |
@ZairesDev we should change the input field to match what we're using in the DB. It's confusing to have a field called |
I concur. I'll also create a PR to update the entry-planning changes as well. Thanks for the review, as always, Matthew! |
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive API documentation for the mail_partition field to support Capital One's MAAS (Marketing as a Service) program, which requires separating mail into batches by pop_id for per-dealership USPS postage statements.
- Adds
mail_partitionfield definition to all letter schemas (request and response models) - Includes example values in request and response documentation
- Documents the feature flag requirement and account restrictions
Reviewed changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| shared/attributes/mail_partition.yml | Defines the mail_partition attribute schema with description, type, and nullable flag |
| resources/letters/models/letter_editable.yml | Adds mail_partition to the letter request schema |
| resources/letters/models/no_extra_service.yml | Adds mail_partition to the no_extra_service letter response model |
| resources/letters/models/registered.yml | Adds mail_partition to the registered letter response model |
| resources/letters/models/certified.yml | Adds mail_partition to the certified letter response model |
| resources/letters/letters.yml | Adds mail_partition examples (1076, 1122) to JSON and form-urlencoded request bodies |
| resources/letters/responses/letter.yml | Adds mail_partition: "1076" to single letter response example |
| resources/letters/responses/all_letters.yml | Adds mail_partition: "1076" to list response example |
| lob-api-public.yml | Documents the Mail Partitioning and Batching feature, feature flag requirement, and version bump to 1.20.9 |
| dist/lob-api-bundled.yml | Reflects all changes in the bundled OpenAPI specification with proper schema definitions and examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #1824
Checklist
mainnpm run bundleoutputs nothing suspectnpm run postmanoutputs nothing suspectChanges
This PR completes Update API Documentation from the Capital One MAAS mail_partition Batching plan. It adds comprehensive API documentation for the
mail_partitionfield, enabling Capital One's MAAS (Marketing as a Service) program to use this field for separating mail into batches by pop_id for per-dealership USPS 3602 postage statements.Request Schema Updates
mail_partitionfield toresources/letters/models/letter_editable.ymlResponse Schema Updates
mail_partitionfield to all letter response model variants:resources/letters/models/no_extra_service.ymlresources/letters/models/registered.ymlresources/letters/models/certified.ymlmail_parititonappears in API responses for accounts with the feature flag enabledRequest Examples
mail_partition: "1076"to JSON request example inresources/letters/letters.yml(line 230)mail_partition: "1122"to form-urlencoded request example inresources/letters/letters.yml(line 282)Response Examples
mail_partition: "1076"to single letter response example (resources/letters/responses/letter.yml, line 96)mail_partition: "1076"to list response example (resources/letters/responses/all_letters.yml, line 101)Feature Flag Documentation
lob-api-public.yml(lines 1116-1120)mail_partitionLaunchDarkly feature flag)Impact: This documentation-only change makes the
mail_partitionfield publicly documented in the Lob API OpenAPI specification. The field enables customers with the appropriate feature flag to separate mail into batches, which is essential for Capital One's MAAS program requirements. All changes are backward compatible and only affect API documentation visibility.