Skip to content

Commit d80ff48

Browse files
author
dev_chenjiawen
committed
added getFeaturedOfferExpectedPriceBatch api
1 parent a5b9a9b commit d80ff48

17 files changed

+392
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,13 @@ var data = amazonConnection.ProductPricing.GetCompetitivePricing(
352352
});
353353
```
354354

355+
### GetFeaturedOfferExpectedPriceBatch
356+
```CSharp
357+
358+
var priceDemo = new ProductPricingSample(amazonConnection);
359+
await priceDemo.GetFeaturedOfferExpectedPriceBatch();
360+
```
361+
355362

356363
### Notifications Create Destination, For more Notifications sample please check [Here](https://github.com/abuzuhri/Amazon-SP-API-CSharp/blob/main/Source/FikaAmazonAPI.SampleCode/NotificationsSample.cs).
357364
```CSharp

Source/FikaAmazonAPI.SampleCode/ProductPricingSample.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using FikaAmazonAPI.Parameter.ProductPricing;
2+
using FikaAmazonAPI.Parameter.ProductPricing.v2022_05_01;
23
using FikaAmazonAPI.Utils;
34
using static FikaAmazonAPI.Utils.Constants;
45

@@ -117,5 +118,24 @@ public async Task GetListingOffersBatch()
117118
;
118119

