Skip to content

Commit

Permalink
Merge pull request #79 from Bandwidth/SWI-4050
Browse files Browse the repository at this point in the history
Fix LIDB OrderId Deserialization
  • Loading branch information
ajrice6713 authored Dec 5, 2023
2 parents 42a8642 + 70fb05e commit 19af62f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Test
on:
schedule:
- cron: "0 4 * * *"
pull_request:
workflow_dispatch:

Expand Down
4 changes: 2 additions & 2 deletions Bandwidth.Iris.Tests/Models/LidbTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void GetTest()
var client = Helper.CreateClient();
var result = Lidb.Get(client, "1").Result;
if (server.Error != null) throw server.Error;
Assert.Equal("255bda29-fc57-44e8-a6c2-59b45388c6d0", result.Id);
Assert.Equal("255bda29-fc57-44e8-a6c2-59b45388c6d0", result.OrderId);
}
}

Expand All @@ -45,7 +45,7 @@ public void GetWithDefaultClientTest()
{
var result = Lidb.Get("1").Result;
if (server.Error != null) throw server.Error;
Assert.Equal("255bda29-fc57-44e8-a6c2-59b45388c6d0", result.Id);
Assert.Equal("255bda29-fc57-44e8-a6c2-59b45388c6d0", result.OrderId);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Bandwidth.Iris.Tests/TestXmlStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,8 +1356,8 @@ public static class TestXmlStrings
public static string OrderHistory = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><OrderHistoryWrapper><OrderHistory><OrderDate>2014-05-20T14:21:43.937Z</OrderDate><Note>Order backordered - awaiting additional numbers</Note><Status>BACKORDERED</Status></OrderHistory><OrderHistory><OrderDate>2014-05-20T14:24:43.428Z</OrderDate><Note>Order backordered - awaiting additional numbers</Note><Author>System</Author><Status>BACKORDERED</Status><Difference></Difference></OrderHistory></OrderHistoryWrapper>";
public static string InServiceNumbers = "<?xml version=\"1.0\"?><TNs><TotalCount>59</TotalCount><Links><first> ( a link goes here ) </first></Links><TelephoneNumbers><Count>59</Count><TelephoneNumber>8043024183</TelephoneNumber><TelephoneNumber>8042121778</TelephoneNumber><TelephoneNumber>8042146066</TelephoneNumber><TelephoneNumber>8043814903</TelephoneNumber><TelephoneNumber>8043814905</TelephoneNumber><TelephoneNumber>8043814864</TelephoneNumber><TelephoneNumber>8043326094</TelephoneNumber><TelephoneNumber>8042121771</TelephoneNumber><TelephoneNumber>8043024182</TelephoneNumber><!-- SNIP --><TelephoneNumber>8043814900</TelephoneNumber><TelephoneNumber>8047672642</TelephoneNumber><TelephoneNumber>8043024368</TelephoneNumber><TelephoneNumber>8042147950</TelephoneNumber><TelephoneNumber>8043169931</TelephoneNumber><TelephoneNumber>8043325302</TelephoneNumber></TelephoneNumbers></TNs>";
public static string InServiceNumbersTotals = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Quantity><Count>3</Count></Quantity>";
public static string Lidbs = "<?xml version=\"1.0\"?><ResponseSelectWrapper><ListOrderIdUserIdDate><TotalCount>2122</TotalCount><OrderIdUserIdDate><accountId>9999999</accountId><CountOfTNs>0</CountOfTNs><lastModifiedDate>2014-02-25T16:02:43.195Z</lastModifiedDate><OrderType>lidb</OrderType><OrderDate>2014-02-25T16:02:43.195Z</OrderDate><orderId>abe36738-6929-4c6f-926c-88e534e2d46f</orderId><OrderStatus>FAILED</OrderStatus><TelephoneNumberDetails/><userId>team_ua</userId></OrderIdUserIdDate><!-- ...SNIP... --><OrderIdUserIdDate><accountId>9999999</accountId><CountOfTNs>0</CountOfTNs><lastModifiedDate>2014-02-25T16:02:39.021Z</lastModifiedDate><OrderType>lidb</OrderType><OrderDate>2014-02-25T16:02:39.021Z</OrderDate><orderId>ba5b6297-139b-4430-aab0-9ff02c4362f4</orderId><OrderStatus>FAILED</OrderStatus><userId>team_ua</userId></OrderIdUserIdDate></ListOrderIdUserIdDate></ResponseSelectWrapper>";
public static string Lidb = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><LidbOrder><CustomerOrderId>testCustomerOrderId</CustomerOrderId><orderId>255bda29-fc57-44e8-a6c2-59b45388c6d0</orderId> <OrderCreateDate>2014-05-28T14:46:21.724Z</OrderCreateDate><ProcessingStatus>RECEIVED</ProcessingStatus><CreatedByUser>jbm</CreatedByUser><LastModifiedDate>2014-02-20T19:33:17.600Z</LastModifiedDate><OrderCompleteDate>2014-02-20T19:33:17.600Z</OrderCompleteDate><ErrorList/><LidbTnGroups><LidbTnGroup><TelephoneNumbers><TelephoneNumber>4082213311</TelephoneNumber></TelephoneNumbers><FullNumber>8042105618</FullNumber><SubscriberInformation>Fred</SubscriberInformation><UseType>BUSINESS</UseType><Visibility>PRIVATE</Visibility></LidbTnGroup><LidbTnGroup><TelephoneNumbers><TelephoneNumber>4082212850</TelephoneNumber><TelephoneNumber>4082213310</TelephoneNumber></TelephoneNumbers><FullNumber>8042105760</FullNumber><SubscriberInformation>Fred</SubscriberInformation><UseType>RESIDENTIAL</UseType><Visibility>PUBLIC</Visibility></LidbTnGroup></LidbTnGroups></LidbOrder>";
public static string Lidbs = "<?xml version=\"1.0\"?><ResponseSelectWrapper><ListOrderIdUserIdDate><TotalCount>2122</TotalCount><OrderIdUserIdDate><accountId>9999999</accountId><CountOfTNs>0</CountOfTNs><lastModifiedDate>2014-02-25T16:02:43.195Z</lastModifiedDate><OrderType>lidb</OrderType><OrderDate>2014-02-25T16:02:43.195Z</OrderDate><OrderId>abe36738-6929-4c6f-926c-88e534e2d46f</OrderId><OrderStatus>FAILED</OrderStatus><TelephoneNumberDetails/><userId>team_ua</userId></OrderIdUserIdDate><!-- ...SNIP... --><OrderIdUserIdDate><accountId>9999999</accountId><CountOfTNs>0</CountOfTNs><lastModifiedDate>2014-02-25T16:02:39.021Z</lastModifiedDate><OrderType>lidb</OrderType><OrderDate>2014-02-25T16:02:39.021Z</OrderDate><orderId>ba5b6297-139b-4430-aab0-9ff02c4362f4</orderId><OrderStatus>FAILED</OrderStatus><userId>team_ua</userId></OrderIdUserIdDate></ListOrderIdUserIdDate></ResponseSelectWrapper>";
public static string Lidb = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><LidbOrder><CustomerOrderId>testCustomerOrderId</CustomerOrderId><OrderId>255bda29-fc57-44e8-a6c2-59b45388c6d0</OrderId> <OrderCreateDate>2014-05-28T14:46:21.724Z</OrderCreateDate><ProcessingStatus>RECEIVED</ProcessingStatus><CreatedByUser>jbm</CreatedByUser><LastModifiedDate>2014-02-20T19:33:17.600Z</LastModifiedDate><OrderCompleteDate>2014-02-20T19:33:17.600Z</OrderCompleteDate><ErrorList/><LidbTnGroups><LidbTnGroup><TelephoneNumbers><TelephoneNumber>4082213311</TelephoneNumber></TelephoneNumbers><FullNumber>8042105618</FullNumber><SubscriberInformation>Fred</SubscriberInformation><UseType>BUSINESS</UseType><Visibility>PRIVATE</Visibility></LidbTnGroup><LidbTnGroup><TelephoneNumbers><TelephoneNumber>4082212850</TelephoneNumber><TelephoneNumber>4082213310</TelephoneNumber></TelephoneNumbers><FullNumber>8042105760</FullNumber><SubscriberInformation>Fred</SubscriberInformation><UseType>RESIDENTIAL</UseType><Visibility>PUBLIC</Visibility></LidbTnGroup></LidbTnGroups></LidbOrder>";
public static string LsrOrder = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><LsrOrder><CustomerOrderId>MyId5</CustomerOrderId><LastModifiedBy>System</LastModifiedBy><OrderCreateDate>2015-03-03T13:54:00.450Z</OrderCreateDate><AccountId>9999999</AccountId><OrderId>00cf7e08-cab0-4515-9a77-2d0a7da09415</OrderId><LastModifiedDate>2015-03-03T14:07:19.926Z</LastModifiedDate><OrderStatus>FAILED</OrderStatus><SPID>123C</SPID><BillingTelephoneNumber>9192381468</BillingTelephoneNumber><Pon>testpon1002</Pon><PonVersion>0</PonVersion><RequestedFocDate>2015-11-15</RequestedFocDate><AuthorizingPerson>Jim Hopkins</AuthorizingPerson><Subscriber><SubscriberType>BUSINESS</SubscriberType><BusinessName>BusinessName</BusinessName><AccountNumber>123463</AccountNumber><PinNumber>1231</PinNumber><ServiceAddress><HouseNumber>11</HouseNumber><StreetName>Park</StreetName><StreetSuffix>Ave</StreetSuffix><City>New York</City><StateCode>NY</StateCode><Zip>90025</Zip></ServiceAddress></Subscriber><ListOfTelephoneNumbers><TelephoneNumber>9192381467</TelephoneNumber><TelephoneNumber>9192381468</TelephoneNumber></ListOfTelephoneNumbers><CountOfTNs>2</CountOfTNs></LsrOrder>";
public static string LsrOrders = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><LsrOrders><TotalCount>5</TotalCount><LsrOrderSummary><accountId>9999999</accountId><CountOfTNs>2</CountOfTNs><CustomerOrderId>FineCustomerid</CustomerOrderId><userId>team_ua</userId><lastModifiedDate>2015-03-02T09:10:16.193Z</lastModifiedDate><OrderType>lsr</OrderType><OrderDate>2015-03-25T11:44:42.941Z</OrderDate><OrderStatus>PENDING</OrderStatus><ActualFocDate>2015-03-25</ActualFocDate><BillingTelephoneNumber>2526795000</BillingTelephoneNumber><CreatedByUser>lsrOnlyUser</CreatedByUser><OrderId>7d644c88-ef23-4307-96ab-20253666d0c7</OrderId><Pon>ATT-011515-324234</Pon><PonVersion>0</PonVersion><RequestedFocDate>2015-11-15</RequestedFocDate></LsrOrderSummary><!-- SNIP --><LsrOrderSummary><accountId>9999999</accountId><CountOfTNs>2</CountOfTNs><CustomerOrderId>MyId5</CustomerOrderId><lastModifiedDate>2015-03-03T14:07:19.926Z</lastModifiedDate><OrderType>lsr</OrderType><OrderDate>2015-03-25T11:44:42.941Z</OrderDate><OrderStatus>NEW</OrderStatus><ActualFocDate>2015-03-25</ActualFocDate><BillingTelephoneNumber>2526795000</BillingTelephoneNumber><CreatedByUser>lsrOnlyUser</CreatedByUser><OrderId>00cf7e08-cab0-4515-9a77-2d0a7da09415</OrderId><Pon>testpon1002</Pon><PonVersion>0</PonVersion><RequestedFocDate>2015-11-15</RequestedFocDate></LsrOrderSummary></LsrOrders>";
public static string LineOption = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><LineOptionOrderResponse> <LineOptions> <CompletedNumbers> <TelephoneNumber>2013223685</TelephoneNumber> </CompletedNumbers> </LineOptions> </LineOptionOrderResponse>";
Expand Down
2 changes: 1 addition & 1 deletion Bandwidth.Iris/Model/Lidb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override string Id

public string CustomerOrderId { get; set; }

[XmlElement("orderId")]
[XmlElement("OrderId")]
public string OrderId { get; set; }

public DateTime OrderCreateDate { get; set; }
Expand Down

0 comments on commit 19af62f

Please sign in to comment.