Beispiel #1
0
        /// <inheritdoc />
        public async Task <SubmitResponse> SubmitAsync(SmsMessage[] messages, CancellationToken cancellationToken = default)
        {
            SubmitServiceRequest request = new SubmitServiceRequest(
                this.Service,
                new SubmitRequest()
            {
                Messages = new List <SmsMessage>(messages)
            }
                );

            return(await request.ExecuteAsync(cancellationToken));
        }
Beispiel #2
0
        /// <summary>
        /// Sends multiple Sms messages.
        /// </summary>
        /// <param name="messages">Array of Sms message insatnces.</param>
        /// <returns></returns>
        public SubmitResponse Submit(params SmsMessage[] messages)
        {
            SubmitServiceRequest request = new SubmitServiceRequest(
                this.Service,
                new SubmitRequest()
            {
                Messages = new List <SmsMessage>(messages)
            }
                );

            SubmitResponse response = request.Execute();

            return(response);
        }