Represents the billing rate information for a product or service.
Namespace:
BargeExAssembly: BargeEx (in BargeEx.dll)
Version: 3.0.400.140 (3.0.400.140)
Syntax
C# |
---|
[SerializableAttribute] public class RateInformation : SerializableBase |
Visual Basic (Declaration) |
---|
<SerializableAttribute> _ Public Class RateInformation _ Inherits SerializableBase |
Visual C++ |
---|
[SerializableAttribute] public ref class RateInformation : public SerializableBase |
Remarks
This class represents the billing rate information for a product or service. This class can be used to represent the following different types of rates: flat fee or fixed rate (FixedRate) or a unit and quantity rate (UnitRate). The RateType property indicates what type of rate is represented by this class instance:
- If RateType is set to NotProvided, the FixedRateAmount, UnitRateUnitAmount, UnitRateQuantity, and UnitRateQuantityUnitCode properties should be disregarded.
-
If RateType
is set to FixedRate, the
FixedRateAmount
property will contain the rate. The
UnitRateUnitAmount,
UnitRateQuantity, and
UnitRateQuantityUnitCode
properties should be disregarded.
Cost = FixedRateAmount
-
If RateType
is set to UnitRate, the
UnitRateUnitAmount,
UnitRateQuantity, and
UnitRateQuantityUnitCode
properties should be set. The
FixedRateAmount
property should be disregarded.
Cost = UnitRateUnitAmount * UnitRateQuantity
- This property should not be set to PercentageRate.
Examples
The following example creates an instance of the
RateInformation class
and sets its common properties.
CopyVisual Basic
' Create a new BargeEx RateInformation object Dim RateInformation As New BargeEx.RateInformation() ' For the available RateInformation properties With RateInformation ' Set the rate type to FixedRate .RateType = BargeEx.CicaRateType.FixedRate ' Set the rate information properties .FixedRateAmount = 200 ' Add incidentals .Incidentals.Add(New BargeEx.Incidental(BargeEx.CicaIncidentalCode.Fuel, 100, 2)) .Incidentals.Add(New BargeEx.Incidental(BargeEx.CicaIncidentalCode.HighWater, 50)) End With ' RateInformation
CopyC#
// Create a new BargeEx RateInformation object BargeEx.RateInformation RateInformation = new BargeEx.RateInformation(); // For the available RateInformation properties // Set the rate type to FixedRate RateInformation.RateType = BargeEx.CicaRateType.FixedRate; // Set the rate information properties RateInformation.FixedRateAmount = 200; // Add incidentals RateInformation.Incidentals.Add( new BargeEx.Incidental(BargeEx.CicaIncidentalCode.Fuel, 100, 2)); RateInformation.Incidentals.Add( new BargeEx.Incidental(BargeEx.CicaIncidentalCode.HighWater, 50));