Skip to content

fix: add missing PRODUCT and LISTING values to IssueCategory enum - #954

Merged
abuzuhri merged 1 commit into
abuzuhri:mainfrom
Waimanu-IT:fix/IssueCategoryMissingEnumValues
Sep 14, 2026
Merged

abuzuhri merged 1 commit into
abuzuhri:mainfrom
Waimanu-IT:fix/IssueCategoryMissingEnumValues

Conversation

@Tigereye2k6

Copy link
Copy Markdown
Contributor

Summary

IssueCategory was missing two of the values defined in Amazon's Listings Items API model. This PR adds them:

  • PRODUCT
  • LISTING

Source of truth: listingsItems_2021-08-01.json in amzn/selling-partner-api-models, where the Issue.categories property lists these values alongside the ones already present.

Problem

Issue.Categories (Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ListingsItems/Issue.cs) is typed as List<IssueCategory> and the enum is deserialized with Newtonsoft's StringEnumConverter. When Amazon returns an issue categorized as PRODUCT or LISTING, deserialization fails and the exception propagates out of the Listings Items call — so a single unrecognized category value breaks the entire response, not just that one field.

Changes

  • Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ListingsItems/IssueCategoryEnum.cs: added PRODUCT = 9 and LISTING = 10 with the matching [EnumMember(Value = ...)] attributes, following the existing formatting and XML-doc style of the file.

Compatibility

Purely additive. The new members are appended after the existing ones, so no existing numeric value changes and no current behavior is affected. Callers that switch over IssueCategory may want to handle the two new cases.

@sonarqubecloud

Copy link
Copy Markdown

@dansharpe83

Copy link
Copy Markdown
Contributor

@abuzuhri is it possible to get this one pushed through? its causing issues, although i appreciate this was a non documented change by amazon

@abuzuhri
abuzuhri merged commit 331133e into abuzuhri:main Sep 14, 2026
3 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