-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#336 Implementation of core logic for placing an sms notification ord…
…er (#380) * SMS notification channel added in the ENUM * SMS template added in NotificationTemplate * SMS template added in NotificationTemplate 2 * Added JSON subtype for SMS in the notification interface * Renamed class and interface for OrderRequestService * Renamed RegisterNotificationorder method * Default email from address property name fixed * Added default sender number in the config * Extended method for setting default value when empty * Fixed the prop name for the default SMS sender * Shortened sender setting method name * Fixed the code documentation or comment * Fixed the code documentation or comment * Renamed property to make more generic * Tweaks needed for the property name change * SMS template post valid scope accepted test * Reverting last wrong commit * Added unit test default SMS sender * Renamed some tests to mark them specific for email * SMS test for expected register notificaiton order * SMS test for no sender handle and default inserted * Renamed SenderHandle to SenderNumber again as agreed * Renamed NotificationOrderConfig default proporty for SMS as agreed * Renamed _orderService to _orderRequestService
- Loading branch information
Showing
11 changed files
with
190 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/Altinn.Notifications.Core/Models/NotificationTemplate/SmsTemplate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Altinn.Notifications.Core.Enums; | ||
|
||
namespace Altinn.Notifications.Core.Models.NotificationTemplate; | ||
|
||
/// <summary> | ||
/// Template for an SMS notification | ||
/// </summary> | ||
public class SmsTemplate : INotificationTemplate | ||
{ | ||
/// <inheritdoc/> | ||
public NotificationTemplateType Type { get; internal set; } | ||
|
||
/// <summary> | ||
/// Gets the number from which the SMS is created by the template | ||
/// </summary> | ||
public string SenderNumber { get; internal set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Gets the body of SMSs created by the template | ||
/// </summary> | ||
public string Body { get; internal set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SmsTemplate"/> class. | ||
/// </summary> | ||
public SmsTemplate(string? senderNumber, string body) | ||
{ | ||
SenderNumber = senderNumber ?? string.Empty; | ||
Body = body; | ||
Type = NotificationTemplateType.Sms; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SmsTemplate"/> class. | ||
/// </summary> | ||
internal SmsTemplate() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.