using Sitecore.Commerce.Core.Commands; | |
using Sitecore.Commerce.Plugin.Catalog; | |
namespace Sitecore.Services.Examples.Catalog | |
{ | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.OData.Builder; | |
using Commerce.Core; | |
using Framework.Conditions; | |
using Sitecore.Framework.Pipelines; | |
[PipelineDisplayName("ConfigureServiceApiBlock")] | |
public class ConfigureServiceApiBlock : PipelineBlock<ODataConventionModelBuilder, ODataConventionModelBuilder, CommercePipelineExecutionContext> | |
{ | |
public override Task<ODataConventionModelBuilder> Run(ODataConventionModelBuilder modelBuilder, CommercePipelineExecutionContext context) | |
{ | |
Condition.Requires(modelBuilder).IsNotNull($"{Name}: The argument cannot be null."); | |
var createUpdateSellableItem = modelBuilder.Action("CreateUpdateSellableItem"); | |
createUpdateSellableItem.Parameter<string>("createUpdateSellableItem"); | |
createUpdateSellableItem.Returns<bool>(); | |
return Task.FromResult(modelBuilder); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment