diff --git a/src/VirtoCommerce.QuoteModule.ExperienceApi/Schemas/QuoteType.cs b/src/VirtoCommerce.QuoteModule.ExperienceApi/Schemas/QuoteType.cs index be880e1..27d3b14 100644 --- a/src/VirtoCommerce.QuoteModule.ExperienceApi/Schemas/QuoteType.cs +++ b/src/VirtoCommerce.QuoteModule.ExperienceApi/Schemas/QuoteType.cs @@ -44,15 +44,39 @@ public QuoteType(IDynamicPropertyResolverService dynamicPropertyResolverService) Field>(nameof(QuoteRequest.Currency), resolve: context => context.Source.Currency); + Field>(nameof(QuoteRequest.ManualRelDiscountAmount), resolve: context => context.Source.Model.ManualRelDiscountAmount.ToMoney(context.Source.Currency)); + Field>("discountTotal", + resolve: context => context.Source.Model.Totals.DiscountTotal.ToMoney(context.Source.Currency)); + Field>(nameof(QuoteRequest.ManualShippingTotal), resolve: context => context.Source.Model.ManualShippingTotal.ToMoney(context.Source.Currency)); + Field>("shippingTotal", + resolve: context => context.Source.Model.Totals.ShippingTotal.ToMoney(context.Source.Currency)); + + Field>(nameof(QuoteRequest.ManualSubTotal), resolve: context => context.Source.Model.ManualSubTotal.ToMoney(context.Source.Currency)); + Field>("originalSubTotal", + resolve: context => context.Source.Model.Totals.OriginalSubTotalExlTax.ToMoney(context.Source.Currency)); + Field>("subTotal", + resolve: context => context.Source.Model.Totals.SubTotalExlTax.ToMoney(context.Source.Currency)); + + Field>("taxTotal", + resolve: context => context.Source.Model.Totals.TaxTotal.ToMoney(context.Source.Currency)); + + Field>("total", + resolve: context => context.Source.Model.Totals.GrandTotalExlTax.ToMoney(context.Source.Currency)); + Field>("totalWithTax", + resolve: context => context.Source.Model.Totals.GrandTotalInclTax.ToMoney(context.Source.Currency)); + + Field>("adjustment", + resolve: context => context.Source.Model.Totals.AdjustmentQuoteExlTax.ToMoney(context.Source.Currency)); ExtendableField>(nameof(QuoteRequest.Totals), - resolve: context => context.Source.Totals); + resolve: context => context.Source.Totals, + deprecationReason: "Use separate fields instead"); ExtendableField>>>(nameof(QuoteRequest.Items), resolve: context => context.Source.Items); ExtendableField>>>(nameof(QuoteRequest.Addresses),