You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By making XmlTransport public, one can now use the second GatewayClient constructor to specify a custom endpoint or transport.
Also improved documentation, removed an unused constant, and added some unit tests.
Copy file name to clipboardExpand all lines: PSWin.Client/Interfaces/ITransport.cs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,20 @@
4
4
5
5
namespaceLinkMobility.PSWin.Client.Interfaces
6
6
{
7
+
/// <summary>
8
+
/// The interface for an implementation of a PSWin gateway API.
9
+
/// </summary>
7
10
publicinterfaceITransport
8
11
{
12
+
/// <summary>
13
+
/// Send text messages to the API that this transport implements.
14
+
/// </summary>
15
+
/// <param name="messageBatch">The messages to send.</param>
16
+
/// <param name="sessionData">
17
+
/// A free text field that can be used to tag the session/messages with customer specific data such as the application name, username, reference-id etc.
18
+
/// The maximum length is 200 characters.
19
+
/// </param>
20
+
/// <returns>A <see cref="MessageResult"/> for each message in <paramref name="messageBatch"/>, in the same order.</returns>
/// Thus, the maximum length is 16*134=2144 characters. This is done automatically by the SMS Gateway.
44
53
/// Text messages of more than 2144 characters will be truncated.
45
54
/// Please note that only characters defined in the GSM-7 basic character set is allowed for messages of <see cref="Type"/> Text.
55
+
/// May not be null.
46
56
/// </summary>
47
57
publicstringText{get;set;}
48
58
49
59
/// <summary>
50
60
/// Send a message as a Flash (a.k.a. Class 0) message.
61
+
/// Default is false.
51
62
/// </summary>
52
63
publicboolIsFlashMessage{get;set;}
53
64
54
65
/// <summary>
55
66
/// Indicates a set of messages that can replace each other.
56
67
/// This parameter can be used to specify that the message should replace a previous message with the same set-number in the Inbox of the handset.
68
+
/// Default is null.
57
69
/// </summary>
58
70
publicReplace?Replace{get;set;}
59
71
60
72
/// <summary>
61
-
/// The PSWinCom Gateway supports billing using mobile phones in Norway.
62
-
/// As opposed to traditional CPA/Premium SMS which can only be used to bill mobile content, CPA GAS can only be used to bill goods and services.
73
+
/// The PSWin gateway supports billing using mobile phones in Norway.
74
+
/// As opposed to traditional CPA/Premium SMS which can only be used to bill mobile content, this can only be used to bill goods and services (CPA GAS).
75
+
/// Default is null.
63
76
/// </summary>
64
77
publicPaymentPayment{get;set;}
65
78
66
79
/// <summary>
67
80
/// Specifies the number of minutes this message will be valid.
68
81
/// The time is counted from the moment the message has been received and stored on PSWinCom Gateway.
69
82
/// After the time has elapsed, the message will not be sent to the operator.
83
+
/// Default is null, which means the message is valid indefinitely.
/// If this parameter is present the message will be considered to be a deferred message that will be queued for future delivery instead of immediately being forwarded to operator.
76
90
/// Maximum delay of message is currently one week (7 days).
77
91
/// The Gateway account must be provisioned to use this feature.
92
+
/// Default is null, which means the message is delivered as soon as possible.
78
93
/// </summary>
79
94
publicDateTime?DeliveryTime{get;set;}
80
95
81
96
/// <summary>
82
97
/// The type of message content.
98
+
/// Default is null, which means the same as <see cref="MessageType.Text"/>.
83
99
/// </summary>
84
100
publicMessageType?Type{get;set;}
85
101
}
86
102
103
+
/// <summary>
104
+
/// The type of message.
105
+
/// </summary>
87
106
publicenumMessageType
88
107
{
89
108
/// <summary>
@@ -98,15 +117,20 @@ public enum MessageType
98
117
Unicode=9,
99
118
}
100
119
120
+
/// <summary>
121
+
/// The available replacement groups.
122
+
/// </summary>
101
123
publicenumReplace
102
124
{
125
+
#pragma warning disable CS1591// Missing XML comment for publicly visible type or member
103
126
Set1=1,
104
127
Set2=2,
105
128
Set3=3,
106
129
Set4=4,
107
130
Set5=5,
108
131
Set6=6,
109
132
Set7=7
133
+
#pragma warning restore CS1591// Missing XML comment for publicly visible type or member
0 commit comments