Skip to content

Commit

Permalink
Merge pull request #248 from Vonage/feature/dlt
Browse files Browse the repository at this point in the history
adding entity-id and content-id to sms request body
  • Loading branch information
slorello89 authored Mar 9, 2021
2 parents 35ce2a8 + 8c3518d commit 71440cb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Vonage.Test.Unit/MessagingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void KitcenSinkSendSms(bool passCreds)
var expectedRequestContent = $"from=AcmeInc&to=447700900000&text={HttpUtility.UrlEncode("Hello World!")}" +
$"&ttl=900000&status-report-req=true&callback={HttpUtility.UrlEncode("https://example.com/sms-dlr")}&message-class=0" +
$"&type=text&vcard=none&vcal=none&body=638265253311&udh=06050415811581&protocol-id=127&title=welcome&url={HttpUtility.UrlEncode("https://example.com")}" +
$"&validity=300000&client-ref=my-personal-reference&account-ref=customer1234&api_key={ApiKey}&api_secret={ApiSecret}&";
$"&validity=300000&client-ref=my-personal-reference&account-ref=customer1234&entity-id=testEntity&content-id=testcontent&api_key={ApiKey}&api_secret={ApiSecret}&";
var request = new Messaging.SendSmsRequest
{
AccountRef = "customer1234",
Expand All @@ -56,7 +56,9 @@ public void KitcenSinkSendSms(bool passCreds)
Validity = "300000",
Vcal = "none",
Vcard = "none",
Url = "https://example.com"
Url = "https://example.com",
ContentId ="testcontent",
EntityId="testEntity"


};
Expand Down
16 changes: 15 additions & 1 deletion Vonage/Messaging/SendSmsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ public class SendSmsRequest
/// To use this feature, please email support@nexmo.com
/// </summary>
[JsonProperty("account-ref")]
public string AccountRef { get; set; }
public string AccountRef { get; set; }

/// <summary>
/// A string parameter that satisfies regulatory requirements when sending an SMS to specific countries.
/// For more information please refer to the <see href="https://help.nexmo.com/hc/en-us/articles/115011781468">Country-Specific Outbound SMS Features</see>
/// </summary>
[JsonProperty("entity-id")]
public string EntityId { get; set; }

/// <summary>
/// A string parameter that satisfies regulatory requirements when sending an SMS to specific countries.
/// For more information please refer to the <see href="https://help.nexmo.com/hc/en-us/articles/115011781468">Country-Specific Outbound SMS Features</see>
/// </summary>
[JsonProperty("content-id")]
public string ContentId { get; set; }
}
}

0 comments on commit 71440cb

Please sign in to comment.