11
11
using Newtonsoft . Json ;
12
12
using System ;
13
13
using System . Collections . Generic ;
14
+ using System . ComponentModel ;
14
15
using System . ComponentModel . DataAnnotations ;
15
16
using System . IO ;
16
17
using System . Runtime . Serialization ;
@@ -29,11 +30,19 @@ public partial class CreateFulfillmentOrderRequest : IEquatable<CreateFulfillmen
29
30
/// </summary>
30
31
/// <value>The shipping method for the fulfillment order.</value>
31
32
[ DataMember ( Name = "shippingSpeedCategory" , EmitDefaultValue = false ) ]
32
- public string ShippingSpeedCategory { get ; set ; }
33
- /// <summary>
34
- /// Gets or Sets FulfillmentAction
35
- /// </summary>
36
- [ DataMember ( Name = "fulfillmentAction" , EmitDefaultValue = false ) ]
33
+ [ Obsolete ( "Use ShippingSpeedCategoryMethod instead" ) ]
34
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
35
+ public string ShippingSpeedCategory { get ; set ; }
36
+ public ShippingSpeedCategory ShippingSpeedCategoryMethod {
37
+ #pragma warning disable 0618
38
+ get => ( ShippingSpeedCategory ) Enum . Parse ( typeof ( ShippingSpeedCategory ) , ShippingSpeedCategory , true ) ;
39
+ set => ShippingSpeedCategory = value . ToString ( ) ;
40
+ #pragma warning restore 0618
41
+ }
42
+ /// <summary>
43
+ /// Gets or Sets FulfillmentAction
44
+ /// </summary>
45
+ [ DataMember ( Name = "fulfillmentAction" , EmitDefaultValue = false ) ]
37
46
public FulfillmentAction ? FulfillmentAction { get ; set ; }
38
47
/// <summary>
39
48
/// Gets or Sets FulfillmentPolicy
@@ -63,7 +72,9 @@ public CreateFulfillmentOrderRequest() { }
63
72
/// <param name="ShipFromCountryCode">The two-character country code for the country from which the fulfillment order ships. Must be in ISO 3166-1 alpha-2 format..</param>
64
73
/// <param name="NotificationEmailList">NotificationEmailList.</param>
65
74
/// <param name="Items">A list of items to include in the fulfillment order preview, including quantity. (required).</param>
66
- public CreateFulfillmentOrderRequest ( string MarketplaceId = default ( string ) , string SellerFulfillmentOrderId = default ( string ) , string DisplayableOrderId = default ( string ) , DateTime DisplayableOrderDate = default ( DateTime ) , string DisplayableOrderComment = default ( string ) , string ShippingSpeedCategory = null , DeliveryWindow DeliveryWindow = default ( DeliveryWindow ) , Address DestinationAddress = default ( Address ) , FulfillmentAction ? FulfillmentAction = default ( FulfillmentAction ? ) , FulfillmentPolicy ? FulfillmentPolicy = default ( FulfillmentPolicy ? ) , string FulfillmentMethod = default ( string ) , CODSettings CODSettings = default ( CODSettings ) , string ShipFromCountryCode = default ( string ) , NotificationEmailList NotificationEmails = default ( NotificationEmailList ) , CreateFulfillmentOrderItemList Items = default ( CreateFulfillmentOrderItemList ) )
75
+ [ Obsolete ( "FulfillmentMethod no longer used and ShippingSpeedCategory is deprecated, use the other constructor instead" ) ]
76
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
77
+ public CreateFulfillmentOrderRequest ( string MarketplaceId = default ( string ) , string SellerFulfillmentOrderId = default ( string ) , string DisplayableOrderId = default ( string ) , DateTime ? DisplayableOrderDate = default ( DateTime ? ) , string DisplayableOrderComment = default ( string ) , string ShippingSpeedCategory = null , DeliveryWindow DeliveryWindow = default ( DeliveryWindow ) , Address DestinationAddress = default ( Address ) , FulfillmentAction ? FulfillmentAction = default ( FulfillmentAction ? ) , FulfillmentPolicy ? FulfillmentPolicy = default ( FulfillmentPolicy ? ) , string FulfillmentMethod = default ( string ) , CODSettings CODSettings = default ( CODSettings ) , string ShipFromCountryCode = default ( string ) , NotificationEmailList NotificationEmails = default ( NotificationEmailList ) , CreateFulfillmentOrderItemList Items = default ( CreateFulfillmentOrderItemList ) )
67
78
{
68
79
// to ensure "SellerFulfillmentOrderId" is required (not null)
69
80
if ( SellerFulfillmentOrderId == null )
@@ -90,7 +101,7 @@ public CreateFulfillmentOrderRequest() { }
90
101
}
91
102
else
92
103
{
93
- this . DisplayableOrderDate = DisplayableOrderDate ;
104
+ this . DisplayableOrderDate = DisplayableOrderDate . Value ;
94
105
}
95
106
// to ensure "DisplayableOrderComment" is required (not null)
96
107
if ( DisplayableOrderComment == null )
@@ -108,10 +119,12 @@ public CreateFulfillmentOrderRequest() { }
108
119
}
109
120
else
110
121
{
111
- this . ShippingSpeedCategory = ShippingSpeedCategory ;
112
- }
113
- // to ensure "DestinationAddress" is required (not null)
114
- if ( DestinationAddress == null )
122
+ #pragma warning disable 0618
123
+ this . ShippingSpeedCategory = ShippingSpeedCategory ;
124
+ #pragma warning restore 0618
125
+ }
126
+ // to ensure "DestinationAddress" is required (not null)
127
+ if ( DestinationAddress == null )
115
128
{
116
129
throw new InvalidDataException ( "DestinationAddress is a required property for CreateFulfillmentOrderRequest and cannot be null" ) ;
117
130
}
@@ -132,11 +145,14 @@ public CreateFulfillmentOrderRequest() { }
132
145
this . DeliveryWindow = DeliveryWindow ;
133
146
this . FulfillmentAction = FulfillmentAction ;
134
147
this . FulfillmentPolicy = FulfillmentPolicy ;
135
- this . FulfillmentMethod = FulfillmentMethod ;
136
148
this . CODSettings = CODSettings ;
137
149
this . ShipFromCountryCode = ShipFromCountryCode ;
138
150
this . NotificationEmails = NotificationEmails ;
139
151
}
152
+ #pragma warning disable 0618
153
+ public CreateFulfillmentOrderRequest ( string MarketplaceId = default ( string ) , string SellerFulfillmentOrderId = default ( string ) , string DisplayableOrderId = default ( string ) , DateTime ? DisplayableOrderDate = default ( DateTime ? ) , string DisplayableOrderComment = default ( string ) , ShippingSpeedCategory ? ShippingSpeedCategory = default ( ShippingSpeedCategory ? ) , DeliveryWindow DeliveryWindow = default ( DeliveryWindow ) , Address DestinationAddress = default ( Address ) , FulfillmentAction ? FulfillmentAction = default ( FulfillmentAction ? ) , FulfillmentPolicy ? FulfillmentPolicy = default ( FulfillmentPolicy ? ) , CODSettings CODSettings = default ( CODSettings ) , string ShipFromCountryCode = default ( string ) , NotificationEmailList NotificationEmails = default ( NotificationEmailList ) , CreateFulfillmentOrderItemList Items = default ( CreateFulfillmentOrderItemList ) )
154
+ : this ( MarketplaceId , SellerFulfillmentOrderId , DisplayableOrderId , DisplayableOrderDate , DisplayableOrderComment , ShippingSpeedCategory ? . ToString ( ) , DeliveryWindow , DestinationAddress , FulfillmentAction , FulfillmentPolicy , null , CODSettings , ShipFromCountryCode , NotificationEmails , Items ) { }
155
+ #pragma warning restore 0618
140
156
141
157
/// <summary>
142
158
/// The marketplace the fulfillment order is placed against.
@@ -189,17 +205,19 @@ public CreateFulfillmentOrderRequest() { }
189
205
190
206
191
207
192
- /// <summary>
193
- /// Indicates the intended recipient channel for the order.
194
- /// </summary>
195
- /// <value>Indicates the intended recipient channel for the order.</value>
196
- [ DataMember ( Name = "FulfillmentMethod" , EmitDefaultValue = false ) ]
197
- public string FulfillmentMethod { get ; set ; }
208
+ /// <summary>
209
+ /// Indicates the intended recipient channel for the order.
210
+ /// </summary>
211
+ /// <value>Indicates the intended recipient channel for the order.</value>
212
+ [ DataMember ( Name = "FulfillmentMethod" , EmitDefaultValue = false ) ]
213
+ [ Obsolete ( "Property no longer used" ) ]
214
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
215
+ public string FulfillmentMethod { get ; set ; }
198
216
199
- /// <summary>
200
- /// Gets or Sets CODSettings
201
- /// </summary>
202
- [ DataMember ( Name = "codSettings" , EmitDefaultValue = false ) ]
217
+ /// <summary>
218
+ /// Gets or Sets CODSettings
219
+ /// </summary>
220
+ [ DataMember ( Name = "codSettings" , EmitDefaultValue = false ) ]
203
221
public CODSettings CODSettings { get ; set ; }
204
222
205
223
/// <summary>
@@ -235,12 +253,13 @@ public override string ToString()
235
253
sb . Append ( " DisplayableOrderId: " ) . Append ( DisplayableOrderId ) . Append ( "\n " ) ;
236
254
sb . Append ( " DisplayableOrderDate: " ) . Append ( DisplayableOrderDate ) . Append ( "\n " ) ;
237
255
sb . Append ( " DisplayableOrderComment: " ) . Append ( DisplayableOrderComment ) . Append ( "\n " ) ;
238
- sb . Append ( " ShippingSpeedCategory: " ) . Append ( ShippingSpeedCategory ) . Append ( "\n " ) ;
239
- sb . Append ( " DeliveryWindow: " ) . Append ( DeliveryWindow ) . Append ( "\n " ) ;
256
+ #pragma warning disable 0618
257
+ sb . Append ( " ShippingSpeedCategory: " ) . Append ( ShippingSpeedCategory ) . Append ( "\n " ) ;
258
+ #pragma warning restore 0618
259
+ sb . Append ( " DeliveryWindow: " ) . Append ( DeliveryWindow ) . Append ( "\n " ) ;
240
260
sb . Append ( " DestinationAddress: " ) . Append ( DestinationAddress ) . Append ( "\n " ) ;
241
261
sb . Append ( " FulfillmentAction: " ) . Append ( FulfillmentAction ) . Append ( "\n " ) ;
242
262
sb . Append ( " FulfillmentPolicy: " ) . Append ( FulfillmentPolicy ) . Append ( "\n " ) ;
243
- sb . Append ( " FulfillmentMethod: " ) . Append ( FulfillmentMethod ) . Append ( "\n " ) ;
244
263
sb . Append ( " CODSettings: " ) . Append ( CODSettings ) . Append ( "\n " ) ;
245
264
sb . Append ( " ShipFromCountryCode: " ) . Append ( ShipFromCountryCode ) . Append ( "\n " ) ;
246
265
sb . Append ( " NotificationEmails: " ) . Append ( NotificationEmails ) . Append ( "\n " ) ;
@@ -305,10 +324,12 @@ public bool Equals(CreateFulfillmentOrderRequest input)
305
324
this . DisplayableOrderComment . Equals ( input . DisplayableOrderComment ) )
306
325
) &&
307
326
(
308
- this . ShippingSpeedCategory == input . ShippingSpeedCategory ||
327
+ #pragma warning disable 0618
328
+ this . ShippingSpeedCategory == input . ShippingSpeedCategory ||
309
329
( this . ShippingSpeedCategory != null &&
310
330
this . ShippingSpeedCategory . Equals ( input . ShippingSpeedCategory ) )
311
- ) &&
331
+ #pragma warning restore 0618
332
+ ) &&
312
333
(
313
334
this . DeliveryWindow == input . DeliveryWindow ||
314
335
( this . DeliveryWindow != null &&
@@ -329,11 +350,6 @@ public bool Equals(CreateFulfillmentOrderRequest input)
329
350
( this . FulfillmentPolicy != null &&
330
351
this . FulfillmentPolicy . Equals ( input . FulfillmentPolicy ) )
331
352
) &&
332
- (
333
- this . FulfillmentMethod == input . FulfillmentMethod ||
334
- ( this . FulfillmentMethod != null &&
335
- this . FulfillmentMethod . Equals ( input . FulfillmentMethod ) )
336
- ) &&
337
353
(
338
354
this . CODSettings == input . CODSettings ||
339
355
( this . CODSettings != null &&
@@ -375,18 +391,18 @@ public override int GetHashCode()
375
391
hashCode = hashCode * 59 + this . DisplayableOrderDate . GetHashCode ( ) ;
376
392
if ( this . DisplayableOrderComment != null )
377
393
hashCode = hashCode * 59 + this . DisplayableOrderComment . GetHashCode ( ) ;
378
- if ( this . ShippingSpeedCategory != null )
394
+ #pragma warning disable 0618
395
+ if ( this . ShippingSpeedCategory != null )
379
396
hashCode = hashCode * 59 + this . ShippingSpeedCategory . GetHashCode ( ) ;
380
- if ( this . DeliveryWindow != null )
397
+ #pragma warning restore 0618
398
+ if ( this . DeliveryWindow != null )
381
399
hashCode = hashCode * 59 + this . DeliveryWindow . GetHashCode ( ) ;
382
400
if ( this . DestinationAddress != null )
383
401
hashCode = hashCode * 59 + this . DestinationAddress . GetHashCode ( ) ;
384
402
if ( this . FulfillmentAction != null )
385
403
hashCode = hashCode * 59 + this . FulfillmentAction . GetHashCode ( ) ;
386
404
if ( this . FulfillmentPolicy != null )
387
405
hashCode = hashCode * 59 + this . FulfillmentPolicy . GetHashCode ( ) ;
388
- if ( this . FulfillmentMethod != null )
389
- hashCode = hashCode * 59 + this . FulfillmentMethod . GetHashCode ( ) ;
390
406
if ( this . CODSettings != null )
391
407
hashCode = hashCode * 59 + this . CODSettings . GetHashCode ( ) ;
392
408
if ( this . ShipFromCountryCode != null )
0 commit comments