Skip to content

feat: add account_type field to ProductSearch for Rev 6 account_type filtering | MC-16677 - #408

Merged
SandhyaBhatia merged 2 commits into
masterfrom
sb/product-search-account-type
Oct 8, 2026
Merged

SandhyaBhatia merged 2 commits into
masterfrom
sb/product-search-account-type

Conversation

@SandhyaBhatia

@SandhyaBhatia SandhyaBhatia commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary of Changes

Adds an account_type field to ProductSearch so MDX Product's list endpoint (GET /users/{user_id}/products?type=&account_type=) can bind and pass through the account_type query parameter, per the Rev 6 MDX Product spec.

Fixes MC-16677 (https://mxcom.atlassian.net/browse/MC-16677)

Public API Additions/Changes

  • ProductSearch gains getAccount_type() / setAccount_type(String).
  • Named account_type (not accountType) intentionally — this controller's query-param binding (ProductController#listProducts(ProductSearch)) does Spring's default property-name matching with no snake_case/camelCase conversion. Confirmed by existing precedent: TransactionSearchRequest.start_date uses the same non-standard naming for the same reason (see its class comment). @SuppressWarnings({"checkstyle:MemberName", ...}) was already present on ProductSearch for this purpose.

Downstream Consumer Impact

  • Purely additive — no existing fields/behavior changed. Accessors can now read productSearch.getAccount_type() to filter product lists by account type; accessors that don't use it are unaffected.
  • path-accessor-central-pacific's ProductAccessor.list() will consume this field (tracked in MC-16678, separate PR).

How Has This Been Tested?

  • ./gradlew :mdx-models:test — all 575 existing tests pass.
  • ./gradlew :mdx-models:compileJava :mdx-models:checkstyleMain — clean (only pre-existing unrelated deprecation warnings).
  • No new dedicated unit test added — this module has no existing per-field tests for simple search/POJO models (ProductSearch, TransactionSearchRequest, etc. have none), so this follows existing convention.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@SandhyaBhatia
SandhyaBhatia merged commit 0b1c309 into master Oct 8, 2026
7 checks passed
@SandhyaBhatia
SandhyaBhatia deleted the sb/product-search-account-type branch October 8, 2026 22:22
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.

4 participants