public static ShoppingListDraft DefaultShoppingListDraftWithCustomType(ShoppingListDraft draft, Type type, Fields fields)
        {
            var customFieldsDraft = new CustomFieldsDraft
            {
                Type   = type.ToKeyResourceIdentifier(),
                Fields = fields
            };

            var shoppingListDraft = DefaultShoppingListDraft(draft);

            shoppingListDraft.Custom = customFieldsDraft;

            return(shoppingListDraft);
        }
        public static ReviewDraft DefaultReviewDraftWithCustomType(ReviewDraft draft, Type type, Fields fields)
        {
            var customFieldsDraft = new CustomFieldsDraft
            {
                Type   = type.ToKeyResourceIdentifier(),
                Fields = fields
            };

            var reviewDraft = DefaultReviewDraft(draft);

            reviewDraft.Custom = customFieldsDraft;

            return(reviewDraft);
        }
        public static ChannelDraft DefaultChannelDraftWithCustomType(ChannelDraft draft, Type type, Fields fields)
        {
            var customFieldsDraft = new CustomFieldsDraft
            {
                Type   = type.ToKeyResourceIdentifier(),
                Fields = fields
            };

            var channelDraft = DefaultChannelDraft(draft);

            channelDraft.Custom = customFieldsDraft;

            return(channelDraft);
        }
Exemplo n.º 4
0
        public static DiscountCodeDraft DefaultDiscountCodeDraftWithCustomType(DiscountCodeDraft draft,
                                                                               List <Reference <CartDiscount> > cartDiscounts, Type type, Fields fields)
        {
            var customFieldsDraft = new CustomFieldsDraft
            {
                Type   = type.ToKeyResourceIdentifier(),
                Fields = fields
            };

            var discountCodeDraft = DefaultDiscountCodeDraft(draft, cartDiscounts);

            discountCodeDraft.Custom = customFieldsDraft;

            return(discountCodeDraft);
        }