Skip to content

Commit

Permalink
Merge branch 'feature/standardize_identifier_data_type' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Jan 17, 2018
2 parents c10af36 + 28f874f commit 1a8fdf3
Show file tree
Hide file tree
Showing 24 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/CustomFieldMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class CustomFieldMetadata : FieldMetadata
/// The identifier.
/// </value>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public int Id { get; set; }
public long Id { get; set; }
}
}
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Field.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Field
/// The identifier.
/// </value>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public int Id { get; set; }
public long Id { get; set; }

/// <summary>
/// Gets or sets the name.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Subuser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Subuser
/// The id.
/// </value>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public int Id { get; set; }
public long Id { get; set; }

/// <summary>
/// Gets or sets the username.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Suppression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Suppression
/// The group id.
/// </value>
[JsonProperty("group_id", NullValueHandling = NullValueHandling.Ignore)]
public int GroupId { get; set; }
public long GroupId { get; set; }

/// <summary>
/// Gets or sets the name of the suppression group.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/SuppressionGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class SuppressionGroup
/// The identifier.
/// </value>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public int Id { get; set; }
public long Id { get; set; }

/// <summary>
/// Gets or sets the name.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/UnsubscribeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class UnsubscribeOptions
/// The group identifier.
/// </value>
[JsonProperty("group_id", NullValueHandling = NullValueHandling.Ignore)]
public int GroupId { get; set; }
public long GroupId { get; set; }

/// <summary>
/// Gets or sets the groups to display.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/ClickEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ClickEvent : EngagementEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }

/// <summary>
/// Gets or sets the newsletter.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/DeferredEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class DeferredEvent : DeliveryEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }

/// <summary>
/// Gets or sets the newsletter.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/DeliveredEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class DeliveredEvent : DeliveryEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }

/// <summary>
/// Gets or sets the newsletter.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class Event
/// Gets or sets the user identifier.
/// </summary>
/// <value>
/// Theuser identifier.
/// The user identifier.
/// </value>
[JsonProperty("sg_user_id", NullValueHandling = NullValueHandling.Ignore)]
public long? UserId { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/GroupResubscribeEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public class GroupResubscribeEvent : EngagementEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }
}
}
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/GroupUnsubscribeEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public class GroupUnsubscribeEvent : EngagementEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }
}
}
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/OpenEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class OpenEvent : EngagementEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }

/// <summary>
/// Gets or sets the newsletter.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/ProcessedEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProcessedEvent : DeliveryEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }

