Ejemplo n.º 1
0
        /// <summary>
        /// Demonstrate pushing coupon codes into Promo
        /// </summary>
        /// <param name="companyKey"></param>
        /// <param name="couponImportKey"></param>
        /// <returns>result message</returns>
        private static string Sample_PushCouponCodesToPromo(string companyKey, string couponImportKey)
        {
            var importService = new ImportServiceManager(ServiceTarget.EvaluationServices);

            var couponCodeImportRequest = SampleRequests.GetCouponCodesImportRequest(companyKey, couponImportKey);

            var importResponse = importService.ImportCouponCodes(couponCodeImportRequest);

            if (!importResponse.Summary.ProcessedSuccessfully)
            {
                return(importResponse.Summary.GetErrorDisplayText());
            }
            else
            {
                return(importResponse.GetDisplayText());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Attempt to insert a product.  If the product exists, it will just be updated
        /// </summary>
        private static string Sample_CreateUpdateProduct(string companyKey)
        {
            // Create the import service manager - targeting the evaluation services.
            var importService = new ImportServiceManager(ServiceTarget.EvaluationServices);

            // Get the request details.
            var productImportRequest = SampleRequests.GetProductImportRequest(companyKey);

            // Submit the request and get the response.
            var importResponse = importService.ImportProducts(productImportRequest);

            // Now look at the response and display some information in the console.
            if (importResponse.Summary.ProcessedSuccessfully != true)
            {
                // Something went wrong with the import, so show the message.
                return(importResponse.Summary.GetErrorDisplayText());
            }
            else
            {
                // Get some display text from the import result.
                return(importResponse.GetDisplayText());
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates new instance of TravelOfferDALManager class
        /// </summary>
        public IImportServiceManager CreateImportServiceManager()
        {
            IImportServiceManager bllManager = new ImportServiceManager();

            return(bllManager);
        }