Interface ISaintAgent
Interface for the Saint Agent Administration and maintenance of SAINT counters and statuses
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Saint Agent", "Interface for the Saint Agent. Administration and maintenance of SAINT counters and statuses")]
public interface ISaintAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
Methods
CreateDefaultSaintConfigurationAsync(CancellationToken)
Loading default values into a new SaintConfiguration. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
Task<SaintConfiguration> CreateDefaultSaintConfigurationAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SaintConfiguration> | New SaintConfiguration with default values |
CreateDefaultStatusMonitorAsync(CancellationToken)
Loading default values into a new StatusMonitor. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
Task<StatusMonitor> CreateDefaultStatusMonitorAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<StatusMonitor> | New StatusMonitor with default values |
CreateDefaultStatusMonitorPeriodsAsync(CancellationToken)
Loading default values into a new StatusMonitorPeriods. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
Task<StatusMonitorPeriods> CreateDefaultStatusMonitorPeriodsAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<StatusMonitorPeriods> | New StatusMonitorPeriods with default values |
GetSaintConfigurationsAsync(CancellationToken)
Returns the StatusMonitorPeriods entity.
Declaration
Task<SaintConfiguration[]> GetSaintConfigurationsAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SaintConfiguration[]> | The SaintConfiguration for all entities |
GetStatusMonitorAsync(int, CancellationToken)
Get a single status monitor based on its identity
Declaration
Task<StatusMonitor> GetStatusMonitorAsync(int id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | id | Identity of status monitor |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<StatusMonitor> | The requested status monitor |
GetStatusMonitorPeriodsAsync(CancellationToken)
Returns the StatusMonitorPeriods entity.
Declaration
Task<StatusMonitorPeriods> GetStatusMonitorPeriodsAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<StatusMonitorPeriods> | The StatusMonitorEntity |
GetStatusMonitorsAsync(int, string, CancellationToken)
Get all active status monitors for a specified target
Declaration
Task<StatusMonitor[]> GetStatusMonitorsAsync(int id, string type, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | id | Identity of target type(contact identity, project identity etc.) |
string | type | Type to get status monitors for("contact", "project", etc.) |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<StatusMonitor[]> | Active status monitors |
RegenerateCountersAsync(bool, CancellationToken)
Regenerate the Saint counters - this can take several minutes
Declaration
Task<BatchTaskInfo> RegenerateCountersAsync(bool runAsBatch, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
bool | runAsBatch | If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<BatchTaskInfo> | Information about the batch task, if batch execution was requested. Otherwise null |
RegenerateStatusMonitorAsync(int, CancellationToken)
Regenerate the given status monitor
Declaration
Task RegenerateStatusMonitorAsync(int statusMonitorId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | statusMonitorId | The id of the statusmonitor to regenerate |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | This method has no return value |
RegenerateStatusMonitorsAsync(bool, CancellationToken)
Regenerate status monitors
Declaration
Task<BatchTaskInfo> RegenerateStatusMonitorsAsync(bool runAsBatch, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
bool | runAsBatch | If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<BatchTaskInfo> | Information about the batch task, if batch execution was requested. Otherwise null |
SaveSaintConfigurationAsync(SaintConfiguration, CancellationToken)
Updates the existing SaintConfiguration or creates a new SaintConfiguration if the id parameter is empty
Declaration
Task<SaintConfiguration> SaveSaintConfigurationAsync(SaintConfiguration saintConfiguration, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
SaintConfiguration | saintConfiguration | The SaintConfiguration that is saved. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SaintConfiguration> | New or updated SaintConfiguration |
SaveStatusMonitorAsync(StatusMonitor, CancellationToken)
Updates the existing StatusMonitor or creates a new StatusMonitor if the id parameter is empty
Declaration
Task<StatusMonitor> SaveStatusMonitorAsync(StatusMonitor statusMonitor, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
StatusMonitor | statusMonitor | The StatusMonitor that is saved. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<StatusMonitor> | New or updated StatusMonitor |
SaveStatusMonitorPeriodsAsync(StatusMonitorPeriods, CancellationToken)
Updates the existing StatusMonitorPeriods or creates a new StatusMonitorPeriods if the id parameter is empty
Declaration
Task<StatusMonitorPeriods> SaveStatusMonitorPeriodsAsync(StatusMonitorPeriods statusMonitorPeriods, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
StatusMonitorPeriods | statusMonitorPeriods | The StatusMonitorPeriods that is saved. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<StatusMonitorPeriods> | New or updated StatusMonitorPeriods |
SetRankOnStatusMonitorsAsync(string, int[], CancellationToken)
Set rank order on status monitors
Declaration
Task SetRankOnStatusMonitorsAsync(string type, int[] itemsIds, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | type | Type of status monitors to reorder ("contact", "project", etc.) |
int[] | itemsIds | The ids of the items in the order you want |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | This method has no return value |