feat(financial-events): add ShipmentSettleEventList for DD+7 delivery date policy#943
Closed
ProNotion wants to merge 6 commits into
Closed
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Amazon returns a
ShipmentSettleEventListin the v0 Finances APIFinancialEventsresponse for orders subject to the Delivery Date Policy (DD+7). This property was missing from theFinancialEventsmodel, causing those settle events to be silently discarded during deserialisation.Test plan
dotnet build)ShipmentSettleEventListis populated when deserialising aFinancialEventsresponse containing DD+7 settle events