SmsStatus

SmsStatus

new SmsStatus(id, culture, settingsopt)

Description:
  • Initializes a new SMS status watcher instance.
Source:
Example
// Initializes settings with default values.
 // Can be used as a template for custom settings object.

 var settings = {
     // Use default date and time format
     dtf: encodeURIComponent(''),

     // Polling configuration
     pollTimeout: 5000,
     pollUrlBase: 'https://sms.webmoney.ru/SmsStatus/Sms/',
     resendUrlBase: 'https://sms.webmoney.ru/SmsStatus/Resend/',
     timezone: 'MSK',

     setButtonHandlers: true,
     untilResendableCountdown: true,

     // Loading indicator configuration: show indicator immediately when message data loads for
     // the first time and when user clicks a button, show indicator for automatic polling only
     // if the server takes more than 1 second to respond.
     loadingIndicator: '#sms-loading-indicator',
     loadingEvents: {
         'poll': {
             showDelay: 1000
         }
     },

     // Error display elements selectors
     errorBlock: {
         root: '#sms-error',
         reportError: '#sms-error-report'
     },

     // Message status display elements selectors
     reportBlock: {
         root: '#sms-report',
         created: '#sms-report-created',
         updated: '#sms-report-updated',
         retries: '#sms-report-retries',
         validity: '#sms-report-validity',
         validUntil: '#sms-report-valid-until',
         lastTransportType: '#sms-report-last-transport-type',
         status: '#sms-report-status',
         refresh: '#sms-report-refresh',
         instruction: '#sms-report-instruction',
         instructionText: '#sms-report-instruction-text',
         supportLinks: '#sms-report-support-links',
         untilResendable: '#sms-report-until-resendable',
         untilResendableText: '#sms-report-until-resendable-text',
         untilResendableVersion: 2,

         sendingsList : {
             root: '#sms-report-attempts',
             itemTemplate: '#sms-report-attempt-template',
             attemptNumber: '#sms-report-attempt-number',
             created: '#sms-report-attempt-created',
             updated: '#sms-report-attempt-updated',
             status: '#sms-report-attempt-status',
                    transportType: '#sms-report-attempt-transport-type',
             update: undefined,
             addItem: undefined,
             clear: undefined,
             displayMinCount : 2
         }
     },
     // Resend controls block selectors
     resendBlock: {
         root: '#sms-resend',
         button: '#sms-resend-button',
         status: '#sms-resend-status'
     }
 };
 var id = 'SecurID_1_12345678901234567890123456';
 var culture = 'ru-RU';
 var smsStatus = new SmsStatus (id, culture, settings);
 smsStatus.startPolling();
Parameters:
Name Type Attributes Default Description
id String SMS secure identifier.
culture String The output culture (en, en-US, ru, ru-RU and so on).
settings SmsStatus~Settings <optional>
{} Optional SMS poller settings.

Members

instanceIndex

Description:
  • The index of this instance in the SmsStatus.instances array.
Source:
The index of this instance in the SmsStatus.instances array.

lastResendResponse

Description:
  • Contains the last received SMS resend response.
Source:
Contains the last received SMS resend response.

lastStatusResponse

Description:
  • Contains the last received SMS Status check response.
Source:
Contains the last received SMS Status check response.

settings

Description:
  • The instance settings.
Source:
See:
  • SmsStatus 'settings' parameter for description.
The instance settings.

Methods

defaultAddSending(sending) → {undefined}

Source:
Deprecated:
  • Deprecated since version 1.3.0. Use SmsStatus.prototype.sendingsAddItem. The default function adding a sending attempt report. Uses the template.
Parameters:
Name Type Description
sending SmsStatus~SmsSendingReport The sending attempt data to add.
Returns:
Type
undefined

defaultClearSendings()

Source:
Deprecated:
  • Deprecated since version 1.3.0. Use SmsStatus.prototype.sendingsClear. The default function clearing all elements displaying sending attempt reports. Clears all children of the element matching settings.reportBlock.sendingsList.root except any elements matching settings.reportBlock.sendingsList.itemTemplate and settings.reportBlock.sendingsList.doNotClear.

defaultUpdateSendings(e) → {undefined}

Source:
Deprecated:
  • Deprecated since version 1.3.0. Use SmsStatus.prototype.sendingsUpdate. The default function processing sending attempt reports.
Parameters:
Name Type Description
e Object The event arguments.
e.sender SmsStatus Current SMS status poller object.
e.response SmsStatus~SmsReportQueryResult The SMS status service response.
Returns:
Type
undefined