/// <summary>
/// Gets or sets the newsletter.
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/SpamReportEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class SpamReportEvent : EngagementEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }
}
}
2 changes: 1 addition & 1 deletion Source/StrongGrid/Models/Webhooks/UnsubscribeEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public class UnsubscribeEvent : EngagementEvent
/// The asm group identifier.
/// </value>
[JsonProperty("asm_group_id", NullValueHandling = NullValueHandling.Ignore)]
public int AsmGroupId { get; set; }
public long AsmGroupId { get; set; }
}
}
2 changes: 1 addition & 1 deletion Source/StrongGrid/Resources/Contacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public Task<long> GetTotalCountAsync(string onBehalfOf = null, CancellationToken
/// <returns>
/// An array of <see cref="Contact" />.
/// </returns>
public Task<Contact[]> SearchAsync(IEnumerable<SearchCondition> conditions, int? listId = null, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task<Contact[]> SearchAsync(IEnumerable<SearchCondition> conditions, long? listId = null, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
var data = new JObject();
if (listId.HasValue) data.Add("list_id", listId.Value);
Expand Down
4 changes: 2 additions & 2 deletions Source/StrongGrid/Resources/CustomFields.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Task<CustomFieldMetadata[]> GetAllAsync(string onBehalfOf = null, Cancell
/// <returns>
/// The <see cref="CustomFieldMetadata">metadata</see> about the field.
/// </returns>
public Task<CustomFieldMetadata> GetAsync(int fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task<CustomFieldMetadata> GetAsync(long fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
return _client
.GetAsync($"{_endpoint}/{fieldId}")
Expand All @@ -96,7 +96,7 @@ public Task<CustomFieldMetadata> GetAsync(int fieldId, string onBehalfOf = null,
/// <returns>
/// The async task.
/// </returns>
public Task DeleteAsync(int fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task DeleteAsync(long fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
return _client
.DeleteAsync($"{_endpoint}/{fieldId}")
Expand Down
2 changes: 1 addition & 1 deletion Source/StrongGrid/Resources/IContacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public interface IContacts
/// <returns>
/// An array of <see cref="Contact" />.
/// </returns>
Task<Contact[]> SearchAsync(IEnumerable<SearchCondition> conditions, int? listId = null, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task<Contact[]> SearchAsync(IEnumerable<SearchCondition> conditions, long? listId = null, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Retrieve the lists that a recipient is on.
Expand Down
4 changes: 2 additions & 2 deletions Source/StrongGrid/Resources/ICustomFields.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface ICustomFields
/// <returns>
/// The <see cref="CustomFieldMetadata">metadata</see> about the field.
/// </returns>
Task<CustomFieldMetadata> GetAsync(int fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task<CustomFieldMetadata> GetAsync(long fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Delete a custom field.
Expand All @@ -52,7 +52,7 @@ public interface ICustomFields
/// <returns>
/// The async task.
/// </returns>
Task DeleteAsync(int fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task DeleteAsync(long fieldId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Retrieve the reserved fields.
Expand Down
10 changes: 5 additions & 5 deletions Source/StrongGrid/Resources/ISuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface ISuppressions
/// <returns>
/// An array of string representing the email addresses
/// </returns>
Task<string[]> GetUnsubscribedAddressesAsync(int groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task<string[]> GetUnsubscribedAddressesAsync(long groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Add recipient address to the suppressions list for a given group.
Expand All @@ -57,7 +57,7 @@ public interface ISuppressions
/// <returns>
/// The async task.
/// </returns>
Task AddAddressToUnsubscribeGroupAsync(int groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task AddAddressToUnsubscribeGroupAsync(long groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Add recipient addresses to the suppressions list for a given group.
Expand All @@ -70,7 +70,7 @@ public interface ISuppressions
/// <returns>
/// The async task.
/// </returns>
Task AddAddressToUnsubscribeGroupAsync(int groupId, IEnumerable<string> emails, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task AddAddressToUnsubscribeGroupAsync(long groupId, IEnumerable<string> emails, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Delete a recipient email from the suppressions list for a group.
Expand All @@ -82,7 +82,7 @@ public interface ISuppressions
/// <returns>
/// The async task.
/// </returns>
Task RemoveAddressFromSuppressionGroupAsync(int groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task RemoveAddressFromSuppressionGroupAsync(long groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Check if a recipient address is in the given suppression group.
Expand All @@ -94,6 +94,6 @@ public interface ISuppressions
/// <returns>
/// <c>true</c> if the email address is in the global suppression group; otherwise, <c>false</c>.
/// </returns>
Task<bool> IsSuppressedAsync(int groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task<bool> IsSuppressedAsync(long groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
6 changes: 3 additions & 3 deletions Source/StrongGrid/Resources/IUnsubscribeGroups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface IUnsubscribeGroups
/// <returns>
/// The <see cref="SuppressionGroup" />.
/// </returns>
Task<SuppressionGroup> GetAsync(int groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task<SuppressionGroup> GetAsync(long groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Create a new suppression group.
Expand All @@ -70,7 +70,7 @@ public interface IUnsubscribeGroups
/// <returns>
/// The <see cref="SuppressionGroup" />.
/// </returns>
Task<SuppressionGroup> UpdateAsync(int groupId, Parameter<string> name = default(Parameter<string>), Parameter<string> description = default(Parameter<string>), string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task<SuppressionGroup> UpdateAsync(long groupId, Parameter<string> name = default(Parameter<string>), Parameter<string> description = default(Parameter<string>), string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Delete a suppression group.
Expand All @@ -81,6 +81,6 @@ public interface IUnsubscribeGroups
/// <returns>
/// The async task.
/// </returns>
Task DeleteAsync(int groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
Task DeleteAsync(long groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
10 changes: 5 additions & 5 deletions Source/StrongGrid/Resources/Suppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public async Task<SuppressionGroup[]> GetUnsubscribedGroupsAsync(string email, s
/// <returns>
/// An array of string representing the email addresses
/// </returns>
public Task<string[]> GetUnsubscribedAddressesAsync(int groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task<string[]> GetUnsubscribedAddressesAsync(long groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
return _client
.GetAsync($"{_endpoint}/groups/{groupId}/suppressions")
Expand All @@ -106,7 +106,7 @@ public Task<string[]> GetUnsubscribedAddressesAsync(int groupId, string onBehalf
/// <returns>
/// The async task.
/// </returns>
public Task AddAddressToUnsubscribeGroupAsync(int groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task AddAddressToUnsubscribeGroupAsync(long groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
return AddAddressToUnsubscribeGroupAsync(groupId, new[] { email }, onBehalfOf, cancellationToken);
}
Expand All @@ -122,7 +122,7 @@ public Task AddAddressToUnsubscribeGroupAsync(int groupId, string email, string
/// <returns>
/// The async task.
/// </returns>
public Task AddAddressToUnsubscribeGroupAsync(int groupId, IEnumerable<string> emails, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task AddAddressToUnsubscribeGroupAsync(long groupId, IEnumerable<string> emails, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
var data = new JObject(new JProperty("recipient_emails", JArray.FromObject(emails.ToArray())));
return _client
Expand All @@ -143,7 +143,7 @@ public Task AddAddressToUnsubscribeGroupAsync(int groupId, IEnumerable<string> e
/// <returns>
/// The async task.
/// </returns>
public Task RemoveAddressFromSuppressionGroupAsync(int groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task RemoveAddressFromSuppressionGroupAsync(long groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
return _client
.DeleteAsync($"{_endpoint}/groups/{groupId}/suppressions/{email}")
Expand All @@ -162,7 +162,7 @@ public Task RemoveAddressFromSuppressionGroupAsync(int groupId, string email, st
/// <returns>
/// <c>true</c> if the email address is in the global suppression group; otherwise, <c>false</c>.
/// </returns>
public async Task<bool> IsSuppressedAsync(int groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<bool> IsSuppressedAsync(long groupId, string email, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
var data = new JObject
{
Expand Down
6 changes: 3 additions & 3 deletions Source/StrongGrid/Resources/UnsubscribeGroups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Task<SuppressionGroup[]> GetMultipleAsync(IEnumerable<int> groupIds, stri
/// <returns>
/// The <see cref="SuppressionGroup" />.
/// </returns>
public Task<SuppressionGroup> GetAsync(int groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task<SuppressionGroup> GetAsync(long groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
return _client
.GetAsync($"{_endpoint}/{groupId}")
Expand Down Expand Up @@ -131,7 +131,7 @@ public Task<SuppressionGroup> CreateAsync(string name, string description, bool
/// <returns>
/// The <see cref="SuppressionGroup" />.
/// </returns>
public Task<SuppressionGroup> UpdateAsync(int groupId, Parameter<string> name = default(Parameter<string>), Parameter<string> description = default(Parameter<string>), string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task<SuppressionGroup> UpdateAsync(long groupId, Parameter<string> name = default(Parameter<string>), Parameter<string> description = default(Parameter<string>), string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
var data = new JObject();
if (name.HasValue) data.Add("name", name.Value);
Expand All @@ -154,7 +154,7 @@ public Task<SuppressionGroup> UpdateAsync(int groupId, Parameter<string> name =
/// <returns>
/// The async task.
/// </returns>
public Task DeleteAsync(int groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
public Task DeleteAsync(long groupId, string onBehalfOf = null, CancellationToken cancellationToken = default(CancellationToken))
{
return _client
.DeleteAsync($"{_endpoint}/{groupId}")
Expand Down

0 comments on commit 1a8fdf3

Please sign in to comment.