Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CallfireApiClient.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?><package>
<metadata>
<id>CallfireApiClient</id>
<version>1.1.16</version>
<version>1.1.17</version>
<title>CallFire API v2 client</title>
<authors>
Vladimir Mikhailov
Expand All @@ -15,6 +15,11 @@
<description>C# client library for integration with Callfire REST API v2 services</description>
<releaseNotes>Callfire API client Changelog
=============================
Version 1.1.17 - May 4 2017
- removed subscriptions api (not supported from v2 api client)
- fixed findWebhooks api to use enums instead strings
- trivial tests fixes

Version 1.1.16 - Mar 28 2017
- fixed DayOfWeek enum for scheduler

Expand Down
5 changes: 5 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Callfire API client Changelog
=============================
Version 1.1.17 - May 4 2017
- removed subscriptions api (not supported from v2 api client)
- fixed findWebhooks api to use enums instead strings
- trivial tests fixes

Version 1.1.16 - Mar 28 2017
- fixed DayOfWeek enum for scheduler

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void StartStopArchiveCampaign()
new Recipient { PhoneNumber = "14246525473" }
}
};
var id = Client.CallBroadcastsApi.Create(broadcast, true);
var id = Client.CallBroadcastsApi.Create(broadcast, false);

CallBroadcast campaign = Client.CallBroadcastsApi.Get(id.Id);
System.Console.WriteLine(campaign);
Expand Down Expand Up @@ -134,7 +134,7 @@ public void GetBroadcastCalls()

long testBatchId = (long) calls.Items[0].BatchId;

getCallsRequest = new GetBroadcastCallsTextsRequest { Id = 1, batchId = testBatchId };
getCallsRequest = new GetBroadcastCallsTextsRequest { Id = 1, BatchId = testBatchId };
calls = Client.CallBroadcastsApi.GetCalls(getCallsRequest);
System.Console.WriteLine(calls);
Assert.AreEqual(calls.Items[0].BatchId, testBatchId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void GetBroadcastTexts()

long testBatchId = (long)texts.Items[0].BatchId;

request = new GetBroadcastCallsTextsRequest { Id = broadcastId.Id, batchId = testBatchId };
request = new GetBroadcastCallsTextsRequest { Id = broadcastId.Id, BatchId = testBatchId };
texts = Client.TextBroadcastsApi.GetTexts(request);
Assert.AreEqual(texts.Items[0].BatchId, testBatchId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ public class DncApiIntegrationTest : AbstractIntegrationTest
[Test]
public void FindDncs()
{
CreateDncsRequest crRequest = new CreateDncsRequest()
{
Call = true,
Text = true,
Numbers = new List<string> { "12135551189" },
Source = "testSourceForGetDncByNumber"
};
Client.DncApi.Create(crRequest);

var request = new FindDncNumbersRequest()
{
Text = true,
Expand All @@ -26,6 +35,8 @@ public void FindDncs()

Assert.NotNull(dncs);
Assert.AreEqual(dncs.Items.Count, 1);

Client.DncApi.Delete("12135551189");
}

[Test]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<Compile Include="Api\Keywords\KeywordsApiIntegrationTest.cs" />
<Compile Include="Api\Numbers\NumberLeasesApiIntegrationTest.cs" />
<Compile Include="Api\Numbers\NumbersApiIntegrationTest.cs" />
<Compile Include="Api\Webhooks\SubscriptionsApiIntegrationTest.cs" />
<Compile Include="Api\Webhooks\WebhooksApiIntegrationTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Api\AbstractIntegrationTest.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void GetCallsWithGetByIdAndBatchIdRequest()
Offset = 5,
Fields = FIELDS,
Id = 11,
batchId = 13
BatchId = 13
};
var calls = Client.CallBroadcastsApi.GetCalls(request);
Assert.That(Serializer.Serialize(calls), Is.EqualTo(expectedJson));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void GetTextsWithGetByIdAndBatchIdRequest()
Offset = 5,
Fields = FIELDS,
Id = 11,
batchId = 13
BatchId = 13
};
var texts = Client.TextBroadcastsApi.GetTexts(request);
Assert.That(Serializer.Serialize(texts), Is.EqualTo(expectedJson));
Expand Down
110 changes: 0 additions & 110 deletions src/CallfireApiClient.Tests/Api/Webhooks/SubscriptionsApiTest.cs

This file was deleted.

4 changes: 2 additions & 2 deletions src/CallfireApiClient.Tests/Api/Webhooks/WebhooksApiTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void Find()
Limit = 5,
Offset = 0,
Enabled = false,
Resource = "resource"
Resource = ResourceType.TEXT_BROADCAST
};
var webhooks = Client.WebhooksApi.Find(request);
Assert.That(Serializer.Serialize(webhooks), Is.EqualTo(expectedJson));
Expand All @@ -55,7 +55,7 @@ public void Find()
Assert.IsNull(requestBodyParam);
Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("limit") && p.Value.Equals("5")));
Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("offset") && p.Value.Equals("0")));
Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("resource") && p.Value.Equals("resource")));
Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("resource") && p.Value.Equals(ResourceType.TEXT_BROADCAST.ToString())));
Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("enabled") && p.Value.Equals("False")));
}

Expand Down
1 change: 0 additions & 1 deletion src/CallfireApiClient.Tests/CallfireApiClient.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
<Compile Include="Utilities\ZipTask.cs" />
<Compile Include="Utilities\XmlTask.cs" />
<Compile Include="Utilities\VersionTask.cs" />
<Compile Include="Api\Webhooks\SubscriptionsApiTest.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ namespace CallfireApiClient.Api.Common.Model.Request
/// </summary>
public class GetBroadcastCallsTextsRequest : GetByIdRequest
{
public long? batchId { get; set; }
public long? BatchId { get; set; }

public override string ToString()
{
return string.Format("{0} [GetBroadcastCallsTextsRequest: batchId={1}]", base.ToString(), batchId);
return string.Format("{0} [GetBroadcastCallsTextsRequest: batchId={1}]", base.ToString(), BatchId);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ public class AddContactListContactsRequest<T> : AddContactsRequest<T>
[JsonIgnore]
public long? ContactListId { get; set; }

public string ContactNumbersField { get; set; }

public override string ToString()
{
return string.Format("[AddContactListItemsRequest: {0}, ContactListId={1}, ContactNumbersField={2}]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class AddContactsRequest<T> : CallfireModel
[JsonIgnore]
public List<T> Contacts { get; set; }

public string ContactNumbersField { get; set; }

[OnSerializing]
private void OnSerializing(StreamingContext context)
{
Expand Down Expand Up @@ -46,7 +48,7 @@ private void OnSerializing(StreamingContext context)

public override string ToString()
{
return string.Format("[AddContactsRequest: Contacts={0}]", Contacts?.ToPrettyString());
return string.Format("[AddContactsRequest: Contacts={0}, ContactNumbersField={1}]", Contacts?.ToPrettyString(), ContactNumbersField);
}

}
Expand Down
14 changes: 0 additions & 14 deletions src/CallfireApiClient/Api/Webhooks/Model/NotificationFormat.cs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ public class FindWebhooksRequest : FindRequest
{
public string Name { get; set; }

public string Resource { get; set; }
public ResourceType? Resource { get; set; }

public string Event { get; set; }
public ResourceEvent? Event { get; set; }

public string Callback { get; set; }

Expand Down
Loading