@@ -42,7 +42,7 @@ public Address() { }
42
42
/// <param name="CountryCode">Recipient's country code. (required).</param>
43
43
/// <param name="PostalCode">The postal code (required for shipments to the U.S.)..</param>
44
44
/// <param name="PhoneNumber">Recipient's phone number..</param>
45
- public Address ( string Name = default ( string ) , string Line1 = default ( string ) , string Line2 = default ( string ) , string Line3 = default ( string ) , string DistrictOrCounty = default ( string ) , string City = default ( string ) , string StateOrProvinceCode = default ( string ) , string CountryCode = default ( string ) , string PostalCode = default ( string ) , string PhoneNumber = default ( string ) )
45
+ public Address ( string Name = default ( string ) , string AddressLine1 = default ( string ) , string AddressLine2 = default ( string ) , string AddressLine3 = default ( string ) , string DistrictOrCounty = default ( string ) , string City = default ( string ) , string StateOrRegion = default ( string ) , string CountryCode = default ( string ) , string PostalCode = default ( string ) , string Phone = default ( string ) )
46
46
{
47
47
// to ensure "Name" is required (not null)
48
48
if ( Name == null )
@@ -54,22 +54,22 @@ public Address() { }
54
54
this . Name = Name ;
55
55
}
56
56
// to ensure "Line1" is required (not null)
57
- if ( Line1 == null )
57
+ if ( AddressLine1 == null )
58
58
{
59
59
throw new InvalidDataException ( "Line1 is a required property for Address and cannot be null" ) ;
60
60
}
61
61
else
62
62
{
63
- this . Line1 = Line1 ;
63
+ this . AddressLine1 = AddressLine1 ;
64
64
}
65
65
// to ensure "StateOrProvinceCode" is required (not null)
66
- if ( StateOrProvinceCode == null )
66
+ if ( StateOrRegion == null )
67
67
{
68
- throw new InvalidDataException ( "StateOrProvinceCode is a required property for Address and cannot be null" ) ;
68
+ throw new InvalidDataException ( "StateOrRegion is a required property for Address and cannot be null" ) ;
69
69
}
70
70
else
71
71
{
72
- this . StateOrProvinceCode = StateOrProvinceCode ;
72
+ this . StateOrRegion = StateOrRegion ;
73
73
}
74
74
// to ensure "CountryCode" is required (not null)
75
75
if ( CountryCode == null )
@@ -80,83 +80,83 @@ public Address() { }
80
80
{
81
81
this . CountryCode = CountryCode ;
82
82
}
83
- this . Line2 = Line2 ;
84
- this . Line3 = Line3 ;
83
+ this . AddressLine2 = AddressLine2 ;
84
+ this . AddressLine3 = AddressLine3 ;
85
85
this . DistrictOrCounty = DistrictOrCounty ;
86
86
this . City = City ;
87
87
this . PostalCode = PostalCode ;
88
- this . PhoneNumber = PhoneNumber ;
88
+ this . Phone = Phone ;
89
89
}
90
90
91
91
/// <summary>
92
92
/// Recipient's name.
93
93
/// </summary>
94
94
/// <value>Recipient's name.</value>
95
- [ DataMember ( Name = "Name " , EmitDefaultValue = false ) ]
95
+ [ DataMember ( Name = "name " , EmitDefaultValue = false ) ]
96
96
public string Name { get ; set ; }
97
97
98
98
/// <summary>
99
99
/// Recipient's street address information.
100
100
/// </summary>
101
101
/// <value>Recipient's street address information.</value>
102
- [ DataMember ( Name = "Line1 " , EmitDefaultValue = false ) ]
103
- public string Line1 { get ; set ; }
102
+ [ DataMember ( Name = "addressLine1 " , EmitDefaultValue = false ) ]
103
+ public string AddressLine1 { get ; set ; }
104
104
105
105
/// <summary>
106
106
/// Additional street address information, if required.
107
107
/// </summary>
108
108
/// <value>Additional street address information, if required.</value>
109
- [ DataMember ( Name = "Line2 " , EmitDefaultValue = false ) ]
110
- public string Line2 { get ; set ; }
109
+ [ DataMember ( Name = "addressLine2 " , EmitDefaultValue = false ) ]
110
+ public string AddressLine2 { get ; set ; }
111
111
112
112
/// <summary>
113
113
/// Additional street address information, if required.
114
114
/// </summary>
115
115
/// <value>Additional street address information, if required.</value>
116
- [ DataMember ( Name = "Line3 " , EmitDefaultValue = false ) ]
117
- public string Line3 { get ; set ; }
116
+ [ DataMember ( Name = "addressLine3 " , EmitDefaultValue = false ) ]
117
+ public string AddressLine3 { get ; set ; }
118
118
119
119
/// <summary>
120
120
/// Recipient's district or county.
121
121
/// </summary>
122
122
/// <value>Recipient's district or county.</value>
123
- [ DataMember ( Name = "DistrictOrCounty " , EmitDefaultValue = false ) ]
123
+ [ DataMember ( Name = "districtOrCounty " , EmitDefaultValue = false ) ]
124
124
public string DistrictOrCounty { get ; set ; }
125
125
126
126
/// <summary>
127
127
/// Recipient's city.
128
128
/// </summary>
129
129
/// <value>Recipient's city.</value>
130
- [ DataMember ( Name = "City " , EmitDefaultValue = false ) ]
130
+ [ DataMember ( Name = "city " , EmitDefaultValue = false ) ]
131
131
public string City { get ; set ; }
132
132
133
133
/// <summary>
134
134
/// Recipient's state or province code.
135
135
/// </summary>
136
136
/// <value>Recipient's state or province code.</value>
137
- [ DataMember ( Name = "StateOrProvinceCode " , EmitDefaultValue = false ) ]
138
- public string StateOrProvinceCode { get ; set ; }
137
+ [ DataMember ( Name = "stateOrRegion " , EmitDefaultValue = false ) ]
138
+ public string StateOrRegion { get ; set ; }
139
139
140
140
/// <summary>
141
141
/// Recipient's country code.
142
142
/// </summary>
143
143
/// <value>Recipient's country code.</value>
144
- [ DataMember ( Name = "CountryCode " , EmitDefaultValue = false ) ]
144
+ [ DataMember ( Name = "countryCode " , EmitDefaultValue = false ) ]
145
145
public string CountryCode { get ; set ; }
146
146
147
147
/// <summary>
148
148
/// The postal code (required for shipments to the U.S.).
149
149
/// </summary>
150
150
/// <value>The postal code (required for shipments to the U.S.).</value>
151
- [ DataMember ( Name = "PostalCode " , EmitDefaultValue = false ) ]
151
+ [ DataMember ( Name = "postalCode " , EmitDefaultValue = false ) ]
152
152
public string PostalCode { get ; set ; }
153
153
154
154
/// <summary>
155
155
/// Recipient's phone number.
156
156
/// </summary>
157
157
/// <value>Recipient's phone number.</value>
158
- [ DataMember ( Name = "PhoneNumber " , EmitDefaultValue = false ) ]
159
- public string PhoneNumber { get ; set ; }
158
+ [ DataMember ( Name = "phone " , EmitDefaultValue = false ) ]
159
+ public string Phone { get ; set ; }
160
160
161
161
/// <summary>
162
162
/// Returns the string presentation of the object
@@ -167,15 +167,15 @@ public override string ToString()
167
167
var sb = new StringBuilder ( ) ;
168
168
sb . Append ( "class Address {\n " ) ;
169
169
sb . Append ( " Name: " ) . Append ( Name ) . Append ( "\n " ) ;
170
- sb . Append ( " Line1 : " ) . Append ( Line1 ) . Append ( "\n " ) ;
171
- sb . Append ( " Line2 : " ) . Append ( Line2 ) . Append ( "\n " ) ;
172
- sb . Append ( " Line3 : " ) . Append ( Line3 ) . Append ( "\n " ) ;
170
+ sb . Append ( " AddressLine1 : " ) . Append ( AddressLine1 ) . Append ( "\n " ) ;
171
+ sb . Append ( " AddressLine2 : " ) . Append ( AddressLine2 ) . Append ( "\n " ) ;
172
+ sb . Append ( " AddressLine3 : " ) . Append ( AddressLine3 ) . Append ( "\n " ) ;
173
173
sb . Append ( " DistrictOrCounty: " ) . Append ( DistrictOrCounty ) . Append ( "\n " ) ;
174
174
sb . Append ( " City: " ) . Append ( City ) . Append ( "\n " ) ;
175
- sb . Append ( " StateOrProvinceCode : " ) . Append ( StateOrProvinceCode ) . Append ( "\n " ) ;
175
+ sb . Append ( " StateOrRegion : " ) . Append ( StateOrRegion ) . Append ( "\n " ) ;
176
176
sb . Append ( " CountryCode: " ) . Append ( CountryCode ) . Append ( "\n " ) ;
177
177
sb . Append ( " PostalCode: " ) . Append ( PostalCode ) . Append ( "\n " ) ;
178
- sb . Append ( " PhoneNumber : " ) . Append ( PhoneNumber ) . Append ( "\n " ) ;
178
+ sb . Append ( " Phone : " ) . Append ( Phone ) . Append ( "\n " ) ;
179
179
sb . Append ( "}\n " ) ;
180
180
return sb . ToString ( ) ;
181
181
}
@@ -216,19 +216,19 @@ public bool Equals(Address input)
216
216
this . Name . Equals ( input . Name ) )
217
217
) &&
218
218
(
219
- this . Line1 == input . Line1 ||
220
- ( this . Line1 != null &&
221
- this . Line1 . Equals ( input . Line1 ) )
219
+ this . AddressLine1 == input . AddressLine1 ||
220
+ ( this . AddressLine1 != null &&
221
+ this . AddressLine1 . Equals ( input . AddressLine1 ) )
222
222
) &&
223
223
(
224
- this . Line2 == input . Line2 ||
225
- ( this . Line2 != null &&
226
- this . Line2 . Equals ( input . Line2 ) )
224
+ this . AddressLine2 == input . AddressLine2 ||
225
+ ( this . AddressLine2 != null &&
226
+ this . AddressLine2 . Equals ( input . AddressLine2 ) )
227
227
) &&
228
228
(
229
- this . Line3 == input . Line3 ||
230
- ( this . Line3 != null &&
231
- this . Line3 . Equals ( input . Line3 ) )
229
+ this . AddressLine3 == input . AddressLine3 ||
230
+ ( this . AddressLine3 != null &&
231
+ this . AddressLine3 . Equals ( input . AddressLine3 ) )
232
232
) &&
233
233
(
234
234
this . DistrictOrCounty == input . DistrictOrCounty ||
@@ -241,9 +241,9 @@ public bool Equals(Address input)
241
241
this . City . Equals ( input . City ) )
242
242
) &&
243
243
(
244
- this . StateOrProvinceCode == input . StateOrProvinceCode ||
245
- ( this . StateOrProvinceCode != null &&
246
- this . StateOrProvinceCode . Equals ( input . StateOrProvinceCode ) )
244
+ this . StateOrRegion == input . StateOrRegion ||
245
+ ( this . StateOrRegion != null &&
246
+ this . StateOrRegion . Equals ( input . StateOrRegion ) )
247
247
) &&
248
248
(
249
249
this . CountryCode == input . CountryCode ||
@@ -256,9 +256,9 @@ public bool Equals(Address input)
256
256
this . PostalCode . Equals ( input . PostalCode ) )
257
257
) &&
258
258
(
259
- this . PhoneNumber == input . PhoneNumber ||
260
- ( this . PhoneNumber != null &&
261
- this . PhoneNumber . Equals ( input . PhoneNumber ) )
259
+ this . Phone == input . Phone ||
260
+ ( this . Phone != null &&
261
+ this . Phone . Equals ( input . Phone ) )
262
262
) ;
263
263
}
264
264
@@ -273,24 +273,24 @@ public override int GetHashCode()
273
273
int hashCode = 41 ;
274
274
if ( this . Name != null )
275
275
hashCode = hashCode * 59 + this . Name . GetHashCode ( ) ;
276
- if ( this . Line1 != null )
277
- hashCode = hashCode * 59 + this . Line1 . GetHashCode ( ) ;
278
- if ( this . Line2 != null )
279
- hashCode = hashCode * 59 + this . Line2 . GetHashCode ( ) ;
280
- if ( this . Line3 != null )
281
- hashCode = hashCode * 59 + this . Line3 . GetHashCode ( ) ;
276
+ if ( this . AddressLine1 != null )
277
+ hashCode = hashCode * 59 + this . AddressLine1 . GetHashCode ( ) ;
278
+ if ( this . AddressLine2 != null )
279
+ hashCode = hashCode * 59 + this . AddressLine2 . GetHashCode ( ) ;
280
+ if ( this . AddressLine3 != null )
281
+ hashCode = hashCode * 59 + this . AddressLine3 . GetHashCode ( ) ;
282
282
if ( this . DistrictOrCounty != null )
283
283
hashCode = hashCode * 59 + this . DistrictOrCounty . GetHashCode ( ) ;
284
284
if ( this . City != null )
285
285
hashCode = hashCode * 59 + this . City . GetHashCode ( ) ;
286
- if ( this . StateOrProvinceCode != null )
287
- hashCode = hashCode * 59 + this . StateOrProvinceCode . GetHashCode ( ) ;
286
+ if ( this . StateOrRegion != null )
287
+ hashCode = hashCode * 59 + this . StateOrRegion . GetHashCode ( ) ;
288
288
if ( this . CountryCode != null )
289
289
hashCode = hashCode * 59 + this . CountryCode . GetHashCode ( ) ;
290
290
if ( this . PostalCode != null )
291
291
hashCode = hashCode * 59 + this . PostalCode . GetHashCode ( ) ;
292
- if ( this . PhoneNumber != null )
293
- hashCode = hashCode * 59 + this . PhoneNumber . GetHashCode ( ) ;
292
+ if ( this . Phone != null )
293
+ hashCode = hashCode * 59 + this . Phone . GetHashCode ( ) ;
294
294
return hashCode ;
295
295
}
296
296
}
@@ -309,19 +309,19 @@ public override int GetHashCode()
309
309
}
310
310
311
311
// Line1 (string) maxLength
312
- if ( this . Line1 != null && this . Line1 . Length > 60 )
312
+ if ( this . AddressLine1 != null && this . AddressLine1 . Length > 60 )
313
313
{
314
314
yield return new System . ComponentModel . DataAnnotations . ValidationResult ( "Invalid value for Line1, length must be less than 60." , new [ ] { "Line1" } ) ;
315
315
}
316
316
317
317
// Line2 (string) maxLength
318
- if ( this . Line2 != null && this . Line2 . Length > 60 )
318
+ if ( this . AddressLine2 != null && this . AddressLine2 . Length > 60 )
319
319
{
320
320
yield return new System . ComponentModel . DataAnnotations . ValidationResult ( "Invalid value for Line2, length must be less than 60." , new [ ] { "Line2" } ) ;
321
321
}
322
322
323
323
// Line3 (string) maxLength
324
- if ( this . Line3 != null && this . Line3 . Length > 60 )
324
+ if ( this . AddressLine3 != null && this . AddressLine3 . Length > 60 )
325
325
{
326
326
yield return new System . ComponentModel . DataAnnotations . ValidationResult ( "Invalid value for Line3, length must be less than 60." , new [ ] { "Line3" } ) ;
327
327
}
@@ -339,9 +339,9 @@ public override int GetHashCode()
339
339
}
340
340
341
341
// StateOrProvinceCode (string) maxLength
342
- if ( this . StateOrProvinceCode != null && this . StateOrProvinceCode . Length > 150 )
342
+ if ( this . StateOrRegion != null && this . StateOrRegion . Length > 150 )
343
343
{
344
- yield return new System . ComponentModel . DataAnnotations . ValidationResult ( "Invalid value for StateOrProvinceCode , length must be less than 150." , new [ ] { "StateOrProvinceCode" } ) ;
344
+ yield return new System . ComponentModel . DataAnnotations . ValidationResult ( "Invalid value for StateOrRegion , length must be less than 150." , new [ ] { "StateOrProvinceCode" } ) ;
345
345
}
346
346
347
347
// CountryCode (string) maxLength
@@ -357,9 +357,9 @@ public override int GetHashCode()
357
357
}
358
358
359
359
// PhoneNumber (string) maxLength
360
- if ( this . PhoneNumber != null && this . PhoneNumber . Length > 20 )
360
+ if ( this . Phone != null && this . Phone . Length > 20 )
361
361
{
362
- yield return new System . ComponentModel . DataAnnotations . ValidationResult ( "Invalid value for PhoneNumber , length must be less than 20." , new [ ] { "PhoneNumber" } ) ;
362
+ yield return new System . ComponentModel . DataAnnotations . ValidationResult ( "Invalid value for Phone , length must be less than 20." , new [ ] { "PhoneNumber" } ) ;
363
363
}
364
364
365
365
yield break ;
0 commit comments