Fix/offersv2 prime #16
Open
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.
This PR add support to new Offers for Prime, min 30 days price and all new features.
Successfully tested in production with a large database of products (22k). Official documentation here.
This pull request updates the way offers are handled in both the
GetItemsandGetVariationsoperations by introducing a new resource,OffersV2Full, which includes additional deal details. The main changes ensure that when the "OffersV2" option is selected, the more comprehensiveOffersV2Fullresource (with deal details) is used instead of the previousOffersV2.Resource enhancements:
OffersV2Fullresource insrc/resources/OffersV2Full.php, which extends the baseResourceclass and includes additional fields such asListings.DealDetailsfor more comprehensive offer information.Updates to operations:
GetItemsandGetVariationsto useOffersV2Fullinstead ofOffersV2, ensuring that deal details are included when the V2 offers option is selected. (src/operations/GetItems.php, [1];src/operations/GetVariations.php, [2]GetItemsandGetVariationsso that the conditional logic now selectsOffersV2Full(with deal details) instead of the previousOffersV2resource when the$isOffersV2flag is true. (src/operations/GetItems.php, [1];src/operations/GetVariations.php, [2]