public IShopifyCredentials RetrieveShopifyCredentials() { var connection = Retrieve(); var accessToken = connection.ShopifyAccessToken.IsNullOrEmpty() ? "" : _cryptoService.Decrypt(connection.ShopifyAccessToken); var apiKey = connection.ShopifyApiKey.IsNullOrEmpty() ? "" : _cryptoService.Decrypt(connection.ShopifyApiKey); var apiPassword = connection.ShopifyApiPassword.IsNullOrEmpty() ? "" : _cryptoService.Decrypt(connection.ShopifyApiPassword); var domain = new ShopDomain(connection.ShopifyDomain); if (accessToken.IsNullOrEmpty()) { return(null); } else { return(new OAuthAccessToken(connection.ShopifyDomain, accessToken)); } }
public static IServiceFacade GetServiceFacade() { var uoW = new MockUnitOfWork(new MockContext()); var cartDomain = new ShoppingBagDomain(uoW, new NullLogger <ShoppingBagDomain>()); var shopDomain = new ShopDomain(cartDomain, uoW, new NullLogger <ShopDomain>()); return(new ServiceFacadeProxy ( new ServiceFacade( new DomainFacadeTransactionProxy( new DomainLayerFacade( new UserDomain(NullLogger <UserDomain> .Instance, uoW, shopDomain), new DomainLayerFacadeVerifier(NullLogger <DomainLayerFacadeVerifier> .Instance, uoW, shopDomain), NullLogger <DomainLayerFacade> .Instance, new DefaultExternalServicesManager(), uoW ), new NullLogger <DomainFacadeTransactionProxy>(), uoW, new DefaultExternalServicesManager() ), NullLogger <ServiceFacade> .Instance ), new SessionManager(NullLogger <SessionManager> .Instance), NullLogger <ServiceFacadeProxy> .Instance )); }
public ApiKeyAndSecret(string apiKey, string apiSecret, ShopDomain domain) { ApiKey = apiKey; ApiSecret = apiSecret; Domain = domain; }
public GuestUser(Guid guid, IUnitOfWork unitOfWork, ShopDomain shopDomain) { Guid = guid; _unitOfWork = unitOfWork; _shopDomain = shopDomain; }
public AdminUser(BaseUser baseUser, IUnitOfWork unitOfWork, ShopDomain shopDomain) : base(baseUser, unitOfWork, shopDomain) { }
public OAuthAccessToken(string domain, string accessToken) { Domain = new ShopDomain(domain); AccessToken = accessToken; }
public ShopController(ShopDomain domain) { this.domain = domain; }
// Functions for translating... public PrivateAppCredentials ToPrivateAppCredentials() { var domain = new ShopDomain(PrivateAppDomain); return(new PrivateAppCredentials(ApiKey, ApiPassword, domain)); }
public PrivateAppCredentials(string apiKey, string apiPassword, ShopDomain domain) { ApiKey = apiKey; ApiPassword = apiPassword; Domain = domain; }