Skip to content

Commit

Permalink
Merge pull request #151 from CKCobra/120
Browse files Browse the repository at this point in the history
Issue #120 - Fixed Spelling - GetInrementalTicketExport to GetIncrementalTicketExport
  • Loading branch information
mozts2005 committed Sep 3, 2015
2 parents d1d8d0c + c61c06c commit 5cee34f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/TicketTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ public void CanGetAuditsAndMarkAsTrusted()
[Test]
public void CanGetInrementalTicketExport()
{
var res = api.Tickets.__TestOnly__GetInrementalTicketExport(DateTime.Now.AddDays(-1));
var res = api.Tickets.__TestOnly__GetIncrementalTicketExport(DateTime.Now.AddDays(-1));
Assert.True(res.Results.Count > 0);
}

Expand Down
16 changes: 16 additions & 0 deletions ZendeskApi_v2/Requests/Tickets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,18 @@ public interface ITickets : ICore
GroupAuditResponse GetAudits(long ticketId);
IndividualAuditResponse GetAuditById(long ticketId, long auditId);
bool MarkAuditAsTrusted(long ticketId, long auditId);
[Obsolete("This has been deprecated. Please use GetIncrementalTicketExport", true)]
TicketExportResponse GetInrementalTicketExport(DateTime startTime);
TicketExportResponse GetIncrementalTicketExport(DateTime startTime);

/// <summary>
/// Since the other method can only be called once every 5 minutes it is not sutable for Automated tests.
/// </summary>
/// <param name="startTime"></param>
/// <returns></returns>
[Obsolete("This has been deprecated. Please use __TestOnly__GetIncrementalTicketExport", true)]
TicketExportResponse __TestOnly__GetInrementalTicketExport(DateTime startTime);
TicketExportResponse __TestOnly__GetIncrementalTicketExport(DateTime startTime);

GroupTicketFieldResponse GetTicketFields();
IndividualTicketFieldResponse GetTicketFieldById(long id);
Expand Down Expand Up @@ -344,21 +348,33 @@ public bool MarkAuditAsTrusted(long ticketId, long auditId)
return res.HttpStatusCode == HttpStatusCode.OK;
}

[Obsolete("This has been deprecated. Please use GetIncrementalTicketExport", true)]
public TicketExportResponse GetInrementalTicketExport(DateTime startTime)
{
return GenericGet<TicketExportResponse>("exports/tickets.json?start_time=" + startTime.GetEpoch());
}

public TicketExportResponse GetIncrementalTicketExport(DateTime startTime)
{
return GenericGet<TicketExportResponse>("exports/tickets.json?start_time=" + startTime.GetEpoch());
}

/// <summary>
/// Since the other method can only be called once every 5 minutes it is not sutable for Automated tests.
/// </summary>
/// <param name="startTime"></param>
/// <returns></returns>
[Obsolete("This has been deprecated. Please use __TestOnly__GetIncrementalTicketExport", true)]
public TicketExportResponse __TestOnly__GetInrementalTicketExport(DateTime startTime)
{
return GenericGet<TicketExportResponse>("exports/tickets/sample.json?start_time=" + startTime.GetEpoch());
}

public TicketExportResponse __TestOnly__GetIncrementalTicketExport(DateTime startTime)
{
return GenericGet<TicketExportResponse>("exports/tickets/sample.json?start_time=" + startTime.GetEpoch());
}

public GroupTicketFieldResponse GetTicketFields()
{
return GenericGet<GroupTicketFieldResponse>("ticket_fields.json");
Expand Down

0 comments on commit 5cee34f

Please sign in to comment.