Skip to content

Commit

Permalink
Merge pull request #735 from sendgrid/fix-418
Browse files Browse the repository at this point in the history
Fix #418 groupsToDisplay shold be optional
  • Loading branch information
thinkingserious authored Sep 5, 2018
2 parents 00e543d + bea6a76 commit 50da6a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/SendGrid/Helpers/Mail/SendGridMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,11 +1277,13 @@ public void SetBatchId(string batchId)
/// An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.
/// https://sendgrid.com/docs/User_Guide/Suppressions/recipient_subscription_preferences.html
/// </param>
public void SetAsm(int groupID, List<int> groupsToDisplay)
public void SetAsm(int groupID, List<int> groupsToDisplay = null)
{
this.Asm = new ASM();
this.Asm.GroupId = groupID;
this.Asm.GroupsToDisplay = groupsToDisplay;
if (groupsToDisplay != null) {
this.Asm.GroupsToDisplay = groupsToDisplay;
}
return;
}

Expand Down

0 comments on commit 50da6a0

Please sign in to comment.