private DocumentValidationItemResponse Convert(DocumentationValidationItemCommand command)
        {
            DocumentValidationItemResponse result = new DocumentValidationItemResponse();

            result.PartyRole           = command.PartyRole;
            result.DocumentKind        = command.DocumentType;
            result.DocumentContextKind = command.DocumentContextKind;
            result.CollateralKind      = command.CollateralKind;
            result.RequiredStatus      = command.RequiredStatus;
            result.DocumentKind        = command.DocumentType;
            return(result);
        }
        private void AddProductCodeToCollection(DocumentationValidationItemCommand toAdd, DocumentationValidationItemCommand toDelete)
        {
            bool definitionForSomeProducts = toDelete.ProductCodes != null && toDelete.ProductCodes.Any();

            if (definitionForSomeProducts)
            {
                if (toAdd.ProductCodes != null && !toAdd.ProductCodes.Any())
                {
                    foreach (var item in toDelete.ProductCodes)
                    {
                        toAdd.ProductCodes.Add(item);
                    }
                }
            }
            else
            {
                toAdd.ProductCodes = null;
            }
        }