Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new fields: EventFilter.OrderChangeTypes and AmazonInvalidInputException.Details #665

Merged
merged 4 commits into from
Oct 8, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ public AmazonUnauthorizedException(string msg, RestResponse response = null) : b

public class AmazonInvalidInputException : AmazonException
{
public AmazonInvalidInputException(string msg, RestResponse response = null) : base(msg, response)
{
public string Details { get; set; }

public AmazonInvalidInputException(string msg, string details = null, RestResponse response = null) : base(msg, response)
{
this.Details = details;
//this.Data["Details"] = details;
}
}

public class AmazonQuotaExceededException : AmazonException
{
public AmazonQuotaExceededException(string msg, RestResponse response = null) : base(msg, response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ public class EventFilter : AggregationFilter
[JsonProperty(PropertyName = "eventFilterType")]
public string EventFilterType { get; set; }

/// <summary>
/// Gets or Sets OrderChangeTypes
/// </summary>
[DataMember(Name = "orderChangeTypes", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "orderChangeTypes")]
public IList<string> OrderChangeTypes { get; set; }


/// <summary>
/// Get the string presentation of the object
Expand All @@ -37,6 +44,7 @@ public override string ToString()
sb.Append("class EventFilter {\n");
sb.Append(" MarketplaceIds: ").Append(MarketplaceIds).Append("\n");
sb.Append(" EventFilterType: ").Append(EventFilterType).Append("\n");
sb.Append(" OrderChangeTypes: ").Append(OrderChangeTypes).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down
6 changes: 3 additions & 3 deletions Source/FikaAmazonAPI/FikaAmazonAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<Product>CSharp Amazon Sp API</Product>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<LangVersion>8.0</LangVersion>
<Version>1.7.2</Version>
<AssemblyVersion>1.7.2</AssemblyVersion>
<FileVersion>1.7.2</FileVersion>
<Version>1.7.3</Version>
<AssemblyVersion>1.7.3</AssemblyVersion>
<FileVersion>1.7.3</FileVersion>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/abuzuhri/Amazon-SP-API-CSharp</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
2 changes: 1 addition & 1 deletion Source/FikaAmazonAPI/Services/RequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ protected void ParseResponse(RestResponse response)
case "InvalidSignature":
throw new AmazonInvalidSignatureException(error.Message, response);
case "InvalidInput":
throw new AmazonInvalidInputException(error.Message, response);
throw new AmazonInvalidInputException(error.Message, error.Details, response);
case "QuotaExceeded":
throw new AmazonQuotaExceededException(error.Message, response);
case "InternalFailure":
Expand Down
Loading