Skip to content

Commit 291726f

Browse files
Dmitry KovalDmitry Koval
authored andcommitted
Partial update for Order (only order_id is required).
1 parent b13e245 commit 291726f

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

route4me-csharp-sdk/Route4MeSDKLibrary/DataTypes/Order.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public sealed class Order : GenericParameters
2727
/// <summary>
2828
/// Order ID
2929
/// </summary>
30-
[DataMember(Name = "order_id", EmitDefaultValue = false)]
31-
public long? OrderId { get; set; }
30+
[DataMember(Name = "order_id")]
31+
public long OrderId { get; set; }
3232

3333
/// <summary>
3434
/// Order status ID. Available values:
@@ -55,7 +55,7 @@ public sealed class Order : GenericParameters
5555
/// <summary>
5656
/// Address 1 field. Required
5757
/// </summary>
58-
[DataMember(Name = "address_1")]
58+
[DataMember(Name = "address_1", EmitDefaultValue = false)]
5959
public string Address1 { get; set; }
6060

6161
/// <summary>
@@ -121,7 +121,7 @@ public sealed class Order : GenericParameters
121121
/// <summary>
122122
/// Order inserted date
123123
/// </summary>
124-
[DataMember(Name = "day_added_YYMMDD")]
124+
[DataMember(Name = "day_added_YYMMDD", EmitDefaultValue = false)]
125125
public string DayAddedYYMMDD { get; set; }
126126

127127
/// <summary>
@@ -133,7 +133,7 @@ public sealed class Order : GenericParameters
133133
/// <summary>
134134
/// Address Alias. Required
135135
/// </summary>
136-
[DataMember(Name = "address_alias")]
136+
[DataMember(Name = "address_alias", EmitDefaultValue = false)]
137137
public string AddressAlias { get; set; }
138138

139139
/// <summary>
@@ -308,19 +308,19 @@ public sealed class Order : GenericParameters
308308
/// Route address stop type. For available values see Enums.AddressStopType
309309
/// DELIVERY, PICKUP, BREAK, MEETUP, SERVICE, VISIT, DRIVEBY
310310
/// </summary>
311-
[DataMember(Name = "address_stop_type")]
311+
[DataMember(Name = "address_stop_type", EmitDefaultValue = false)]
312312
public string AddressStopType { get; set; }
313313

314314
/// <summary>
315315
/// Last status of the order.
316316
/// </summary>
317-
[DataMember(Name = "last_status")]
317+
[DataMember(Name = "last_status", EmitDefaultValue = false)]
318318
public string lastStatus { get; set; }
319319

320320
/// <summary>
321321
/// An order sorted on date.
322322
/// </summary>
323-
[DataMember(Name = "sorted_on_date")]
323+
[DataMember(Name = "sorted_on_date", EmitDefaultValue = false)]
324324
public string SortedOnDate { get; set; }
325325

326326
/// <summary>

route4me-csharp-sdk/Route4MeSDKTest/Examples/API5/Orders/GetOrdersHistoryV5.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void GetOrdersHistoryV5()
2525

2626
var parameters = new OrderHistoryParameters()
2727
{
28-
OrderId = orders.Single().OrderId.Value,
28+
OrderId = orders.Single().OrderId,
2929
TrackingNumber = orders.Single().TrackingNumber
3030
};
3131

route4me-csharp-sdk/Route4MeSDKTest/Examples/API5/Orders/GetOrdersHistoryV5Async.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public async void GetOrdersHistoryV5Async()
2626

2727
var parameters = new OrderHistoryParameters()
2828
{
29-
OrderId = orders.Single().OrderId.Value,
29+
OrderId = orders.Single().OrderId,
3030
TrackingNumber = orders.Single().TrackingNumber
3131
};
3232

route4me-csharp-sdk/Route4MeSdkV5UnitTest/V5/Orders/OrdersTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void OrdersHistoryTest()
4949

5050
var parameters = new OrderHistoryParameters()
5151
{
52-
OrderId = orders.Single().OrderId.Value,
52+
OrderId = orders.Single().OrderId,
5353
TrackingNumber = orders.Single().TrackingNumber
5454
};
5555

@@ -69,7 +69,7 @@ public async Task OrderHistoryAsyncTest()
6969

7070
var parameters = new OrderHistoryParameters()
7171
{
72-
OrderId = orders.Item1.Single().OrderId.Value,
72+
OrderId = orders.Item1.Single().OrderId,
7373
TrackingNumber = orders.Item1.Single().TrackingNumber
7474
};
7575

0 commit comments

Comments
 (0)