Class ContractInfo
Builder/DTO for offering a contract to a customer.
public sealed class ContractInfo
- Inheritance
-
ContractInfo
- Inherited Members
- Extension Methods
Constructors
ContractInfo()
public ContractInfo()
Properties
DeliveryLocationGuid
Delivery location GUID (optional). If null or invalid, a reasonable location will be chosen.
public string DeliveryLocationGuid { get; set; }
Property Value
DeliveryWindow
Optional delivery window. If not set, game defaults are used.
public (int startTime, int endTime)? DeliveryWindow { get; set; }
Property Value
Expires
Whether the offer expires automatically.
public bool Expires { get; set; }
Property Value
ExpiresAfterMinutes
Minutes until expiry if Expires is true.
public int ExpiresAfterMinutes { get; set; }
Property Value
IsCounterOffer
Whether this is a counter offer.
public bool IsCounterOffer { get; set; }
Property Value
Orders
Ordered products.
public List<ContractInfo.OrderLine> Orders { get; }
Property Value
Payment
Contract payment (base, excluding bonuses).
public float Payment { get; set; }
Property Value
PickupScheduleIndex
Optional pickup schedule index; 0 is typical for immediate offers.
public int PickupScheduleIndex { get; set; }
Property Value
Methods
AddProduct(ProductDefinition, int, Quality)
Adds a product by API definition.
public ContractInfo AddProduct(ProductDefinition definition, int quantity, Quality minQuality)
Parameters
definitionProductDefinitionquantityintminQualityQuality
Returns
AddProductById(string, int, Quality)
Adds a product by registry ID.
public ContractInfo AddProductById(string productId, int quantity, Quality minQuality)
Parameters
Returns
WithWindow(int, int)
Sets the delivery window in 24h hhmm format.
public ContractInfo WithWindow(int startTime, int endTime)