Skip to content

feat(financial-events): add ShipmentSettleEventList for DD+7 delivery date policy#943

Closed
ProNotion wants to merge 6 commits into
abuzuhri:mainfrom
ProNotion:feat/financial-events-shipment-settle-event-list
Closed

feat(financial-events): add ShipmentSettleEventList for DD+7 delivery date policy#943
ProNotion wants to merge 6 commits into
abuzuhri:mainfrom
ProNotion:feat/financial-events-shipment-settle-event-list

Conversation

@ProNotion

Copy link
Copy Markdown
Collaborator

Summary

Amazon returns a ShipmentSettleEventList in the v0 Finances API FinancialEvents response for orders subject to the Delivery Date Policy (DD+7). This property was missing from the FinancialEvents model, causing those settle events to be silently discarded during deserialisation.

Test plan

  • Build passes with 0 errors (dotnet build)
  • Confirm ShipmentSettleEventList is populated when deserialising a FinancialEvents response containing DD+7 settle events

ProNotion added 6 commits May 19, 2026 12:05
Implements all three Replenishment API endpoints via ReplenishmentService:
- GetSellingPartnerMetrics: account-level aggregated metrics
- ListOfferMetrics: ASIN-level metrics with filtering, sorting, and pagination
- ListOffers: selling partner offers with eligibility status and program config

Adds complete request models (GetSellingPartnerMetricsRequest,
ListOfferMetricsRequest, ListOffersRequest) with filter, pagination, and sort
sub-models; full response models including ReplenishmentMetric,
OfferProgramConfiguration, ForecastDelivery, and pagination support; and 8
supporting enums (ProgramType, EligibilityStatus, AutoEnrollmentPreference,
EnrollmentMethod, SortOrder, ListOfferMetricsSortKey, ListOffersSortKey).
Completes the Metric enum with 6 previously missing values. Registers
ReplenishmentService on AmazonConnection and adds RateLimitType entries for
all three operations.
…Detail

Adds sync and async overloads of GetLedgerDetail/GetLedgerDetailAsync that
accept a downloadPath parameter, saving the raw report to disk in addition
to returning parsed rows.

Also refactors the existing in-memory overloads: extracts the 90-day date
clamp into ClampLedgerDateRange (with doc comment explaining the API limit),
removes redundant list+AddRange pattern, and fixes the private helper naming
to distinguish stream vs file variants. XML documentation added to all public
methods and the private clamp helper.
…Detail

Tested against the live SP-API: GET_LEDGER_DETAIL_VIEW_DATA accepts date
ranges well beyond 90 days (confirmed back to at least ~19 months).
The official docs state 18 months of historical data is available.
The clamp was silently truncating fromDate without informing callers,
so it has been removed and the API is now the authority on range limits.
…upstream v1.9.28

Replace AMZDW fork's Replenishment implementation with the upstream-accepted
version from abuzuhri/Amazon-SP-API-CSharp v1.9.28. Upstream incorporated the
original PR and extended the models: ListOfferMetricsResponseOffer now correctly
reflects the flat API response structure, and the request models have been updated
to use JsonProperty throughout with revised pagination fields.

Also renames ReplenishmentApi url class references to ReplenishmentApiUrls to
match the naming convention used in ApiUrls.cs.
… enum query parameters

ParameterBased.getParameters() was calling .ToString() on enum values, producing
the C# identifier name (e.g. FINANCIALEVENTGROUPID) rather than the wire format
declared in [EnumMember(Value = "...")] (e.g. FINANCIAL_EVENT_GROUP_ID). This
caused every enum-typed query parameter to be silently rejected by Amazon APIs.

Fix: use StringEnumConverter (Newtonsoft.Json) for both the scalar enum and the
IEnumerable<TEnum> branches so [EnumMember] attribute values are honoured.

Also: type relatedIdentifierName on ParameterListFinancialTransactions20240619 as
RelatedIdentifierNameEnum? instead of string? now that the serialisation is correct.
… date policy

Amazon returns a ShipmentSettleEventList in the v0 FinancialEvents response for
orders subject to the Delivery Date Policy (DD+7). Adding the property to the
FinancialEvents model ensures these settle events are deserialised rather than
silently discarded.
@ProNotion ProNotion closed this Jun 4, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@ProNotion ProNotion deleted the feat/financial-events-shipment-settle-event-list branch June 4, 2026 05:02
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