56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
using DigitalData.Core.Abstractions.Client;
|
|
|
|
namespace EnvelopeGenerator.Application.Configurations.GtxMessaging
|
|
{
|
|
/// <summary>
|
|
/// https://www.gtx-messaging.com/en/api-docs/sms-rest-api/
|
|
/// </summary>
|
|
public class SmsParams : IHttpClientOptions
|
|
{
|
|
//TODO: Add a regex check to init methods to reduce the chance of errors.
|
|
public string Uri { get; set; } = "https://rest.gtx-messaging.net";
|
|
|
|
public string Path { get; set; } = "smsc/sendsms";
|
|
|
|
// path params
|
|
public required string AuthKey { get; init; }
|
|
|
|
public string? Format { get; init; }
|
|
|
|
// header params
|
|
public string? Accept { get; init; }
|
|
|
|
public string? ContentType { get; init; }
|
|
|
|
// query params
|
|
public required string From { get; init; }
|
|
|
|
public required Dictionary<string, string> Texts { get; init; }
|
|
|
|
public int? DlrMask { get; init; }
|
|
|
|
public string? DlrUrl { get; init; }
|
|
|
|
public string? Udh { get; init; }
|
|
|
|
public int? Dcs { get; init; }
|
|
|
|
public int? MClass { get; init; }
|
|
|
|
public int? MWI { get; init; }
|
|
|
|
public int? Coding { get; init; }
|
|
|
|
public string? Charset { get; init; }
|
|
|
|
public int? Validity { get; init; }
|
|
|
|
public DateTime? ValidityTime { get; init; }
|
|
|
|
public int? Deferred { get; init; }
|
|
|
|
public DateTime? DeferredTime { get; init; }
|
|
|
|
internal string AuthPath => Format is null ? AuthKey : string.Join('/', AuthKey, Format);
|
|
}
|
|
} |