public InfusionSoftClient(IInfusionSoftConfiguration configuration) { Configuration = configuration; ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslpolicyerrors) => true; //Workaround for infusionsoft change. //http://community.infusionsoft.com/showthread.php/15371-The-request-was-aborted-Could-not-create-SSL-TLS-secure-channel ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; ApplicationName = configuration.ApplicationName; MethodListener = new NullMethodListener(); AffiliateService = new AffiliateServiceWrapper(configuration, this); ContactService = new ContactServiceWrapper(configuration, this); DataService = new CustomDataServiceWrapper(configuration, this); DiscountService = new DiscountServiceWrapper(configuration, this); EmailService = new EmailServiceWrapper(configuration, this); InvoiceService = new InvoiceServiceWrapper(configuration, this); FileService = new FileServiceWrapper(configuration, this); OrderService = new OrderServiceWrapper(configuration, this); ProductService = new ProductServiceWrapper(configuration, this); SearchService = new SearchServiceWrapper(configuration, this); ShippingService = new ShippingServiceWrapper(configuration, this); WebFormService = new WebFormServiceWrapper(configuration, this); FunnelService = new FunnelServiceWrapper(configuration, this); }
public InfusionSoftClient(IInfusionSoftConfiguration configuration) { Configuration = configuration; ApplicationName = configuration.ApplicationName; MethodListener = new NullMethodListener(); System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls; AffiliateService = new AffiliateServiceWrapper(configuration, this); ContactService = new ContactServiceWrapper(configuration, this); DataService = new CustomDataServiceWrapper(configuration, this); DiscountService = new DiscountServiceWrapper(configuration, this); EmailService = new EmailServiceWrapper(configuration, this); InvoiceService = new InvoiceServiceWrapper(configuration, this); FileService = new FileServiceWrapper(configuration, this); OrderService = new OrderServiceWrapper(configuration, this); ProductService = new ProductServiceWrapper(configuration, this); SearchService = new SearchServiceWrapper(configuration, this); ShippingService = new ShippingServiceWrapper(configuration, this); WebFormService = new WebFormServiceWrapper(configuration, this); FunnelService = new FunnelServiceWrapper(configuration, this); }
public InfusionSoftClient(IInfusionSoftConfiguration configuration) { Configuration = configuration; ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslpolicyerrors) => true; ApplicationName = configuration.ApplicationName; MethodListener = new NullMethodListener(); AffiliateService = new AffiliateServiceWrapper(configuration, this); ContactService = new ContactServiceWrapper(configuration, this); DataService = new CustomDataServiceWrapper(configuration, this); DiscountService = new DiscountServiceWrapper(configuration, this); EmailService = new EmailServiceWrapper(configuration, this); InvoiceService = new InvoiceServiceWrapper(configuration, this); FileService = new FileServiceWrapper(configuration, this); OrderService = new OrderServiceWrapper(configuration, this); ProductService = new ProductServiceWrapper(configuration, this); SearchService = new SearchServiceWrapper(configuration, this); ShippingService = new ShippingServiceWrapper(configuration, this); WebFormService = new WebFormServiceWrapper(configuration, this); FunnelService = new FunnelServiceWrapper(configuration, this); }
private List <ProductViewModel> GetProductsForAllCultures(SitefinityRestClient sf) { var culturesToMigrate = DataHelper.GetCulturesToMigrate(sf).ToList(); List <ProductViewModel> products; var productWrapper = new ProductServiceWrapper(sf); var defaultCulture = culturesToMigrate.First(x => x.IsDefault); products = productWrapper.GetProducts("", "", Skip, Take, "", "", "", defaultCulture.Culture).Items.ToList(); AddCultureToProducts(products, defaultCulture); var secondaryCultures = culturesToMigrate.Where(x => x.IsDefault == false); foreach (var culture in secondaryCultures) { var cultureProducts = productWrapper .GetProducts("", "", Skip, Take, "", "", "", culture.Culture).Items .ToList(); AddSecondaryCulturesToProducts(products, cultureProducts, culture.Culture); } return(products); }