Difference between revisions of "BulkSMS class"

From Catglobe Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 44: Line 44:
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ParentId</nowiki>|HasGetter=1|Description=<nowiki>Parent Id of the bulkSMS</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ParentId</nowiki>|HasGetter=1|Description=<nowiki>Parent Id of the bulkSMS</nowiki>}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceTemplateId</nowiki>|HasGetter=1|Description=<nowiki>Resource templateId Id of the bulkSMS</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>SmsOutProviderName</nowiki>|HasGetter=1|Description=<nowiki>SmsOutProviderName used to send</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>SmsOutProviderName</nowiki>|HasGetter=1|Description=<nowiki>SmsOutProviderName used to send</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>TemplateId</nowiki>|HasGetter=1|Description=<nowiki>TemplateId Id of the bulkSMS</nowiki>}}
 
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=Array of ints|Name=<nowiki>UserIds</nowiki>|HasGetter=1|Description=<nowiki>UserIds of the bulkMail</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=Array of ints|Name=<nowiki>UserIds</nowiki>|HasGetter=1|Description=<nowiki>UserIds of the bulkMail</nowiki>}}
 
}}
 
}}
 +
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
<source lang="javascript">
 +
//*** create BulkSMS***//
 +
string bulkSmsName = "Test";
 +
number parentId = 17145420;
 +
number mailTemplateId = 17146929;
 +
string smsOutProviderName = "cSMS Provider";
 +
number resourceTemplateId = 17146928;
 +
BulkSMS a = new BulkSMS (bulkSmsName, parentId, mailTemplateId, smsOutProviderName, resourceTemplateId);
 +
//a.SetUsers ({...});
 +
//a.SetGroups({...});
 +
//a.SetGroupsToBeRebuilt({..});
 +
a.Save();
 +
</source>
 +
<source lang="javascript">
 +
//*** create BulkSMS***//
 +
string bulkSmsName = "Test";
 +
number parentId = 17145420;
 +
number mailTemplateId = 17146929;
 +
string smsOutProviderName = "cSMS Provider";
 +
number resourceTemplateId = 17146940;//Has dependant bulksms
 +
BulkSMS a = new BulkSMS (bulkSmsName, parentId, mailTemplateId, smsOutProviderName, resourceTemplateId);
 +
number dependentBulkSms = 17117281;
 +
a.DependantBulkSMS = dependentBulkSms;
 +
a.DependantSelectedHistories = new BulkSMS(dependentBulkSms).History; 
 +
a.DependantSendToNotStarted = true;
 +
a.DependantSendToPartly = true;
 +
a.DependantSendToCompleted = false;
 +
a.Save();
 +
</source>

Latest revision as of 09:30, 12 May 2022

BulkSMS



Represents a bulkSMS.

Parent class

Inherits from object

Constructors

  • (int bulkSMSId "Id of bulkSMS") - Load existing bulkSMS
  • (string name "Name of bulkSMS", int parentId "Parent of bulkSMS", int mailTemplateId "Id of mail template", string smsOutProviderName "Case sensitive name of the outgoing SMS provider that should be used to send the SMS") - Create bulkSMS
  • (string name "Name of bulkSMS", int parentId "Parent of bulkSMS", int mailTemplateId "Id of mail template", string smsOutProviderName "Case sensitive name of the outgoing SMS provider that should be used to send the SMS", int bulkSMSResourceTemplateId "bulkSMS resource template") - Create bulkSMS

Methods

  • Empty Save() - Save bulkSMS
  • int Send() - Send bulkSMS. It send maximum quantity in bulkSMS.
  • int Send(int maxToSend "It is the max sms which send") - Send bulkSMS
  • Empty SetGroups(Array of int groupIds "Array of group id") - Set groups to bulkSMS
  • Empty SetGroupsToBeRebuilt(Array of int groupIds "Array of group id") - Set groups to be rebuilt to bulkSMS
  • Empty SetUsers(Array of int userIds "Array of user id") - Set users to bulkSMS
  • (From object) string ToString() - The string representation of the object.

Properties

  • int DependantBulkSMS { get; set; } - Dependant of the bulkSMS
  • array DependantSelectedHistories { get; set; } - selected history of the dependant bulkMail, return array of BulkMailHistory object
  • bool DependantSendToCompleted { get; set; } - Dependant bulkSMS completed status
  • bool DependantSendToNotStarted { get; set; } - Dependant bulkSMS not start status
  • bool DependantSendToPartly { get; set; } - Dependant bulkSMS partly status
  • Array of int GroupIds { get; } - GroupIds of the bulkMail
  • Array of int GroupRebuildIds { get; } - GroupIds to be rebuild before sent bulkMail
  • array History { get; } - History of the bulkMail, return array of BulkMailHistory object
  • int Id { get; } - Id of the bulkSMS
  • int MailTemplateId { get; } - MailTemplateId Id of the bulkSMS
  • string Name { get; set; } - Name of the bulkSMS
  • int NoInOutQueue { get; } - Number of mail in queue
  • int NoOfSent { get; } - Number of mail sent
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ParentId { get; } - Parent Id of the bulkSMS
  • int ResourceTemplateId { get; } - Resource templateId Id of the bulkSMS
  • string SmsOutProviderName { get; } - SmsOutProviderName used to send
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • Array of int UserIds { get; } - UserIds of the bulkMail


Examples

//*** create BulkSMS***//
string bulkSmsName = "Test";
number	parentId = 17145420; 
number	mailTemplateId = 17146929;
string	smsOutProviderName = "cSMS Provider";
number resourceTemplateId = 17146928;
BulkSMS a = new BulkSMS (bulkSmsName, parentId, mailTemplateId, smsOutProviderName, resourceTemplateId);
//a.SetUsers ({...});
//a.SetGroups({...});
//a.SetGroupsToBeRebuilt({..});
a.Save();
//*** create BulkSMS***//
string bulkSmsName = "Test";
number	parentId = 17145420; 
number	mailTemplateId = 17146929;
string	smsOutProviderName = "cSMS Provider";
number resourceTemplateId = 17146940;//Has dependant bulksms
BulkSMS a = new BulkSMS (bulkSmsName, parentId, mailTemplateId, smsOutProviderName, resourceTemplateId);
number dependentBulkSms = 17117281;
a.DependantBulkSMS = dependentBulkSms;
a.DependantSelectedHistories = new BulkSMS(dependentBulkSms).History;  
a.DependantSendToNotStarted = true;
a.DependantSendToPartly = true;
a.DependantSendToCompleted = false;
a.Save();