private List <TaxChargeSpecification> GetUnitTaxSpecification(BookingFlowContext flowContext, SlotTable slot) { switch (flowContext.TaxPayeeRelationship) { case TaxPayeeRelationship.BusinessToBusiness when _appSettings.Payment.TaxCalculationB2B: case TaxPayeeRelationship.BusinessToConsumer when _appSettings.Payment.TaxCalculationB2C: return(new List <TaxChargeSpecification> { new TaxChargeSpecification { Name = "VAT at 20%", Price = slot.Price * (decimal?)0.2, PriceCurrency = "GBP", Rate = (decimal?)0.2 } }); case TaxPayeeRelationship.BusinessToBusiness when !_appSettings.Payment.TaxCalculationB2B: case TaxPayeeRelationship.BusinessToConsumer when !_appSettings.Payment.TaxCalculationB2C: return(null); default: throw new ArgumentOutOfRangeException(); } }
public StoreBookingFlowContext(BookingFlowContext bookingFlowContext) { if (bookingFlowContext == null) { throw new ArgumentNullException(nameof(bookingFlowContext)); } base.Stage = bookingFlowContext.Stage; base.OrderIdTemplate = bookingFlowContext.OrderIdTemplate; base.OrderId = bookingFlowContext.OrderId; base.TaxPayeeRelationship = bookingFlowContext.TaxPayeeRelationship; base.Payer = bookingFlowContext.Payer; base.Seller = bookingFlowContext.Seller; base.SellerId = bookingFlowContext.SellerId; }
public abstract TOrder ProcessFlowRequest <TOrder>(BookingFlowContext request, TOrder order) where TOrder : Order, new();