-
Notifications
You must be signed in to change notification settings - Fork 178
/
Copy pathInfobipSmsAdapterOptions.cs
54 lines (50 loc) · 2.54 KB
/
InfobipSmsAdapterOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using Bot.Builder.Community.Adapters.Infobip.Core;
using Microsoft.Extensions.Configuration;
namespace Bot.Builder.Community.Adapters.Infobip.Sms
{
public class InfobipSmsAdapterOptions: InfobipAdapterOptionsBase
{
/// <summary>
/// Initializes a new instance of the <see cref="InfobipSmsAdapterOptions"/> class using appsettings.
/// </summary>
/// <param name="configuration">Configuration</param>
/// <remarks>
/// The configuration keys are:
/// InfobipApiKey: An Infobip API key.
/// InfobipApiBaseUrl: The Infobip base url.
/// InfobipAppSecret: A secret used to validate that incoming webhooks are originated from Infobip.
/// InfobipSmsNumber: A Sms assigned number.
/// InfobipSmsScenarioKey: A scenario key used to send SMS messages through OMNI failover API.
/// </remarks>
public InfobipSmsAdapterOptions(IConfiguration configuration)
: this(configuration["InfobipApiKey"],
configuration["InfobipApiBaseUrl"],
configuration["InfobipAppSecret"],
configuration["InfobipSmsNumber"],
configuration["InfobipSmsScenarioKey"])
{ }
/// <summary>
/// Initializes a new instance of the <see cref="InfobipSmsAdapterOptions"/> class.
/// </summary>
/// <param name="apiKey">An Infobip API key.</param>
/// <param name="apiBaseUrl">The Infobip base url.</param>
/// <param name="appSecret">A secret used to validate that incoming webhooks are originated from Infobip.</param>
/// <param name="smsNumber">A SMS assigned number.</param>
/// <param name="smsScenarioKey">A scenario key used to send SMS messages through OMNI failover API.</param>
public InfobipSmsAdapterOptions(string apiKey, string apiBaseUrl, string appSecret, string smsNumber, string smsScenarioKey): base(apiKey, apiBaseUrl, appSecret)
{
InfobipSmsNumber = smsNumber;
InfobipSmsScenarioKey = smsScenarioKey;
}
/// <summary>
/// Gets or Sets the SMS assigned number.
/// </summary>
/// <value>The SMS number.</value>
public string InfobipSmsNumber { get; private set; }
/// <summary>
/// Gets or Sets the scenario key of scenario which will be used for sending through OMNI failover SMS messages.
/// </summary>
/// <value>The scenario key.</value>
public string InfobipSmsScenarioKey { get; private set; }
}
}