119120
}
121+
122+
public async Task GetFeaturedOfferExpectedPriceBatch()
123+
{
124+
var data = await amazonConnection.ProductPricing.GetFeaturedOfferExpectedPriceBatchAsync(new GetFeaturedOfferExpectedPriceBatchRequest
125+
{
126+
FeaturedOfferExpectedPriceRequestLists = new List<FeaturedOfferExpectedPriceRequest>
127+
{
128+
new FeaturedOfferExpectedPriceRequest
129+
{
130+
SellerSku = "SellerSKU_01",
131+
MarketplaceId = MarketPlace.Germany.ID,
132+
},
133+
new FeaturedOfferExpectedPriceRequest{
134+
SellerSku = "SellerSKU_02",
135+
MarketplaceId = MarketPlace.Germany.ID,
136+
}
137+
}
138+
});
139+
}
120140
}
121141
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Newtonsoft.Json;
2+
3+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
4+
{
5+
public class FeaturedOffer
6+
{
7+
/// <summary>
8+
/// An offer identifier used to identify the merchant of the featured offer. Since this may not belong to the requester, the SKU field will be omitted.
9+
/// </summary>
10+
[JsonProperty("offerIdentifier")]
11+
public OfferIdentifier OfferIdentifier { get; set; }
12+
13+
/// <summary>
14+
/// The item condition.
15+
/// </summary>
16+
[JsonProperty("condition")]
17+
public ConditionType Condition { get; set; }
18+
19+
[JsonProperty("price")]
20+
public Price Price { get; set; }
21+
}
22+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Newtonsoft.Json;
2+
3+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
4+
{
5+
public class FeaturedOfferExpectedPrice
6+
{
7+
/// <summary>
8+
/// A computed listing price at or below which a seller can expect to become the featured offer (before applicable promotions).
9+
/// </summary>
10+
[JsonProperty("listingPrice")]
11+
public MoneyType ListingPrice { get; set; }
12+
13+
/// <summary>
14+
/// The number of Amazon Points offered with the purchase of an item, and their monetary value.
15+
/// </summary>
16+
[JsonProperty("points")]
17+
public Points Points { get; set; }
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Newtonsoft.Json;
2+
3+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
4+
{
5+
public class FeaturedOfferExpectedPriceRequestParams
6+
{
7+
/// <summary>
8+
/// A marketplace identifier. Specifies the marketplace for which data is returned.
9+
/// </summary>
10+
[JsonProperty("marketplaceId")]
11+
public string MarketplaceId { get; set; }
12+
13+
/// <summary>
14+
/// The seller SKU of the item.
15+
/// </summary>
16+
[JsonProperty("sku")]
17+
public string SellerSku { get; set; }
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
3+
4+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
5+
{
6+
public class FeaturedOfferExpectedPriceResponse
7+
{
8+
/// <summary>
9+
/// A mapping of additional HTTP headers to send/receive for an individual request within a batch.
10+
/// </summary>
11+
[JsonProperty("headers")]
12+
public Dictionary<string,string> Headers { get; set; }
13+
14+
/// <summary>
15+
/// The HTTP status line associated with the response to an individual request within a batch. For more information, consult RFC 2616.
16+
/// </summary>
17+
[JsonProperty("status")]
18+
public HttpStatusLine Status { get; set; }
19+
20+
/// <summary>
21+
/// Use these request parameters to map the response back to the request.
22+
/// </summary>
23+
[JsonProperty("request")]
24+
public FeaturedOfferExpectedPriceRequestParams Request { get; set; }
25+
26+
/// <summary>
27+
/// The featured offer expected price response data for a requested SKU.
28+
/// </summary>
29+
[JsonProperty("body")]
30+
public FeaturedOfferExpectedPriceResponseBody Body { get; set; }
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
3+
4+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
5+
{
6+
public class FeaturedOfferExpectedPriceResponseBody
7+
{
8+
/// <summary>
9+
/// Metadata that identifies the target offer for which the featured offer expected price result data was computed.
10+
/// </summary>
11+
[JsonProperty("offerIdentifier")]
12+
public OfferIdentifier OfferIdentifier { get; set; }
13+
14+
/// <summary>
15+
/// The featured offer expected price results for the requested target offer.
16+
/// </summary>
17+
[JsonProperty("featuredOfferExpectedPriceResults")]
18+
public List<FeaturedOfferExpectedPriceResult> FeaturedOfferExpectedPriceResultList { get; set; }
19+
20+
/// <summary>
21+
/// The errors that occurred if the operation was not successful (HTTP status code non-200).
22+
/// </summary>
23+
[JsonProperty("errors")]
24+
public ErrorList ErrorList { get; set; }
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Newtonsoft.Json;
2+
3+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
4+
{
5+
public class FeaturedOfferExpectedPriceResult
6+
{
7+
/// <summary>
8+
/// The item price at or below which the target offer may be featured.
9+
/// </summary>
10+
[JsonProperty("featuredOfferExpectedPrice")]
11+
public FeaturedOfferExpectedPrice FeaturedOfferExpectedPrice { get; set; }
12+
13+
/// <summary>
14+
/// The status of the featured offer expected price computation. Possible values include VALID_FOEP, NO_COMPETING_OFFER, OFFER_NOT_ELIGIBLE, OFFER_NOT_FOUND.
15+
/// </summary>
16+
[JsonProperty("resultStatus")]
17+
public string ResultStatus { get; set; }
18+
19+
/// <summary>
20+
/// The offer that will likely be the featured offer if the target offer is priced above its featured offer expected price. If the target offer is currently the featured offer, this property will be different than currentFeaturedOffer.
21+
/// </summary>
22+
[JsonProperty("competingFeaturedOffer")]
23+
public FeaturedOffer CompetingFeaturedOffer { get; set; }
24+
25+
/// <summary>
26+
/// The offer that is currently the featured offer. If the target offer is not currently featured, this property will be equal to competingFeaturedOffer.
27+
/// </summary>
28+
[JsonProperty("currentFeaturedOffer")]
29+
public FeaturedOffer CurrentFeaturedOffer { get; set; }
30+
}
31+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Newtonsoft.Json;
2+
using Newtonsoft.Json.Converters;
3+
4+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
5+
{
6+
[JsonConverter(typeof(StringEnumConverter))]
7+
public enum FulfillmentType
8+
{
9+
AFN,
10+
MFN
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
3+
4+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing.v2022_05_01
5+
{
6+
public class GetFeaturedOfferExpectedPriceBatchResponse
7+
{
8+
/// <summary>
9+
/// A batched list of featured offer expected price responses.
10+
/// </summary>
11+
[JsonProperty("responses")]
12+
public List<FeaturedOfferExpectedPriceResponse> FeaturedOfferExpectedPriceResponseList { get; set; }
13+
}
14+
}

0 commit comments

Comments
 (0)