Skip to content

Commit

Permalink
Merge pull request #20 from Bandwidth/DX-673
Browse files Browse the repository at this point in the history
DX-673
  • Loading branch information
jchavez443 authored Sep 9, 2019
2 parents 2bb0007 + d888f69 commit f381283
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 18 deletions.
16 changes: 0 additions & 16 deletions Bandwidth.Iris.Examples/App.config.example

This file was deleted.

10 changes: 8 additions & 2 deletions Bandwidth.Iris.Tests/Models/DisconnectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ public void DisconnectNumbersTest()
Name = "order",
DisconnectTelephoneNumberOrderType = new DisconnectTelephoneNumberOrderType
{
TelephoneNumbers = new[] {"111", "222"}
TelephoneNumberList = new TelephoneNumberList
{
TelephoneNumbers = new[] {"111", "222" }
}
}
};
using (var server = new HttpServer(new RequestHandler
Expand All @@ -46,7 +49,10 @@ public void DisconnectNumbersWithDefaultClientTest()
Name = "order",
DisconnectTelephoneNumberOrderType = new DisconnectTelephoneNumberOrderType
{
TelephoneNumbers = new[] { "111", "222" }
TelephoneNumberList = new TelephoneNumberList
{
TelephoneNumbers = new[] { "111", "222" }
}
}
};
using (var server = new HttpServer(new RequestHandler
Expand Down
59 changes: 59 additions & 0 deletions Bandwidth.Iris.Tests/Models/LsrOrderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,65 @@ public void CreateTest()
}
}

[TestMethod]
public void CreateTestWithNames()
{
var item = new LsrOrder
{
Pon = "Some Pon",
CustomerOrderId = "MyId5",
Spid = "123C",
BillingTelephoneNumber = "9192381468",
AuthorizingPerson = "Jim Hopkins",
Subscriber = new Subscriber
{
SubscriberType = "BUSINESS",
BusinessName = "BusinessName",
ServiceAddress = new Address
{
HouseNumber = "11",
StreetName = "Park",
StreetSuffix = "Ave",
City = "New York",
StateCode = "NY",
Zip = "90025"
},
AccountNumber = "123463",
PinNumber = "1231",
FirstName = "John",
LastName = "Doe"
},
ListOfTelephoneNumbers = new[] { "9192381848", "9192381467" }
};

using (var server = new HttpServer(new[]
{
new RequestHandler
{
EstimatedMethod = "POST",
EstimatedPathAndQuery = string.Format("/v1.0/accounts/{0}/lsrorders", Helper.AccountId),
EstimatedContent = Helper.ToXmlString(item),
HeadersToSend =
new Dictionary<string, string>
{
{"Location", string.Format("/v1.0/accounts/{0}/lsrorders/1", Helper.AccountId)}
}
},
new RequestHandler
{
EstimatedMethod = "GET",
EstimatedPathAndQuery = string.Format("/v1.0/accounts/{0}/lsrorders/1", Helper.AccountId),
ContentToSend = new StringContent(TestXmlStrings.LsrOrder, Encoding.UTF8, "application/xml")
}
}))
{
var client = Helper.CreateClient();
var i = LsrOrder.Create(client, item).Result;
if (server.Error != null) throw server.Error;
Assert.AreEqual("00cf7e08-cab0-4515-9a77-2d0a7da09415", i.Id);
}
}

[TestMethod]
public void CreateWithDefaultClientTest()
{
Expand Down
1 change: 1 addition & 0 deletions Bandwidth.Iris/Model/AvailableNumbers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ public class TelephoneNumberDetail
public string Tier { get; set; }
public string VendorId { get; set; }
public string VendorName { get; set; }
public string TelephoneNumber { get; set; }
}
}
2 changes: 2 additions & 0 deletions Bandwidth.Iris/Model/PortIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ public class Subscriber
public string BusinessName { get; set; }
public string AccountNumber { get; set; }
public string PinNumber { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }

public Address ServiceAddress { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ var data = new PortIn
{
SubscriberType = "BUSINESS",
BusinessName = "Company",
FirstName = "John",
LastName = "Doe",
ServiceAddress = new Address
{
City = "City",
Expand Down

0 comments on commit f381283

Please sign in to comment.