Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions Source/FikaAmazonAPI/Parameter/ProductPricing/ItemOffersRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,17 @@ public string Uri
[JsonProperty("method")]
public HttpMethodEnum HttpMethod { get; set; }

//[JsonProperty("headers")]
//public Dictionary<string, string> Headers { get; set; }

[JsonProperty("queryParams")]
// Amazon changed their batch API contract: query params must be serialized at the top level, not nested under "queryParams".
[JsonIgnore]
public ParameterGetItemOffers QueryParams { get; set; }

///// <summary>
///// A marketplace identifier. Specifies the marketplace for which prices are returned.
///// </summary>
//[DataMember(Name = "MarketplaceId")]
//public string MarketplaceId { get; set; }

//[DataMember(Name = "ItemCondition")]
//public ItemCondition ItemCondition { get; set; }
[JsonProperty("MarketplaceId")]
public string MarketplaceId => QueryParams?.MarketplaceId;

//[DataMember(Name = "CustomerType")]
//public CustomerType? CustomerType { get; set; }
[JsonProperty("ItemCondition")]
public ItemCondition ItemCondition => QueryParams?.ItemCondition ?? default;

//[JsonIgnore]
//public string Asin { get; set; }
[JsonProperty("CustomerType")]
public CustomerType? CustomerType => QueryParams?.CustomerType;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ public string Uri
[JsonProperty("method")]
public HttpMethodEnum HttpMethod { get; set; }

//[JsonProperty("headers")]
//public Dictionary<string, string> Headers { get; set; }

[JsonProperty("queryParams")]
// Amazon changed their batch API contract: query params must be serialized at the top level, not nested under "queryParams".
[JsonIgnore]
public ParameterGetListingOffers QueryParams { get; set; }

[JsonProperty("MarketplaceId")]
public string MarketplaceId => QueryParams?.MarketplaceId;

[JsonProperty("ItemCondition")]
public ItemCondition ItemCondition => QueryParams?.ItemCondition ?? default;

[JsonProperty("CustomerType")]
public CustomerType? CustomerType => QueryParams?.CustomerType;
}
}
Loading