diff --git a/CallfireApiClient.nuspec b/CallfireApiClient.nuspec index bc4938b..0b13bd0 100644 --- a/CallfireApiClient.nuspec +++ b/CallfireApiClient.nuspec @@ -1,7 +1,7 @@ CallfireApiClient - 1.1.8 + 1.1.9 CallFire API v2 client Vladimir Mikhailov @@ -15,6 +15,8 @@ C# client library for integration with Callfire REST API v2 services Callfire API client Changelog ============================= +Version 1.1.9 - Jul 11 2016 + - added loading labels parameter in Number Lease objects Version 1.1.8 - May 27 2016 - defaultLiveMessage, defaultMachineMessage, defaultLiveMessageSoundId, defaultMachineMessageSoundId, defaultVoice params added to send calls api - added batch id filter parameter for get broadcast calls/texts diff --git a/Changelog.txt b/Changelog.txt index adb8518..d42bdf5 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,7 @@ Callfire API client Changelog ============================= +Version 1.1.9 - Jul 11 2016 + - added loading labels parameter in Number Lease objects Version 1.1.8 - May 27 2016 - defaultLiveMessage, defaultMachineMessage, defaultLiveMessageSoundId, defaultMachineMessageSoundId, defaultVoice params added to send calls api - added batch id filter parameter for get broadcast calls/texts diff --git a/CurrentReleaseChanges.txt b/CurrentReleaseChanges.txt index 4e05959..5d629ed 100644 --- a/CurrentReleaseChanges.txt +++ b/CurrentReleaseChanges.txt @@ -1,11 +1 @@ -- defaultLiveMessage, defaultMachineMessage, defaultLiveMessageSoundId, defaultMachineMessageSoundId, defaultVoice params added to send calls api -- added batch id filter parameter for get broadcast calls/texts -- added fields filter parameter for add sound via call, returns CampaignSound object -- added fields filter parameter for add sound via text-to-speech, returns CampaignSound object -- defaultMessage parameter added to send texts function -- added findWebhookResource and findWebhookResources methods to use new webhooks apis -- resumeNextDay parameter added to CallBroadcast object -- transferMessage, transferMessageSoundId, transferDigit, transferNumber params added to CallRecipient object for sending calls and texts -- added questionResponses parameter to CallRecord object -- added duplicate parameter to CampaignSound object -- get call recordings api functions implemented in CallsApi +- added loading labels parameter in Number Lease objects diff --git a/src/CallfireApiClient.IntegrationTests/Api/Numbers/NumberLeasesApiIntegrationTest.cs b/src/CallfireApiClient.IntegrationTests/Api/Numbers/NumberLeasesApiIntegrationTest.cs index de9803a..59225cb 100644 --- a/src/CallfireApiClient.IntegrationTests/Api/Numbers/NumberLeasesApiIntegrationTest.cs +++ b/src/CallfireApiClient.IntegrationTests/Api/Numbers/NumberLeasesApiIntegrationTest.cs @@ -16,6 +16,7 @@ public void FindNumberLeases() Console.WriteLine(leases); Assert.True(leases.Items.Count > 0); + Assert.True(leases.Items[0].Labels.Count > 0); } [Test] @@ -27,6 +28,7 @@ public void GetNumberLease() Assert.IsNotNull(lease.Region); Assert.AreEqual(number, lease.PhoneNumber); + Assert.AreEqual(lease.Labels.Count, 2); Assert.That(lease.Region.City, Is.StringContaining("LOS ANGELES")); } diff --git a/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/findNumberLeases.json b/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/findNumberLeases.json index 91f80f4..1fe35cd 100644 --- a/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/findNumberLeases.json +++ b/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/findNumberLeases.json @@ -20,7 +20,8 @@ "autoRenew": true, "status": "ACTIVE", "callFeatureStatus": "ENABLED", - "textFeatureStatus": "ENABLED" + "textFeatureStatus": "ENABLED", + "labels": ["label","label2"] }, { "number": "13025178999", @@ -40,7 +41,8 @@ "autoRenew": true, "status": "ACTIVE", "callFeatureStatus": "UNSUPPORTED", - "textFeatureStatus": "ENABLED" + "textFeatureStatus": "ENABLED", + "labels": ["label","label3"] } ], "limit": 100, diff --git a/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/getNumberLease.json b/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/getNumberLease.json index 3c42f6a..59d129b 100644 --- a/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/getNumberLease.json +++ b/src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/getNumberLease.json @@ -18,5 +18,6 @@ "autoRenew": true, "status": "ACTIVE", "callFeatureStatus": "ENABLED", - "textFeatureStatus": "ENABLED" + "textFeatureStatus": "ENABLED", + "labels": ["label","label2"] } \ No newline at end of file diff --git a/src/CallfireApiClient/Api/Numbers/Model/NumberLease.cs b/src/CallfireApiClient/Api/Numbers/Model/NumberLease.cs index f357501..5d25613 100644 --- a/src/CallfireApiClient/Api/Numbers/Model/NumberLease.cs +++ b/src/CallfireApiClient/Api/Numbers/Model/NumberLease.cs @@ -1,5 +1,6 @@ using System; using CallfireApiClient.Api.Keywords.Model; +using System.Collections.Generic; namespace CallfireApiClient.Api.Numbers.Model { @@ -17,6 +18,8 @@ public class NumberLease : Number public FeatureStatus? TextFeatureStatus { get; set; } + public IList Labels { get; set; } + public enum FeatureStatus { UNSUPPORTED, @@ -27,8 +30,8 @@ public enum FeatureStatus public override string ToString() { - return string.Format("[NumberLease: {0} LeaseBegin={1}, LeaseEnd={2}, AutoRenew={3}, Status={4}, CallFeatureStatus={5}, TextFeatureStatus={6}]", - base.ToString(), LeaseBegin, LeaseEnd, AutoRenew, Status, CallFeatureStatus, TextFeatureStatus); + return string.Format("[NumberLease: {0} LeaseBegin={1}, LeaseEnd={2}, AutoRenew={3}, Status={4}, CallFeatureStatus={5}, TextFeatureStatus={6}, Labels={7}]", + base.ToString(), LeaseBegin, LeaseEnd, AutoRenew, Status, CallFeatureStatus, TextFeatureStatus, Labels); } } } diff --git a/src/CallfireApiClient/Properties/AssemblyInfo.cs b/src/CallfireApiClient/Properties/AssemblyInfo.cs index b0b07bf..d897763 100644 --- a/src/CallfireApiClient/Properties/AssemblyInfo.cs +++ b/src/CallfireApiClient/Properties/AssemblyInfo.cs @@ -13,7 +13,7 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("1.1.8.*")] +[assembly: AssemblyVersion("1.1.9.*")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing.