Skip to content

Commit a3b20a6

Browse files
committed
fix Quantity bug
1 parent 0aab922 commit a3b20a6

13 files changed

+28
-263
lines changed

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/BoxContentsFeeDetails.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public partial class BoxContentsFeeDetails : IEquatable<BoxContentsFeeDetails>,
2929
/// <param name="TotalUnits">The number of units to ship..</param>
3030
/// <param name="FeePerUnit">The manual processing fee per unit..</param>
3131
/// <param name="TotalFee">The total manual processing fee for the shipment..</param>
32-
public BoxContentsFeeDetails(Quantity TotalUnits = default(Quantity), Amount FeePerUnit = default(Amount), Amount TotalFee = default(Amount))
32+
public BoxContentsFeeDetails(int TotalUnits = default(int), Amount FeePerUnit = default(Amount), Amount TotalFee = default(Amount))
3333
{
3434
this.TotalUnits = TotalUnits;
3535
this.FeePerUnit = FeePerUnit;
@@ -41,7 +41,7 @@ public partial class BoxContentsFeeDetails : IEquatable<BoxContentsFeeDetails>,
4141
/// </summary>
4242
/// <value>The number of units to ship.</value>
4343
[DataMember(Name = "TotalUnits", EmitDefaultValue = false)]
44-
public Quantity TotalUnits { get; set; }
44+
public int TotalUnits { get; set; }
4545

4646
/// <summary>
4747
/// The manual processing fee per unit.
@@ -102,11 +102,7 @@ public bool Equals(BoxContentsFeeDetails input)
102102
return false;
103103

104104
return
105-
(
106-
this.TotalUnits == input.TotalUnits ||
107-
(this.TotalUnits != null &&
108-
this.TotalUnits.Equals(input.TotalUnits))
109-
) &&
105+
110106
(
111107
this.FeePerUnit == input.FeePerUnit ||
112108
(this.FeePerUnit != null &&
@@ -128,8 +124,6 @@ public override int GetHashCode()
128124
unchecked // Overflow is fine, just wrap
129125
{
130126
int hashCode = 41;
131-
if (this.TotalUnits != null)
132-
hashCode = hashCode * 59 + this.TotalUnits.GetHashCode();
133127
if (this.FeePerUnit != null)
134128
hashCode = hashCode * 59 + this.FeePerUnit.GetHashCode();
135129
if (this.TotalFee != null)

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/InboundShipmentItem.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public InboundShipmentItem() { }
4040
/// <param name="QuantityInCase">The item quantity in each case, for case-packed items. Note that QuantityInCase multiplied by the number of boxes in the inbound shipment equals QuantityShipped. Also note that all of the boxes of an inbound shipment must either be case packed or individually packed. For that reason, when you submit the createInboundShipment or the updateInboundShipment operation, the value of QuantityInCase must be provided for every item in the shipment or for none of the items in the shipment..</param>
4141
/// <param name="ReleaseDate">The date that a pre-order item will be available for sale..</param>
4242
/// <param name="PrepDetailsList">PrepDetailsList.</param>
43-
public InboundShipmentItem(string ShipmentId = default(string), string SellerSKU = default(string), string FulfillmentNetworkSKU = default(string), Quantity QuantityShipped = default(Quantity), Quantity QuantityReceived = default(Quantity), Quantity QuantityInCase = default(Quantity), DateStringType ReleaseDate = default(DateStringType), PrepDetailsList PrepDetailsList = default(PrepDetailsList))
43+
public InboundShipmentItem(string ShipmentId = default(string), string SellerSKU = default(string), string FulfillmentNetworkSKU = default(string), int QuantityShipped = default(int), int QuantityReceived = default(int), int QuantityInCase = default(int), DateStringType ReleaseDate = default(DateStringType), PrepDetailsList PrepDetailsList = default(PrepDetailsList))
4444
{
4545
// to ensure "SellerSKU" is required (not null)
4646
if (SellerSKU == null)
@@ -94,21 +94,21 @@ public InboundShipmentItem() { }
9494
/// </summary>
9595
/// <value>The item quantity that you are shipping.</value>
9696
[DataMember(Name = "QuantityShipped", EmitDefaultValue = false)]
97-
public Quantity QuantityShipped { get; set; }
97+
public int QuantityShipped { get; set; }
9898

9999
/// <summary>
100100
/// The item quantity that has been received at an Amazon fulfillment center.
101101
/// </summary>
102102
/// <value>The item quantity that has been received at an Amazon fulfillment center.</value>
103103
[DataMember(Name = "QuantityReceived", EmitDefaultValue = false)]
104-
public Quantity QuantityReceived { get; set; }
104+
public int QuantityReceived { get; set; }
105105

106106
/// <summary>
107107
/// The item quantity in each case, for case-packed items. Note that QuantityInCase multiplied by the number of boxes in the inbound shipment equals QuantityShipped. Also note that all of the boxes of an inbound shipment must either be case packed or individually packed. For that reason, when you submit the createInboundShipment or the updateInboundShipment operation, the value of QuantityInCase must be provided for every item in the shipment or for none of the items in the shipment.
108108
/// </summary>
109109
/// <value>The item quantity in each case, for case-packed items. Note that QuantityInCase multiplied by the number of boxes in the inbound shipment equals QuantityShipped. Also note that all of the boxes of an inbound shipment must either be case packed or individually packed. For that reason, when you submit the createInboundShipment or the updateInboundShipment operation, the value of QuantityInCase must be provided for every item in the shipment or for none of the items in the shipment.</value>
110110
[DataMember(Name = "QuantityInCase", EmitDefaultValue = false)]
111-
public Quantity QuantityInCase { get; set; }
111+
public int QuantityInCase { get; set; }
112112

113113
/// <summary>
114114
/// The date that a pre-order item will be available for sale.

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/InboundShipmentPlanItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public InboundShipmentPlanItem() { }
3636
/// <param name="FulfillmentNetworkSKU">Amazon&#39;s fulfillment network SKU of the item. (required).</param>
3737
/// <param name="Quantity">The item quantity that you are shipping. (required).</param>
3838
/// <param name="PrepDetailsList">PrepDetailsList.</param>
39-
public InboundShipmentPlanItem(string SellerSKU = default(string), string FulfillmentNetworkSKU = default(string), Quantity Quantity = default(Quantity), PrepDetailsList PrepDetailsList = default(PrepDetailsList))
39+
public InboundShipmentPlanItem(string SellerSKU = default(string), string FulfillmentNetworkSKU = default(string), int Quantity = default(int), PrepDetailsList PrepDetailsList = default(PrepDetailsList))
4040
{
4141
// to ensure "SellerSKU" is required (not null)
4242
if (SellerSKU == null)
@@ -87,7 +87,7 @@ public InboundShipmentPlanItem() { }
8787
/// </summary>
8888
/// <value>The item quantity that you are shipping.</value>
8989
[DataMember(Name = "Quantity", EmitDefaultValue = false)]
90-
public Quantity Quantity { get; set; }
90+
public int Quantity { get; set; }
9191

9292
/// <summary>
9393
/// Gets or Sets PrepDetailsList

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/InboundShipmentPlanRequestItem.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public InboundShipmentPlanRequestItem() { }
4343
/// <param name="Quantity">Quantity (required).</param>
4444
/// <param name="QuantityInCase">The item quantity in each case, for case-packed items. Note that QuantityInCase multiplied by the number of cases in the inbound shipment equals Quantity. Also note that all of the boxes of an inbound shipment must either be case packed or individually packed. For that reason, when you submit the createInboundShipmentPlan operation, the value of QuantityInCase must be provided for every item in the shipment or for none of the items in the shipment..</param>
4545
/// <param name="PrepDetailsList">PrepDetailsList.</param>
46-
public InboundShipmentPlanRequestItem(string SellerSKU = default(string), string ASIN = default(string), Condition Condition = default(Condition), Quantity Quantity = default(Quantity), Quantity QuantityInCase = default(Quantity), PrepDetailsList PrepDetailsList = default(PrepDetailsList))
46+
public InboundShipmentPlanRequestItem(string SellerSKU = default(string), string ASIN = default(string), Condition Condition = default(Condition), int Quantity = default(int), int QuantityInCase = default(int), PrepDetailsList PrepDetailsList = default(PrepDetailsList))
4747
{
4848
// to ensure "SellerSKU" is required (not null)
4949
if (SellerSKU == null)
@@ -104,14 +104,14 @@ public InboundShipmentPlanRequestItem() { }
104104
/// Gets or Sets Quantity
105105
/// </summary>
106106
[DataMember(Name = "Quantity", EmitDefaultValue = false)]
107-
public Quantity Quantity { get; set; }
107+
public int Quantity { get; set; }
108108

109109
/// <summary>
110110
/// The item quantity in each case, for case-packed items. Note that QuantityInCase multiplied by the number of cases in the inbound shipment equals Quantity. Also note that all of the boxes of an inbound shipment must either be case packed or individually packed. For that reason, when you submit the createInboundShipmentPlan operation, the value of QuantityInCase must be provided for every item in the shipment or for none of the items in the shipment.
111111
/// </summary>
112112
/// <value>The item quantity in each case, for case-packed items. Note that QuantityInCase multiplied by the number of cases in the inbound shipment equals Quantity. Also note that all of the boxes of an inbound shipment must either be case packed or individually packed. For that reason, when you submit the createInboundShipmentPlan operation, the value of QuantityInCase must be provided for every item in the shipment or for none of the items in the shipment.</value>
113113
[DataMember(Name = "QuantityInCase", EmitDefaultValue = false)]
114-
public Quantity QuantityInCase { get; set; }
114+
public int QuantityInCase { get; set; }
115115

116116
/// <summary>
117117
/// Gets or Sets PrepDetailsList
@@ -214,10 +214,6 @@ public override int GetHashCode()
214214
hashCode = hashCode * 59 + this.ASIN.GetHashCode();
215215
if (this.Condition != null)
216216
hashCode = hashCode * 59 + this.Condition.GetHashCode();
217-
if (this.Quantity != null)
218-
hashCode = hashCode * 59 + this.Quantity.GetHashCode();
219-
if (this.QuantityInCase != null)
220-
hashCode = hashCode * 59 + this.QuantityInCase.GetHashCode();
221217
if (this.PrepDetailsList != null)
222218
hashCode = hashCode * 59 + this.PrepDetailsList.GetHashCode();
223219
return hashCode;

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/Quantity.cs

Lines changed: 0 additions & 102 deletions
This file was deleted.

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentOutbound/CreateFulfillmentOrderItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public CreateFulfillmentOrderItem() { }
4141
/// <param name="PerUnitDeclaredValue">The monetary value assigned by the seller to this item..</param>
4242
/// <param name="PerUnitPrice">The amount to be collected from the recipient for this item in a COD (Cash On Delivery) order..</param>
4343
/// <param name="PerUnitTax">The tax on the amount to be collected from the recipient for this item in a COD (Cash On Delivery) order..</param>
44-
public CreateFulfillmentOrderItem(string SellerSKU = default(string), string SellerFulfillmentOrderItemId = default(string), Quantity Quantity = default(Quantity), string GiftMessage = default(string), string DisplayableComment = default(string), string FulfillmentNetworkSKU = default(string), Currency PerUnitDeclaredValue = default(Currency), Currency PerUnitPrice = default(Currency), Currency PerUnitTax = default(Currency))
44+
public CreateFulfillmentOrderItem(string SellerSKU = default(string), string SellerFulfillmentOrderItemId = default(string), int Quantity = default(int), string GiftMessage = default(string), string DisplayableComment = default(string), string FulfillmentNetworkSKU = default(string), Currency PerUnitDeclaredValue = default(Currency), Currency PerUnitPrice = default(Currency), Currency PerUnitTax = default(Currency))
4545
{
4646
// to ensure "SellerSKU" is required (not null)
4747
if (SellerSKU == null)
@@ -96,7 +96,7 @@ public CreateFulfillmentOrderItem() { }
9696
/// Gets or Sets Quantity
9797
/// </summary>
9898
[DataMember(Name = "Quantity", EmitDefaultValue = false)]
99-
public Quantity Quantity { get; set; }
99+
public int Quantity { get; set; }
100100

101101
/// <summary>
102102
/// A message to the gift recipient, if applicable.

0 commit comments

Comments
 (0)