Skip to main content

Periods

General

Web service type: Command & Query Web Services

Resource location: /webservices/PeriodService.svc?wsdl

General data contracts

public class PeriodServiceFault : Fault
{
public PeriodServiceFaultCode Code
public String Message
}

public enum PeriodServiceFaultCode
{
YearNotFound,
PeriodNotFound,
YearCanNotBeDeleted,
InvalidNumberOfPeriods,
YearCanNotBeCreated,
EndDateCanNotBeChanged,
NameCanNotBeChanged,
PeriodCanNotBeOpened,
PeriodCanNotBeClosed
}

Commands

CreateYear

public class CreateYear : Command
{
public int NumberOfPeriods; // Number of periods to be created for the new year. Mandatory.
}

ChangeEndDate

public class ChangeEndDate : Command
{
public int Year; // Year of the period that should be changed. Mandatory.
public int PeriodNumber; // The period that should be changed. Mandatory.
public DateTime EndDate; // The new end date of the given period. Mandatory.
}

ChangeName

public class ChangeName : Command
{
public int Year; // Year of the period that should be changed. Mandatory.
public int PeriodNumber; // The period that should be changed. Mandatory.
public string Name; // The new name of the given period. Mandatory.
}

OpenPeriod

public class OpenPeriod : Command
{
public int Year; // Year of the period that should be opened. Mandatory.
public int PeriodNumber; // The period that should be opened. Mandatory.
}

ClosePeriod

public class ClosePeriod : Command
{
public int Year; // Year of the period that should be closed. Mandatory.
public int PeriodNumber; // The period that should be closed. Mandatory.
}

ResetYears

public class ResetYears : Command
{
public int NewYear; // First year to be created. All previous years will be deleted. Mandatory.
public int NewNumberOfPeriods; // Number of periods to be created. Mandatory.
}

DeleteYear

public class DeleteYear : Command
{
public int Year; // Year to be deleted. Mandatory.
}

Queries

GetYears

public class GetYears : Query
{}

GetPeriods

public class GetPeriods : Query
{
public int Year; // The year for which the periods should be read. Mandatory.
}