Class SpmStaticList
With this class you can create and edit static lists in the eMarketeer. A static list consist of one or more email addresses (and possible a matching name) which will be used when creating a shipment.
Syntax
Constructors
SpmStaticList()
Initializes a new instance of the SpmStaticList class.
Declaration
SpmStaticList
Methods
addRecipient(String,String)
Adds a recipient to the static list.
Declaration
Void addRecipient(String address, String name)
Parameters
Type | Name | Description |
---|---|---|
String | address | The email address of the recipient |
String | name | The name of the recipient. |
Returns
Type | Description |
---|---|
Void |
Remarks
You must specify the email address of the recipient (the first parameter) and optional you can specify the name of the recipient.
delete()
Deletes a static list.
Declaration
Bool delete()
Returns
Type | Description |
---|---|
Bool | If the list was actually deleted; otherwise, false. |
Remarks
If the list is in use by a shipment, the list will not be deleted.
getRecipients()
Gets a map of all the recipients in this list. The first element will be the email address and the second element the name of the recipient.
Declaration
Map getRecipients()
Returns
Type | Description |
---|---|
Map | A map containing all the recipients. |
load(Integer)
Loads an existing static list.
Declaration
Bool load(Integer id)
Parameters
Type | Name | Description |
---|---|---|
Integer | id | The ID of the static list. |
Returns
Type | Description |
---|---|
Bool | False if the list was not found; otherwise, true. |
removeRecipient(String)
Removes a recipient from the list identified by the email address.
Declaration
Void removeRecipient(String address)
Parameters
Type | Name | Description |
---|---|---|
String | address | The email address of the recipient to be removed. |
Returns
Type | Description |
---|---|
Void |
save()
Saves the list and the recipients.
Declaration
Integer save()
Returns
Type | Description |
---|---|
Integer | The ID of the SpmStaticList object. |
setFolderId(Integer)
Sets folder ID for a static list.
Declaration
Void setFolderId(Integer folderId)
Parameters
Type | Name | Description |
---|---|---|
Integer | folderId | The ID of the folder for this list. |
Returns
Type | Description |
---|---|
Void |
setName(String)
Sets the name of this list.
Declaration
Void setName(String name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the list. |
Returns
Type | Description |
---|---|
Void |
Remarks
This is only a descriptive text that will be shown in Service.