Skip to content

Commit 3097df7

Browse files
authored
Merge pull request #763 from Baros6647/main
Actual changes on 9.9.24
2 parents 0cd970b + e87aec3 commit 3097df7

File tree

124 files changed

+7676
-1570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+7676
-1570
lines changed

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInboundv20240320/Address.cs

Lines changed: 74 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public partial class Address : IEquatable<Address>, IValidatableObject
2929
/// Initializes a new instance of the <see cref="Address" /> class.
3030
/// </summary>
3131
[JsonConstructorAttribute]
32-
protected Address() { }
32+
public Address() { }
3333
/// <summary>
3434
/// Initializes a new instance of the <see cref="Address" /> class.
3535
/// </summary>
@@ -38,11 +38,21 @@ protected Address() { }
3838
/// <param name="city">The city. (required).</param>
3939
/// <param name="companyName">The name of the business..</param>
4040
/// <param name="countryCode">The country code in two-character ISO 3166-1 alpha-2 format. (required).</param>
41-
/// <param name="name">The name of the individual or business. (required).</param>
41+
/// <param name="email">The email address.</param>
42+
/// <param name="name">The name of the individual who is the primary contact. (required).</param>
43+
/// <param name="phoneNumber">The phone number.</param>
4244
/// <param name="postalCode">The postal code. (required).</param>
4345
/// <param name="stateOrProvinceCode">The state or province code..</param>
44-
/// /// <param name="phoneNumber">The phone number for the business.</param>
45-
public Address(string addressLine1 = default(string), string addressLine2 = default(string), string city = default(string), string companyName = default(string), string countryCode = default(string), string name = default(string), string postalCode = default(string), string stateOrProvinceCode = default(string), string phoneNumber = default(string))
46+
public Address(string addressLine1 = default(string),
47+
string addressLine2 = default(string),
48+
string city = default(string),
49+
string companyName = default(string),
50+
string countryCode = default(string),
51+
string email = default(string),
52+
string name = default(string),
53+
string phoneNumber = default(string),
54+
string postalCode = default(string),
55+
string stateOrProvinceCode = default(string))
4656
{
4757
// to ensure "addressLine1" is required (not null)
4858
if (addressLine1 == null)
@@ -89,17 +99,10 @@ protected Address() { }
8999
{
90100
this.PostalCode = postalCode;
91101
}
92-
// to ensure "phoneNumber" is required (not null)
93-
if (phoneNumber == null)
94-
{
95-
throw new InvalidDataException("phoneNumber is a required property for Address and cannot be null");
96-
}
97-
else
98-
{
99-
this.PhoneNumber = phoneNumber;
100-
}
101102
this.AddressLine2 = addressLine2;
102103
this.CompanyName = companyName;
104+
this.Email = email;
105+
this.PhoneNumber = phoneNumber;
103106
this.StateOrProvinceCode = stateOrProvinceCode;
104107
}
105108

@@ -139,12 +142,26 @@ protected Address() { }
139142
public string CountryCode { get; set; }
140143

141144
/// <summary>
142-
/// The name of the individual or business.
145+
/// The email address.
143146
/// </summary>
144-
/// <value>The name of the individual or business.</value>
147+
/// <value>The email address.</value>
148+
[DataMember(Name = "email", EmitDefaultValue = false)]
149+
public string Email { get; set; }
150+
151+
/// <summary>
152+
/// The name of the individual who is the primary contact.
153+
/// </summary>
154+
/// <value>The name of the individual who is the primary contact.</value>
145155
[DataMember(Name="name", EmitDefaultValue=false)]
146156
public string Name { get; set; }
147157

158+
/// <summary>
159+
/// The phone number.
160+
/// </summary>
161+
/// <value>The phone number.</value>
162+
[DataMember(Name = "phoneNumber", EmitDefaultValue = false)]
163+
public string PhoneNumber { get; set; }
164+
148165
/// <summary>
149166
/// The postal code.
150167
/// </summary>
@@ -159,13 +176,6 @@ protected Address() { }
159176
[DataMember(Name="stateOrProvinceCode", EmitDefaultValue=false)]
160177
public string StateOrProvinceCode { get; set; }
161178

