پیامک های دریافتی که قبلا دریافت کرده اید را با ریست کردن از طریق این متد می توانید مجددا دریافت نمایید.

{{:: '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<bool> ResetReceive(DateTime? startDate = null, DateTime? endDate = null) { var result = await service.ResetReceive(startDate, endDate); 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 ResetReceive(ByVal Optional startDate As DateTime? = Nothing, ByVal Optional endDate As DateTime? = Nothing) As Task(Of Boolean) Dim result = Await service.ResetReceive(startDate, endDate) Select Case 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!") Case Else Throw New Exception("You sould not be here... :D") End Select End Function End Class End Namespace
npm install --save niksms.library.javascript
import { ServiceV1, GetSmsDeliveryWithClientIdModel, LibOperationResultStatus } from 'niksms'; export default class NikSmsWebServiceClient{ private service: ServiceV1 constructor(username: string, password: string){ this.service = new ServiceV1(username, password); } public async ResetReceive(startDate?: Date|null, endDate?: Date|null): Promise<boolean> { const result = await this.service.ResetReceive(startDate, endDate); switch (result.Status) { case LibOperationResultStatus.Success: return result.Data; case LibOperationResultStatus.InvalidModel: throw new Error("Some required inputs are misssing..."); case LibOperationResultStatus.UnAuthorized: throw new Error("Some thing is wrong with your account (call support!)"); case LibOperationResultStatus.Failed: throw new Error("Ooops its our fault!"); default: throw new Error("You sould not be here... :D"); } } }
{{:: 'controllers.documentation.titleTable' | translate }} {{:: 'controllers.documentation.mustDo' | translate }} {{:: 'controllers.documentation.typeTable' | translate }} {{:: 'controllers.documentation.defualtValue' | translate }} {{:: 'controllers.documentation.description' | translate }}
1 startDate خیر تاریخ
2 endDate خیر تاریخ
{{:: 'controllers.documentation.titleTable' | translate }} {{:: 'controllers.documentation.typeTable' | translate }} {{:: 'controllers.documentation.description' | translate }}
1
LibOperationResult<bool>
بلی / خیر