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,7 @@ 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
+ 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
76
{
68
77
// to ensure "SellerFulfillmentOrderId" is required (not null)
69
78
if ( SellerFulfillmentOrderId == null )
@@ -90,7 +99,7 @@ public CreateFulfillmentOrderRequest() { }
90
99
}
91
100
else
92
101
{
93
- this . DisplayableOrderDate = DisplayableOrderDate ;
102
+ this . DisplayableOrderDate = DisplayableOrderDate . Value ;
94
103
}
95
104
// to ensure "DisplayableOrderComment" is required (not null)
96
105
if ( DisplayableOrderComment == null )
@@ -108,10 +117,12 @@ public CreateFulfillmentOrderRequest() { }
108
117
}
109
118
else
110
119
{
111
- this . ShippingSpeedCategory = ShippingSpeedCategory ;
112
- }
113
- // to ensure "DestinationAddress" is required (not null)
114
- if ( DestinationAddress == null )
120
+ #pragma warning disable 0618
121
+ this . ShippingSpeedCategory = ShippingSpeedCategory ;
122
+ #pragma warning restore 0618
123
+ }
124
+ // to ensure "DestinationAddress" is required (not null)
125
+ if ( DestinationAddress == null )
115
126
{
116
127
throw new InvalidDataException ( "DestinationAddress is a required property for CreateFulfillmentOrderRequest and cannot be null" ) ;
117
128
}
@@ -132,7 +143,6 @@ public CreateFulfillmentOrderRequest() { }
132
143
this . DeliveryWindow = DeliveryWindow ;
133
144
this . FulfillmentAction = FulfillmentAction ;
134
145
this . FulfillmentPolicy = FulfillmentPolicy ;
135
- this . FulfillmentMethod = FulfillmentMethod ;
136
146
this . CODSettings = CODSettings ;
137
147
this . ShipFromCountryCode = ShipFromCountryCode ;
138
148
this . NotificationEmails = NotificationEmails ;
@@ -189,13 +199,6 @@ public CreateFulfillmentOrderRequest() { }
189
199
190
200
191
201
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 ; }
198
-
199
202
/// <summary>
200
203
/// Gets or Sets CODSettings
201
204
/// </summary>
@@ -235,12 +238,13 @@ public override string ToString()
235
238
sb . Append ( " DisplayableOrderId: " ) . Append ( DisplayableOrderId ) . Append ( "\n " ) ;
236
239
sb . Append ( " DisplayableOrderDate: " ) . Append ( DisplayableOrderDate ) . Append ( "\n " ) ;
237
240
sb . Append ( " DisplayableOrderComment: " ) . Append ( DisplayableOrderComment ) . Append ( "\n " ) ;
238
- sb . Append ( " ShippingSpeedCategory: " ) . Append ( ShippingSpeedCategory ) . Append ( "\n " ) ;
239
- sb . Append ( " DeliveryWindow: " ) . Append ( DeliveryWindow ) . Append ( "\n " ) ;
241
+ #pragma warning disable 0618
242
+ sb . Append ( " ShippingSpeedCategory: " ) . Append ( ShippingSpeedCategory ) . Append ( "\n " ) ;
243
+ #pragma warning restore 0618
244
+ sb . Append ( " DeliveryWindow: " ) . Append ( DeliveryWindow ) . Append ( "\n " ) ;
240
245
sb . Append ( " DestinationAddress: " ) . Append ( DestinationAddress ) . Append ( "\n " ) ;
241
246
sb . Append ( " FulfillmentAction: " ) . Append ( FulfillmentAction ) . Append ( "\n " ) ;
242
247
sb . Append ( " FulfillmentPolicy: " ) . Append ( FulfillmentPolicy ) . Append ( "\n " ) ;
243
- sb . Append ( " FulfillmentMethod: " ) . Append ( FulfillmentMethod ) . Append ( "\n " ) ;
244
248
sb . Append ( " CODSettings: " ) . Append ( CODSettings ) . Append ( "\n " ) ;
245
249
sb . Append ( " ShipFromCountryCode: " ) . Append ( ShipFromCountryCode ) . Append ( "\n " ) ;
246
250
sb . Append ( " NotificationEmails: " ) . Append ( NotificationEmails ) . Append ( "\n " ) ;
@@ -305,10 +309,12 @@ public bool Equals(CreateFulfillmentOrderRequest input)
305
309
this . DisplayableOrderComment . Equals ( input . DisplayableOrderComment ) )
306
310
) &&
307
311
(
308
- this . ShippingSpeedCategory == input . ShippingSpeedCategory ||
312
+ #pragma warning disable 0618
313
+ this . ShippingSpeedCategory == input . ShippingSpeedCategory ||
309
314
( this . ShippingSpeedCategory != null &&
310
315
this . ShippingSpeedCategory . Equals ( input . ShippingSpeedCategory ) )
311
- ) &&
316
+ #pragma warning restore 0618
317
+ ) &&
312
318
(
313
319
this . DeliveryWindow == input . DeliveryWindow ||
314
320
( this . DeliveryWindow != null &&
@@ -329,11 +335,6 @@ public bool Equals(CreateFulfillmentOrderRequest input)
329
335
( this . FulfillmentPolicy != null &&
330
336
this . FulfillmentPolicy . Equals ( input . FulfillmentPolicy ) )
331
337
) &&
332
- (
333
- this . FulfillmentMethod == input . FulfillmentMethod ||
334
- ( this . FulfillmentMethod != null &&
335
- this . FulfillmentMethod . Equals ( input . FulfillmentMethod ) )
336
- ) &&
337
338
(
338
339
this . CODSettings == input . CODSettings ||
339
340
( this . CODSettings != null &&
@@ -375,18 +376,18 @@ public override int GetHashCode()
375
376
hashCode = hashCode * 59 + this . DisplayableOrderDate . GetHashCode ( ) ;
376
377
if ( this . DisplayableOrderComment != null )
377
378
hashCode = hashCode * 59 + this . DisplayableOrderComment . GetHashCode ( ) ;
378
- if ( this . ShippingSpeedCategory != null )
379
+ #pragma warning disable 0618
380
+ if ( this . ShippingSpeedCategory != null )
379
381
hashCode = hashCode * 59 + this . ShippingSpeedCategory . GetHashCode ( ) ;
380
- if ( this . DeliveryWindow != null )
382
+ #pragma warning restore 0618
383
+ if ( this . DeliveryWindow != null )
381
384
hashCode = hashCode * 59 + this . DeliveryWindow . GetHashCode ( ) ;
382
385
if ( this . DestinationAddress != null )
383
386
hashCode = hashCode * 59 + this . DestinationAddress . GetHashCode ( ) ;
384
387
if ( this . FulfillmentAction != null )
385
388
hashCode = hashCode * 59 + this . FulfillmentAction . GetHashCode ( ) ;
386
389
if ( this . FulfillmentPolicy != null )
387
390
hashCode = hashCode * 59 + this . FulfillmentPolicy . GetHashCode ( ) ;
388
- if ( this . FulfillmentMethod != null )
389
- hashCode = hashCode * 59 + this . FulfillmentMethod . GetHashCode ( ) ;
390
391
if ( this . CODSettings != null )
391
392
hashCode = hashCode * 59 + this . CODSettings . GetHashCode ( ) ;
392
393
if ( this . ShipFromCountryCode != null )
0 commit comments