Statements API

This topic describes the end of day statement APIs for the Integration Framework.

API

Name Description
StatementInfo CreateStatement(LogonInfo, RecordIdentifier, bool)

Create end of day statements for a specific store. Returns the created statement info.

Parameters:

  • logonInfo: Login information for the database
  • storeID: The ID of the store for which to create the statement
  • allowPostingWithoutEodTransaction: True if it is allowed to create end of day statements if any terminal does not have an end of day transaction
List<StatementInfo> CreateStatements(LogonInfo, bool)

Create end of day statements for all stores. Returns the created statement info for each store.

Parameters:

  • logonInfo: Login information for the database
  • allowPostingWithoutEodTransaction: True if it is allowed to create end of day statements if any terminal does not have an end of day transaction
List<StatementInfo> GetStatements(LogonInfo, DateTime)

Get all end of day statements, from all stores, created after a specific date.

Parameters:

  • logonInfo: Login information for the database
  • date: The date from which to get the statements
List<StatementInfo> GetStatements(LogonInfo, DateTime, RecordIdentifier)

Get all end of day statements, for a specific store, created after a specific date.

Parameters:

  • logonInfo: Login information for the database
  • date: The date from which to get the statements
  • storeID: The ID of the store for which to get the statements

 

Business objects

The following business objects are used by the end of day statements API.

 

Examples

By default, when creating statements, the end time will be the current time and the starting time will be the time of the last statement. If there is no statement, the last end of day transaction will be used. If there is no end of day transaction either, the process cannot continue.

Creating statements


	StatementInfo statement = wcfStatementsService.CreateStatement(CreateLogonInfo(dataModel), "S0001", true);
	if(statement != null)
		//Statement has been succesfully created
		

In the above example we are creating a statement for a specific store.

Getting statements


	List<StatementInfo> statements = wcfStatementsService.GetStatements(CreateLogonInfo(dataModel), DateTime.Now.AddMonths(-1));
	foreach(StatementInfo st in statements)
	{
		//Do something
	}
			

In the above example we are getting all statements, from all stores, that were created from one month ago until now.

See also