Skip to main content
Version: 5.3

Holiday Service

This service gains access to the public holiday definitions in TimePunch.

GetCountries

Using this method all countries and regions, that are stored in TimePunch for holiday calculation, will be returned.

CountryDto[] GetCountries(  
out TpFault fault,
TpAuthentication authentication);
Needed PermissionpublicHolidays@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
Return ValueList of all defined Countries

GetPublicHolidays

This method loads all holidays of the given country with the defined year.

PublicHolidayDto[] GetPublicHolidays(  
out TpFault fault,
TpAuthentication authentication,
Guid countryId,
int year);
Needed PermissionpublicHolidays@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
countryIdId of the country to load the holidays
yearYear to load the holidays
Return ValueList of all defined holidays

SavePublicHolidays

This method saves the holidays passed to the country and year defined.

void SavePublicHolidays(  
out TpFault fault,
TpAuthentication authentication,
Guid countryId,
int year,
PublicHolidayDto[] publicHolidayDtos)
Needed PermissionpublicHolidays@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
countryIdId of the country to load the holidays
yearYear to save the holidays

ExportPublicHolidays

This method exports all public holidays from TimePunch. The difference to the load method is that not only the holidays of the loaded year and country, but all holidays are returned.

PublicHolidayDto[] ExportPublicHolidays(  
out TpFault fault,
TpAuthentication authentication)
Needed PermissionpublicHolidays@export
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
Return ValueList of all defined holidays

ImportPublicHolidays

This method imports all public holidays from TimePunch. The difference to the storage method is that not only the holidays of the loaded year and country, but all holidays are stored.

void ImportPublicHolidays(  
out TpFault fault,
TpAuthentication authentication,
PublicHolidayDto[] publicHolidayDtos)
Needed PermissionpublicHolidays@import
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
publicHolidayDtosList of public holidays to import