Skip to content

Commit 1338c8e

Browse files
committed
fix #409
1 parent 167f0b4 commit 1338c8e

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ProductPricing/QuantityDiscountPriceType.cs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Newtonsoft.Json;
1717
using System.ComponentModel.DataAnnotations;
1818
using static FikaAmazonAPI.Utils.Constants;
19+
using FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems;
1920

2021
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing
2122
{
@@ -42,7 +43,7 @@ public QuantityDiscountPriceType() { }
4243
/// <param name="quantityTier">Indicates at what quantity this price becomes active. (required).</param>
4344
/// <param name="quantityDiscountType">Indicates the type of quantity discount this price applies to. (required).</param>
4445
/// <param name="listingPrice">The price at this quantity tier. (required).</param>
45-
public QuantityDiscountPriceType(int? quantityTier = default(int?), QuantityDiscountType quantityDiscountType = default(QuantityDiscountType), MoneyType listingPrice = default(MoneyType))
46+
public QuantityDiscountPriceType(int? quantityTier = default(int?), QuantityDiscountType quantityDiscountType = default(QuantityDiscountType), MoneyType price = default(MoneyType))
4647
{
4748
// to ensure "quantityTier" is required (not null)
4849
if (quantityTier == null)
@@ -63,13 +64,13 @@ public QuantityDiscountPriceType() { }
6364
this.QuantityDiscountType = quantityDiscountType;
6465
}
6566
// to ensure "listingPrice" is required (not null)
66-
if (listingPrice == null)
67+
if (price == null)
6768
{
6869
throw new InvalidDataException("listingPrice is a required property for QuantityDiscountPriceType and cannot be null");
6970
}
7071
else
7172
{
72-
this.ListingPrice = listingPrice;
73+
this.Price = price;
7374
}
7475
}
7576

@@ -85,8 +86,8 @@ public QuantityDiscountPriceType() { }
8586
/// The price at this quantity tier.
8687
/// </summary>
8788
/// <value>The price at this quantity tier.</value>
88-
[DataMember(Name="listingPrice", EmitDefaultValue=false)]
89-
public MoneyType ListingPrice { get; set; }
89+
[DataMember(Name= "price", EmitDefaultValue=false)]
90+
public MoneyType Price { get; set; }
9091

9192
/// <summary>
9293
/// Returns the string presentation of the object
@@ -98,7 +99,7 @@ public override string ToString()
9899
sb.Append("class QuantityDiscountPriceType {\n");
99100
sb.Append(" QuantityTier: ").Append(QuantityTier).Append("\n");
100101
sb.Append(" QuantityDiscountType: ").Append(QuantityDiscountType).Append("\n");
101-
sb.Append(" ListingPrice: ").Append(ListingPrice).Append("\n");
102+
sb.Append(" ListingPrice: ").Append(Price).Append("\n");
102103
sb.Append("}\n");
103104
return sb.ToString();
104105
}
@@ -144,9 +145,9 @@ public bool Equals(QuantityDiscountPriceType input)
144145
this.QuantityDiscountType.Equals(input.QuantityDiscountType))
145146
) &&
146147
(
147-
this.ListingPrice == input.ListingPrice ||
148-
(this.ListingPrice != null &&
149-
this.ListingPrice.Equals(input.ListingPrice))
148+
this.Price == input.Price ||
149+
(this.Price != null &&
150+
this.Price.Equals(input.Price))
150151
);
151152
}
152153

@@ -163,8 +164,8 @@ public override int GetHashCode()
163164
hashCode = hashCode * 59 + this.QuantityTier.GetHashCode();
164165
if (this.QuantityDiscountType != null)
165166
hashCode = hashCode * 59 + this.QuantityDiscountType.GetHashCode();
166-
if (this.ListingPrice != null)
167-
hashCode = hashCode * 59 + this.ListingPrice.GetHashCode();
167+
if (this.Price != null)
168+
hashCode = hashCode * 59 + this.Price.GetHashCode();
168169
return hashCode;
169170
}
170171
}

0 commit comments

Comments
 (0)