Skip to content

Commit a29a736

Browse files
author
Gonzalo Cuadrado
committed
Fixed models according to Amazon SP API docs
1 parent d99fe43 commit a29a736

File tree

4 files changed

+101
-91
lines changed

4 files changed

+101
-91
lines changed

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/MerchantFulfillment/LabelDimensions.cs

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88
* Generated by: https://github.com/swagger-api/swagger-codegen.git
99
*/
1010

11-
using Newtonsoft.Json;
1211
using System;
13-
using System.Collections.Generic;
14-
using System.ComponentModel.DataAnnotations;
12+
using System.Linq;
1513
using System.IO;
16-
using System.Runtime.Serialization;
1714
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
1823

1924
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.MerchantFulfillment
2025
{
@@ -34,41 +39,41 @@ public partial class LabelDimensions : IEquatable<LabelDimensions>, IValidatable
3439
/// Initializes a new instance of the <see cref="LabelDimensions" /> class.
3540
/// </summary>
3641
[JsonConstructorAttribute]
37-
public LabelDimensions() { }
42+
protected LabelDimensions() { }
3843
/// <summary>
3944
/// Initializes a new instance of the <see cref="LabelDimensions" /> class.
4045
/// </summary>
41-
/// <param name="Length">The length dimension. (required).</param>
42-
/// <param name="Width">The width dimension. (required).</param>
43-
/// <param name="Unit">The unit of measurement. (required).</param>
44-
public LabelDimensions(LabelDimension Length = default(LabelDimension), LabelDimension Width = default(LabelDimension), UnitOfLength Unit = default(UnitOfLength))
46+
/// <param name="length">The length dimension. (required).</param>
47+
/// <param name="width">The width dimension. (required).</param>
48+
/// <param name="unit">The unit of measurement. (required).</param>
49+
public LabelDimensions(decimal? length = default(decimal?), decimal? width = default(decimal?), UnitOfLength unit = default(UnitOfLength))
4550
{
46-
// to ensure "Length" is required (not null)
47-
if (Length == null)
51+
// to ensure "length" is required (not null)
52+
if (length == null)
4853
{
49-
throw new InvalidDataException("Length is a required property for LabelDimensions and cannot be null");
54+
throw new InvalidDataException("length is a required property for LabelDimensions and cannot be null");
5055
}
5156
else
5257
{
53-
this.Length = Length;
58+
this.Length = length;
5459
}
55-
// to ensure "Width" is required (not null)
56-
if (Width == null)
60+
// to ensure "width" is required (not null)
61+
if (width == null)
5762
{
58-
throw new InvalidDataException("Width is a required property for LabelDimensions and cannot be null");
63+
throw new InvalidDataException("width is a required property for LabelDimensions and cannot be null");
5964
}
6065
else
6166
{
62-
this.Width = Width;
67+
this.Width = width;
6368
}
64-
// to ensure "Unit" is required (not null)
65-
if (Unit == null)
69+
// to ensure "unit" is required (not null)
70+
if (unit == null)
6671
{
67-
throw new InvalidDataException("Unit is a required property for LabelDimensions and cannot be null");
72+
throw new InvalidDataException("unit is a required property for LabelDimensions and cannot be null");
6873
}
6974
else
7075
{
71-
this.Unit = Unit;
76+
this.Unit = unit;
7277
}
7378
}
7479

@@ -77,14 +82,14 @@ public LabelDimensions() { }
7782
/// </summary>
7883
/// <value>The length dimension.</value>
7984
[DataMember(Name = "Length", EmitDefaultValue = false)]
80-
public LabelDimension Length { get; set; }
85+
public decimal? Length { get; set; }
8186

8287
/// <summary>
8388
/// The width dimension.
8489
/// </summary>
8590
/// <value>The width dimension.</value>
8691
[DataMember(Name = "Width", EmitDefaultValue = false)]
87-
public LabelDimension Width { get; set; }
92+
public decimal? Width { get; set; }
8893

8994

9095
/// <summary>
@@ -106,7 +111,7 @@ public override string ToString()
106111
/// Returns the JSON string presentation of the object
107112
/// </summary>
108113
/// <returns>JSON string presentation of the object</returns>
109-
public string ToJson()
114+
public virtual string ToJson()
110115
{
111116
return JsonConvert.SerializeObject(this, Formatting.Indented);
112117
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/MerchantFulfillment/PackageDimensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public partial class PackageDimensions : IEquatable<PackageDimensions>, IValidat
4242
/// <param name="Height">The height dimension. If you don&#39;t specify PredefinedPackageDimensions, you must specify the Height..</param>
4343
/// <param name="Unit">The unit of measurement. If you don&#39;t specify PredefinedPackageDimensions, you must specify the Unit..</param>
4444
/// <param name="PredefinedPackageDimensions">PredefinedPackageDimensions.</param>
45-
public PackageDimensions(double? Length = default(double?), double? Width = default(double?), double? Height = default(double?), UnitOfLength? Unit = default(UnitOfLength?), PredefinedPackageDimensions? PredefinedPackageDimensions = default(PredefinedPackageDimensions?))
45+
public PackageDimensions(int? Length = default(int?), int? Width = default(int?), int? Height = default(int?), UnitOfLength? Unit = default(UnitOfLength?), PredefinedPackageDimensions? PredefinedPackageDimensions = default(PredefinedPackageDimensions?))
4646
{
4747
this.Length = Length;
4848
this.Width = Width;
@@ -56,21 +56,21 @@ public partial class PackageDimensions : IEquatable<PackageDimensions>, IValidat
5656
/// </summary>
5757
/// <value>The length dimension. If you don&#39;t specify PredefinedPackageDimensions, you must specify the Length.</value>
5858
[DataMember(Name = "Length", EmitDefaultValue = false)]
59-
public double? Length { get; set; }
59+
public int? Length { get; set; }
6060

6161
/// <summary>
6262
/// The width dimension. If you don&#39;t specify PredefinedPackageDimensions, you must specify the Width.
6363
/// </summary>
6464
/// <value>The width dimension. If you don&#39;t specify PredefinedPackageDimensions, you must specify the Width.</value>
6565
[DataMember(Name = "Width", EmitDefaultValue = false)]
66-
public double? Width { get; set; }
66+
public int? Width { get; set; }
6767

6868
/// <summary>
6969
/// The height dimension. If you don&#39;t specify PredefinedPackageDimensions, you must specify the Height.
7070
/// </summary>
7171
/// <value>The height dimension. If you don&#39;t specify PredefinedPackageDimensions, you must specify the Height.</value>
7272
[DataMember(Name = "Height", EmitDefaultValue = false)]
73-
public double? Height { get; set; }
73+
public int? Height { get; set; }
7474

7575

7676

0 commit comments

Comments
 (0)