Skip to content

Commit 8cb1c53

Browse files
authored
Merge pull request #37 from CallFire/develop
vmalinovskiy - added support for lables parameter in number leases api
2 parents 81b75ea + 19ddf30 commit 8cb1c53

File tree

8 files changed

+20
-18
lines changed

8 files changed

+20
-18
lines changed

CallfireApiClient.nuspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?><package>
22
<metadata>
33
<id>CallfireApiClient</id>
4-
<version>1.1.8</version>
4+
<version>1.1.9</version>
55
<title>CallFire API v2 client</title>
66
<authors>
77
Vladimir Mikhailov
@@ -15,6 +15,8 @@
1515
<description>C# client library for integration with Callfire REST API v2 services</description>
1616
<releaseNotes>Callfire API client Changelog
1717
=============================
18+
Version 1.1.9 - Jul 11 2016
19+
- added loading labels parameter in Number Lease objects
1820
Version 1.1.8 - May 27 2016
1921
- defaultLiveMessage, defaultMachineMessage, defaultLiveMessageSoundId, defaultMachineMessageSoundId, defaultVoice params added to send calls api
2022
- added batch id filter parameter for get broadcast calls/texts

Changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Callfire API client Changelog
22
=============================
3+
Version 1.1.9 - Jul 11 2016
4+
- added loading labels parameter in Number Lease objects
35
Version 1.1.8 - May 27 2016
46
- defaultLiveMessage, defaultMachineMessage, defaultLiveMessageSoundId, defaultMachineMessageSoundId, defaultVoice params added to send calls api
57
- added batch id filter parameter for get broadcast calls/texts

CurrentReleaseChanges.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
- defaultLiveMessage, defaultMachineMessage, defaultLiveMessageSoundId, defaultMachineMessageSoundId, defaultVoice params added to send calls api
2-
- added batch id filter parameter for get broadcast calls/texts
3-
- added fields filter parameter for add sound via call, returns CampaignSound object
4-
- added fields filter parameter for add sound via text-to-speech, returns CampaignSound object
5-
- defaultMessage parameter added to send texts function
6-
- added findWebhookResource and findWebhookResources methods to use new webhooks apis
7-
- resumeNextDay parameter added to CallBroadcast object
8-
- transferMessage, transferMessageSoundId, transferDigit, transferNumber params added to CallRecipient object for sending calls and texts
9-
- added questionResponses parameter to CallRecord object
10-
- added duplicate parameter to CampaignSound object
11-
- get call recordings api functions implemented in CallsApi
1+
- added loading labels parameter in Number Lease objects

src/CallfireApiClient.IntegrationTests/Api/Numbers/NumberLeasesApiIntegrationTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public void FindNumberLeases()
1616
Console.WriteLine(leases);
1717

1818
Assert.True(leases.Items.Count > 0);
19+
Assert.True(leases.Items[0].Labels.Count > 0);
1920
}
2021

2122
[Test]
@@ -27,6 +28,7 @@ public void GetNumberLease()
2728

2829
Assert.IsNotNull(lease.Region);
2930
Assert.AreEqual(number, lease.PhoneNumber);
31+
Assert.AreEqual(lease.Labels.Count, 2);
3032
Assert.That(lease.Region.City, Is.StringContaining("LOS ANGELES"));
3133
}
3234

src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/findNumberLeases.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"autoRenew": true,
2121
"status": "ACTIVE",
2222
"callFeatureStatus": "ENABLED",
23-
"textFeatureStatus": "ENABLED"
23+
"textFeatureStatus": "ENABLED",
24+
"labels": ["label","label2"]
2425
},
2526
{
2627
"number": "13025178999",
@@ -40,7 +41,8 @@
4041
"autoRenew": true,
4142
"status": "ACTIVE",
4243
"callFeatureStatus": "UNSUPPORTED",
43-
"textFeatureStatus": "ENABLED"
44+
"textFeatureStatus": "ENABLED",
45+
"labels": ["label","label3"]
4446
}
4547
],
4648
"limit": 100,

src/CallfireApiClient.Tests/JsonMocks/numbers/numberLeasesApi/response/getNumberLease.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
"autoRenew": true,
1919
"status": "ACTIVE",
2020
"callFeatureStatus": "ENABLED",
21-
"textFeatureStatus": "ENABLED"
21+
"textFeatureStatus": "ENABLED",
22+
"labels": ["label","label2"]
2223
}

src/CallfireApiClient/Api/Numbers/Model/NumberLease.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using CallfireApiClient.Api.Keywords.Model;
3+
using System.Collections.Generic;
34

45
namespace CallfireApiClient.Api.Numbers.Model
56
{
@@ -17,6 +18,8 @@ public class NumberLease : Number
1718

1819
public FeatureStatus? TextFeatureStatus { get; set; }
1920

21+
public IList<String> Labels { get; set; }
22+
2023
public enum FeatureStatus
2124
{
2225
UNSUPPORTED,
@@ -27,8 +30,8 @@ public enum FeatureStatus
2730

2831
public override string ToString()
2932
{
30-
return string.Format("[NumberLease: {0} LeaseBegin={1}, LeaseEnd={2}, AutoRenew={3}, Status={4}, CallFeatureStatus={5}, TextFeatureStatus={6}]",
31-
base.ToString(), LeaseBegin, LeaseEnd, AutoRenew, Status, CallFeatureStatus, TextFeatureStatus);
33+
return string.Format("[NumberLease: {0} LeaseBegin={1}, LeaseEnd={2}, AutoRenew={3}, Status={4}, CallFeatureStatus={5}, TextFeatureStatus={6}, Labels={7}]",
34+
base.ToString(), LeaseBegin, LeaseEnd, AutoRenew, Status, CallFeatureStatus, TextFeatureStatus, Labels);
3235
}
3336
}
3437
}

src/CallfireApiClient/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1414
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
1515

16-
[assembly: AssemblyVersion("1.1.8.*")]
16+
[assembly: AssemblyVersion("1.1.9.*")]
1717

1818
// The following attributes are used to specify the signing key for the assembly,
1919
// if desired. See the Mono documentation for more information about signing.

0 commit comments

Comments
 (0)