Exemplo n.º 1
0
        /// <summary>
        /// Creates an instance of OmniKassa
        /// </summary>
        /// <param name="environment">Environment to use</param>
        /// <param name="signingKey">Signing key from the OmniKassa Dashboar</param>
        /// <param name="token">Refresh token from the OmniKassa Dashboard</param>
        /// <returns></returns>
        public static Endpoint Create(Environment environment, String signingKey, String token)
        {
            TokenProvider tokenProvider = new InMemoryTokenProvider(token);
            String        baseUrl       = EnvironmentHelper.GetUrl(environment);

            return(Create(baseUrl, signingKey, tokenProvider));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates an instance of OmniKassa
        /// </summary>
        /// <param name="baseURL">Base URL for the API</param>
        /// <param name="signingKey">Signing key from the OmniKassa Dashboard</param>
        /// <param name="token">Refresh token from the OmniKassa Dashboard</param>
        /// <returns>OmniKassa instance</returns>
        public static Endpoint Create(String baseURL, String signingKey, String token)
        {
            TokenProvider tokenProvider = new InMemoryTokenProvider(token);

            return(Create(baseURL, signingKey, tokenProvider));
        }