162-
/// <summary>
163-
/// The phone number.
164-
/// </summary>
165-
/// <value>The phone number.</value>
166-
[DataMember(Name = "phoneNumber", EmitDefaultValue = false)]
167-
public string PhoneNumber { get; set; }
168-
169179
/// <summary>
170180
/// Returns the string presentation of the object
171181
/// </summary>
@@ -179,10 +189,11 @@ public override string ToString()
179189
sb.Append(" City: ").Append(City).Append("\n");
180190
sb.Append(" CompanyName: ").Append(CompanyName).Append("\n");
181191
sb.Append(" CountryCode: ").Append(CountryCode).Append("\n");
192+
sb.Append(" Email: ").Append(Email).Append("\n");
182193
sb.Append(" Name: ").Append(Name).Append("\n");
194+
sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n");
183195
sb.Append(" PostalCode: ").Append(PostalCode).Append("\n");
184196
sb.Append(" StateOrProvinceCode: ").Append(StateOrProvinceCode).Append("\n");
185-
sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n");
186197
sb.Append("}\n");
187198
return sb.ToString();
188199
}
@@ -241,21 +252,26 @@ public bool Equals(Address input)
241252
this.CountryCode == input.CountryCode ||
242253
(this.CountryCode != null &&
243254
this.CountryCode.Equals(input.CountryCode))
244-
) &&
255+
) &&
256+
(
257+
this.Email == input.Email ||
258+
(this.Email != null &&
259+
this.Email.Equals(input.Email))
260+
) &&
245261
(
246262
this.Name == input.Name ||
247263
(this.Name != null &&
248264
this.Name.Equals(input.Name))
249-
) &&
250-
(
251-
this.PostalCode == input.PostalCode ||
252-
(this.PostalCode != null &&
253-
this.PostalCode.Equals(input.PostalCode))
254265
) &&
255266
(
256267
this.PhoneNumber == input.PhoneNumber ||
257268
(this.PhoneNumber != null &&
258269
this.PhoneNumber.Equals(input.PhoneNumber))
270+
) &&
271+
(
272+
this.PostalCode == input.PostalCode ||
273+
(this.PostalCode != null &&
274+
this.PostalCode.Equals(input.PostalCode))
259275
) &&
260276
(
261277
this.StateOrProvinceCode == input.StateOrProvinceCode ||
@@ -283,14 +299,16 @@ public override int GetHashCode()
283299
hashCode = hashCode * 59 + this.CompanyName.GetHashCode();
284300
if (this.CountryCode != null)
285301
hashCode = hashCode * 59 + this.CountryCode.GetHashCode();
302+
if (this.Email != null)
303+
hashCode = hashCode * 59 + this.Email.GetHashCode();
286304
if (this.Name != null)
287305
hashCode = hashCode * 59 + this.Name.GetHashCode();
306+
if (this.PhoneNumber != null)
307+
hashCode = hashCode * 59 + this.PhoneNumber.GetHashCode();
288308
if (this.PostalCode != null)
289309
hashCode = hashCode * 59 + this.PostalCode.GetHashCode();
290310
if (this.StateOrProvinceCode != null)
291311
hashCode = hashCode * 59 + this.StateOrProvinceCode.GetHashCode();
292-
if (this.PhoneNumber != null)
293-
hashCode = hashCode * 59 + this.PhoneNumber.GetHashCode();
294312
return hashCode;
295313
}
296314
}
@@ -362,15 +380,39 @@ public override int GetHashCode()
362380
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be greater than 2.", new [] { "CountryCode" });
363381
}
364382

383+
// Email (string) maxLength
384+
if (this.Email != null && this.Email.Length > 1024)
385+
{
386+
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be less than 1024.", new[] { "Email" });
387+
}
388+
389+
// Email (string) minLength
390+
if (this.Email != null && this.Email.Length < 1)
391+
{
392+
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be greater than 1.", new[] { "Email" });
393+
}
394+
365395
// CountryCode (string) pattern
366396
Regex regexCountryCode = new Regex(@"^[A-Z]{2}$", RegexOptions.CultureInvariant);
367397
if (false == regexCountryCode.Match(this.CountryCode).Success)
368398
{
369399
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, must match a pattern of " + regexCountryCode, new [] { "CountryCode" });
370400
}
371401

402+
// PhoneNumber (string) maxLength
403+
if (this.PhoneNumber != null && this.PhoneNumber.Length > 20)
404+
{
405+
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PhoneNumber, length must be less than 20.", new[] { "PhoneNumber" });
406+
}
407+
408+
// PhoneNumber (string) minLength
409+
if (this.PhoneNumber != null && this.PhoneNumber.Length < 1)
410+
{
411+
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PhoneNumber, length must be greater than 1.", new[] { "PhoneNumber" });
412+
}
413+
372414
// Name (string) maxLength
373-
if(this.Name != null && this.Name.Length > 50)
415+
if (this.Name != null && this.Name.Length > 50)
374416
{
375417
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 50.", new [] { "Name" });
376418
}
@@ -405,18 +447,6 @@ public override int GetHashCode()
405447
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StateOrProvinceCode, length must be greater than 1.", new [] { "StateOrProvinceCode" });
406448
}
407449

408-
// PhoneNumber (string) maxLength
409-
if (this.PhoneNumber != null && this.PhoneNumber.Length > 20)
410-
{
411-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PhoneNumber, length must be less than 20.", new[] { "PhoneNumber" });
412-
}
413-
414-
// PhoneNumber (string) minLength
415-
if (this.PhoneNumber != null && this.PhoneNumber.Length < 1)
416-
{
417-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PhoneNumber, length must be greater than 1.", new[] { "PhoneNumber" });
418-
}
419-
420450
yield break;
421451
}
422452
}

0 commit comments

Comments
 (0)