#region --------------- Copyright Dresser Wayne Pignone -------------
/*
* $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/AuthorizeParameters.cs $
*
* 4 07-03-14 7:49 roger.månsson
* Removed unnessecary empty public constuctor.
*
* 3 07-02-26 14:05 roger.månsson
* Published for COM interop.
*
* 2 07-01-05 8:58 roger.månsson
* Created an interface for COM
*/
#endregion
using System.Runtime.InteropServices;
namespace Wayne.ForecourtControl
{
///
/// The AuthorizeParameters is a data structure that contains the
/// parameters that is used when authorizing a fuelling.
///
[ComVisible(true)]
//[ComDefaultInterface(typeof(IAuthorizeParameters))]
[ClassInterface(ClassInterfaceType.None)]
public class AuthorizeParameters : Wayne.ForecourtControl.IAuthorizeParameters
{
public AuthorizeParameters()
{
this.processZeroSale = false;
this.applyAuthPresetRetries = false;
}
#region Fields
decimal presetValue;
Wayne.ForecourtControl.PresetType presetType;
Wayne.ForecourtControl.PriceGroup priceGroup;
AllowedFuelGrades allowedFuelGrades = new AllowedFuelGrades();
FuelGradeMaxVolumes fuelGradeMaxVolumes = new FuelGradeMaxVolumes();
bool lockToReleaseClient;
bool prepay;
bool consentGiven;
int prepayReceiptNo;
bool applyAuthPresetRetries;
bool processZeroSale;
//FG, OCT-13-10, Add PayType to show outdoor payment type on FM
string payType;
#endregion
#region Properties
///
/// Maximum fuelling amount in domestic currency or volume.
/// May be overridden by the configured maximum volume or
/// amount in the pump controller. The lowest value will be used.
///
public decimal PresetValue
{
get
{
return presetValue;
}
set
{
presetValue = value;
}
}
///
/// Specifies if the PresetValue should be regarded as a volume or an amount.
///
///
public Wayne.ForecourtControl.PresetType PresetType
{
get
{
return presetType;
}
set
{
presetType = value;
}
}
///
/// Fuel grades allowed to use for the fuelling are set to true.
///
public AllowedFuelGrades AllowedFuelGrade
{
get
{
return allowedFuelGrades;
}
}
///
/// Fuel grades maximum volumes authorized.
///
public FuelGradeMaxVolumes FuelGradeMaxVolume
{
get
{
return fuelGradeMaxVolumes;
}
}
///
/// Specifies the price group that should be used for the price calculation.
///
public int PriceGroup
{
get
{
return priceGroup;
}
set
{
priceGroup = value;
}
}
///
/// The fuelling can only be reserved and set as paid by the releasing client if this
/// property is set to true.
///
public bool LockToReleaseClient
{
get
{
return lockToReleaseClient;
}
set
{
lockToReleaseClient = value;
}
}
///
/// Prepay flag is true for bank note sale
///
public bool Prepay
{
get
{
return prepay;
}
set
{
prepay = value;
}
}
///
/// Specifies if operator consent is given
///
public bool ConsentGiven
{
get
{
return consentGiven;
}
set
{
consentGiven = value;
}
}
public int PrepayReceiptNo
{
get
{
return prepayReceiptNo;
}
set
{
prepayReceiptNo = value;
}
}
public int? AuthorizationId { get; set; }
//FG, OCT-13-10, Add PayType to show outdoor payment type on FM
///
/// Payment type: e.g. "ST" for speedpass tag; "FC" for fleet card; "PC" for payment card;
///
public string PayType
{
get
{
return payType;
}
set
{
payType = value;
}
}
///
/// Treat zero sale as a transaction if set it to true
/// Default value is false
///
public bool ProcessZeroSale
{
get { return processZeroSale; }
set { processZeroSale = value; }
}
///
/// True, customer has chance to Retried for auth/preset
/// Default value is false
///
public bool ApplyAuthPresetRetries
{
get { return applyAuthPresetRetries; }
set { applyAuthPresetRetries = value; }
}
#endregion
#region IAuthorizeParameters Members
IAllowedFuelGrades IAuthorizeParameters.AllowedFuelGrade
{
get { return allowedFuelGrades as IAllowedFuelGrades; }
}
IFuelGradeMaxVolumes IAuthorizeParameters.FuelGradeMaxVolume
{
get { return fuelGradeMaxVolumes as IFuelGradeMaxVolumes; }
}
#endregion
}
}