API Data Types (Cashless retailer)

The Cashless Retailing API uses the following data types as either parameters or return values for its methods
/// <summary>
/// Object to combine the login result enumeration with the
/// last processed record ID for the requested entity
/// </summary>
[DataContract]
public class LastProcessedRecordReturn
{
[DataMember]
public LoginResultEnum LoginResult;
[DataMember]
public long LastProcessedRecordID;
}

/// <summary>
/// Object to combine the login result enumeration with the
/// result of the requested data upload. The UnknownIDs field
/// allows us to inform partners of any SIMS Person IDs we
/// do not recognise.
/// </summary>
[DataContract]
public class UploadResultReturn
{
[DataMember]
public LoginResultEnum LoginResult;
[DataMember]
public UploadResultEnum UploadResult;
[DataMember]
public List<string> UnknownIDs;
}
/// <summary>
/// Login credentials used to authenticate the cashless
/// catering partner as authorised to exchange data for
/// a particular school.
/// </summary>
[DataContract]
public class UserCredentials
{
/// <summary>
/// Cashless catering partner key - issued by Schoolcomms
/// </summary>
[DataMember]
public Guid ThirdPartyPartnerID;
/// <summary>
/// Username for the school user
/// </summary>
[DataMember]
public string UserName;
/// <summary>
/// Memorable data for the school user
/// </summary>
[DataMember]
public string MemorableData;
/// <summary>
/// Password for the school user
/// </summary>
Commercial in Confidence Page 6
[DataMember]
public string Password;
/// <summary>
/// School LA DCSF code as a combined number e.g. 9876543
/// </summary>
[DataMember]
public long LADCSFCode;
/// <summary>
/// Identifies the purse type as defined in the PurseTypeEnum
/// </summary>
[DataMember]
public PurseTypeEnum PurseTypeIdentifier;
}
/// <summary>
/// Contains the details of either
/// 1) Purchases made through the tills by school members
/// 2) Account balance top ups (can be a negative value for
/// partners that support withdrawals)
/// 3) Just a member's current balance (for partners who do
/// not report at transaction level detail)
/// </summary>
[DataContract]
public class PartnerTransactionRecord
{
/// <summary>
/// Partner generated ID to uniquely identify the purchase
/// record. This will be null if the partner has set
/// partnerIDsNotSupplied to false
/// </summary>
[DataMember]
public long PartnerTransactionID;
/// <summary>
/// The unique person ID assigned from the schools SIMS
/// database
/// </summary>
[DataMember]
public string SIMSPersonID;
/// <summary>
/// Description of purchased item which could be combined
/// into a single record e.g. 'Ham, eggs and cola' or a
/// single record for each constituent part of the meal
/// </summary>
[DataMember]
public string DescriptionOfPurchasedItem;
/// <summary>
/// Unique identifier presented by the partner system to
/// enable items purchased together in a single transaction
/// at the till to be grouped together. If the record is
/// a balance top-up then this field can be an empty string
/// </summary>
[DataMember]
public long ReceiptID;
/// <summary>
/// The RRP price for the meal before any subsidy has been
/// applied. Equal to ChargedAmount if there is no subsidy.
/// </summary>
[DataMember]
public decimal FullAmount;
/// <summary>
/// The amount actually charged for the meal.
/// If the meal was subsidised this will be less than
/// FullAmount otherwise they will be equal.
/// Can never be more than FullAmount.
/// </summary>
[DataMember]
public decimal ChargedAmount;
/// <summary>
/// Should be set to true if the meal was either
/// fully or partially subsidised otherwise false.
/// </summary>
[DataMember]
public bool FreeSchoolMeal;
/// <summary>
/// The date and time the purchase or top up
/// occurred. Used by schoolcomms to determine the
/// current balance for a school member
/// (i.e. the most recent date).
/// </summary>
[DataMember]
public DateTime TransactionDate;
/// <summary>
/// The new member balance adjusted for the
/// purchase or balance top-up
/// </summary>
[DataMember]
public decimal CurrentMemberBalance;
/// <summary>
/// An identifier to indicate whether the transaction
/// is for an item purchase or
/// a balance top-up or simply a balance update
/// </summary>
[DataMember]
public TransactionType TransactionType;
}
/// <summary>
/// Single object to return the result of the login,
/// the result of the data request and the list of
/// account payment records that were requested.
/// </summary>
[DataContract]
public class AccountPaymentsReturn
{
/// <summary>
///
/// </summary>
[DataMember]
public LoginResultEnum LoginResult;
/// <summary>
///
/// </summary>
[DataMember]
public DataRequestResultEnum DataRequestResult;
/// <summary>
/// A batch ID that identifies the last tranche of
/// account payment records that were returned.
/// Intended to allow the partner to work out
/// which records to ask for on the next call
/// </summary>
[DataMember]
public long? BatchID;
/// <summary>
/// List of the dinner money payments that have
/// been made for school members.
/// </summary>
[DataMember]
public List<AccountPaymentRecord> PaymentsList;
}
/// <summary>
/// Definition of a single dinner money payment
/// for a school member.
/// </summary>
[DataContract]
public class AccountPaymentRecord
{
/// <summary>
/// Schoolcomms unique identifier for an instance of
/// a dinner money payment being received for a
/// single school member.
/// </summary>
[DataMember]
public long AccountPaymentID;
/// <summary>
/// The unique person ID assigned from the schools
/// SIMS database.
/// </summary>
[DataMember]
public string SIMSPersonID;
/// <summary>
/// Value of the payment received. This will be
/// negative for a refund.
/// </summary>
[DataMember]
public decimal PaymentAmount;

/// <summary>
/// Date and time that the payment was received
/// by Schoolcomms.
/// </summary>
[DataMember]
public DateTime PaymentDate;
}
/// <summary>
/// Defines the outcome of an upload request
/// by the partner.
/// </summary>
[DataContract]
public enum UploadResultEnum
{
[EnumMember]
UploadSuccessful,
[EnumMember]
FailedMoreThanMaxRecords, [EnumMember]
FailedOneOrMoreRecordsOlderThanLastProcessedRecord,
[EnumMember]
UnrecognisedMemberIdentfifier,
[EnumMember]
UploadFailedOther,
[EnumMember]
UploadSuccessfulWithUnknownMISIDs
}
/// <summary>
/// Defines the outcome of a data download
/// request by a partner.
/// </summary>
[DataContract]
public enum DataRequestResultEnum
{
[EnumMember]
AllAvailableRecordsReturned,
[EnumMember]
MoreRecordsAvailableToRequest
}
/// <summary>
/// Defines the different purse types that
/// can be processed.
/// </summary>
[DataContract]
public enum PurseTypeEnum
{
[EnumMember]
Catering = 1,
[EnumMember]
Vending = 2,
[EnumMember]
Library = 3,
[EnumMember]
Print = 4,
[EnumMember]
SchoolShop = 5
}
/// <summary>
/// Defines the different types of PartnerTransactionRecord
/// that the retail partner can pass to Schoolcomms
/// Sale: Contains the details of the purchases made
/// through the tills
/// TopUp: Contains the details of account payments
/// (can be a negative value for partners that support
/// withdrawals)
/// BalanceOnly: For partners who do not submit transaction
/// level details to be able to pass a current member
/// balances.
/// </summary>
[DataContract]
public enum TransactionType
{
[EnumMember]
Sale = 1,
[EnumMember]
TopUp = 2,
[EnumMember]
BalanceOnly = 3
}