Skip to content

Commit 91c1b2f

Browse files
authored
Merge pull request #171 from J-W-Chan/main
add missing parameter
2 parents 5b4b30b + f05b01c commit 91c1b2f

File tree

2 files changed

+55
-6
lines changed

2 files changed

+55
-6
lines changed

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ProductFees/FeesEstimateRequest.cs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public FeesEstimateRequest() { }
3636
/// <param name="IsAmazonFulfilled">When true, the offer is fulfilled by Amazon..</param>
3737
/// <param name="PriceToEstimateFees">The product price that the fee estimate is based on. (required).</param>
3838
/// <param name="Identifier">The product price on which the fee estimate is based. (required).</param>
39-
public FeesEstimateRequest(string MarketplaceId, bool? IsAmazonFulfilled = default(bool?), PriceToEstimateFees PriceToEstimateFees = default(PriceToEstimateFees), string Identifier = default(string))
39+
public FeesEstimateRequest(string MarketplaceId, bool? IsAmazonFulfilled = default(bool?), PriceToEstimateFees PriceToEstimateFees = default(PriceToEstimateFees), string Identifier = default(string), OptionalFulfillmentProgramEnum optionalFulfillmentProgram = default(OptionalFulfillmentProgramEnum))
4040
{
4141
// to ensure "MarketplaceId" is required (not null)
4242
if (MarketplaceId == null)
@@ -66,12 +66,13 @@ public FeesEstimateRequest() { }
6666
this.Identifier = Identifier;
6767
}
6868
this.IsAmazonFulfilled = IsAmazonFulfilled;
69+
this.OptionalFulfillmentProgram = optionalFulfillmentProgram;
6970
}
70-
/// <summary>
71-
/// A marketplace identifier.
72-
/// </summary>
73-
/// <value>A marketplace identifier.</value>
74-
[DataMember(Name = "MarketplaceId", EmitDefaultValue = false)]
71+
/// <summary>
72+
/// A marketplace identifier.
73+
/// </summary>
74+
/// <value>A marketplace identifier.</value>
75+
[DataMember(Name = "MarketplaceId", EmitDefaultValue = false)]
7576
public string MarketplaceId { get; set; }
7677

7778
/// <summary>
@@ -95,6 +96,12 @@ public FeesEstimateRequest() { }
9596
[DataMember(Name = "Identifier", EmitDefaultValue = false)]
9697
public string Identifier { get; set; }
9798

99+
/// <summary>
100+
/// An optional enrollment program to return the estimated fees when the offer is fulfilled by Amazon (IsAmazonFulfilled is set to true).
101+
/// </summary>
102+
[DataMember(Name = "OptionalFulfillmentProgram", EmitDefaultValue = false)]
103+
public OptionalFulfillmentProgramEnum? OptionalFulfillmentProgram { get; set; }
104+
98105
/// <summary>
99106
/// Returns the string presentation of the object
100107
/// </summary>
@@ -107,6 +114,7 @@ public override string ToString()
107114
sb.Append(" IsAmazonFulfilled: ").Append(IsAmazonFulfilled).Append("\n");
108115
sb.Append(" PriceToEstimateFees: ").Append(PriceToEstimateFees).Append("\n");
109116
sb.Append(" Identifier: ").Append(Identifier).Append("\n");
117+
sb.Append(" OptionalFulfillmentProgram: ").Append(OptionalFulfillmentProgram).Append("\n");
110118
sb.Append("}\n");
111119
return sb.ToString();
112120
}
@@ -160,6 +168,11 @@ public bool Equals(FeesEstimateRequest input)
160168
this.Identifier == input.Identifier ||
161169
(this.Identifier != null &&
162170
this.Identifier.Equals(input.Identifier))
171+
) &&
172+
(
173+
this.OptionalFulfillmentProgram == input.OptionalFulfillmentProgram ||
174+
(this.OptionalFulfillmentProgram != null &&
175+
this.OptionalFulfillmentProgram.Equals(input.OptionalFulfillmentProgram))
163176
);
164177
}
165178

@@ -180,6 +193,8 @@ public override int GetHashCode()
180193
hashCode = hashCode * 59 + this.PriceToEstimateFees.GetHashCode();
181194
if (this.Identifier != null)
182195
hashCode = hashCode * 59 + this.Identifier.GetHashCode();
196+
if (this.OptionalFulfillmentProgram != null)
197+
hashCode = hashCode * 59 + this.OptionalFulfillmentProgram.GetHashCode();
183198
return hashCode;
184199
}
185200
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Newtonsoft.Json;
2+
using Newtonsoft.Json.Converters;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Runtime.Serialization;
6+
using System.Text;
7+
8+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductFees
9+
{
10+
/// <summary>
11+
/// An optional enrollment program to return the estimated fees when the offer is fulfilled by Amazon (IsAmazonFulfilled is set to true).
12+
/// </summary>
13+
[JsonConverter(typeof(StringEnumConverter))]
14+
public enum OptionalFulfillmentProgramEnum
15+
{
16+
/// <summary>
17+
/// Returns the standard Amazon fulfillment fees for the offer. This is the default.
18+
/// </summary>
19+
[EnumMember(Value = "FBA_CORE")]
20+
FBA_CORE,
21+
22+
/// <summary>
23+
/// Returns the FBA Small and Light (SNL) fees for the offer. The SNL program offers reduced fulfillment costs on qualified items. To check item eligibility for the SNL program, use the getSmallAndLightEligibilityBySellerSKU operation of the FBA Small And Light API.
24+
/// </summary>
25+
[EnumMember(Value = "FBA_SNL")]
26+
FBA_SNL,
27+
28+
/// <summary>
29+
/// Returns the cross-border European Fulfillment Network fees across EU countries for the offer.
30+
/// </summary>
31+
[EnumMember(Value = "FBA_EFN")]
32+
FBA_EFN
33+
}
34+
}

0 commit comments

Comments
 (0)