این متد همراه هر پیامک ارسالی، کد خاصی که اصولا برابر با کد همان پیامک در دیتابیس است، ارسال می نماید تا اگر در حین ارتباط به هر علتی مانند قطع اینترنت نتوانستید نتیجه درخواست را دریافت کنید، از طریق این کد و فراخوانی این متد از وضعیت آن مطلع شوید.

{{:: 'controllers.documentation.chooseFramework' | translate }}
PM > Install-Package NikSms.Library.Net
PM > Install-Package NikSms.Library.NetCore
using NikSms.Library.Net.WebService; using NikSms.Library.Net.ViewModels; using NikSms.Library.Net.WebServiceV1; using System.Threading.Tasks; using System.Collections.Generic; using System; namespace AwesomeApplication { public class NikSmsWebServiceClient { private readonly PublicServiceV1 service; public NikSmsWebServiceClient(string username, string password) { service = new PublicServiceV1(username, password); } public async Task<GetSmsDeliveryWithClientIdModel> DeliveryCheckForClientId() { var result = await service.DeliveryCheckForClientId(1122233); switch (result.Status) { case LibOperationResultStatus.Success: return result.Data; case LibOperationResultStatus.InvalidModel: throw new Exception("Some required inputs are misssing..."); case LibOperationResultStatus.UnAuthorized: throw new Exception("Some thing is wrong with your account (call support!)"); case LibOperationResultStatus.Failed: throw new Exception("Ooops its our fault!"); default: throw new Exception("You sould not be here... :D"); } } } }
PM > Install-Package NikSms.Library.Net
PM > Install-Package NikSms.Library.NetCore
Imports NikSms.Library.Net.WebService Imports NikSms.Library.Net.ViewModels Imports NikSms.Library.Net.WebServiceV1 Imports System.Threading.Tasks Imports System.Collections.Generic Imports System Namespace AwesomeApplication Public Class NikSmsWebServiceClient Private ReadOnly service As PublicServiceV1 Public Sub New(ByVal username As String, ByVal password As String) service = New PublicServiceV1(username, password) End Sub Public async Function DeliveryCheckForClientId() As Task<GetSmsDeliveryWithClientIdModel> Dim result As var = await service.DeliveryCheckForClientId(1122233) Select Case result.Status Case LibOperationResultStatus.Success Return result.Data Case LibOperationResultStatus.UnAuthorized Throw New Exception("Some thing is wrong with your account (call supportNot )") Case LibOperationResultStatus.Failed Throw New Exception("Ooops its our faultNot ") Case Else Throw New Exception("You sould not be here... :D") End Select End Function End Class End Namespace
{{:: 'controllers.documentation.titleTable' | translate }} {{:: 'controllers.documentation.mustDo' | translate }} {{:: 'controllers.documentation.typeTable' | translate }} ِ{{:: 'controllers.documentation.defualtValue' | translate }} ِ{{:: 'controllers.documentation.description' | translate }}
1 clientId بله عددی
{{:: 'controllers.documentation.titleTable' | translate }} {{:: 'controllers.documentation.typeTable' | translate }} {{:: 'controllers.documentation.description' | translate }}
1
LibOperationResult<GetSmsDeliveryWithClientIdModel>
Object public class GetSmsDeliveryWithClientIdModel { public SmsStatus SmsStatus { get; set; } public long NiksmsId { get; set; } }