Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TaxJarTaxationGatewayMethod"/> class.
        /// </summary>
        /// <param name="taxMethod">
        /// The tax method.
        /// </param>
        /// <param name="extendedData">
        /// The extended Data collection from the provider.
        /// </param>
        public TaxJarTaxationGatewayMethod(ITaxMethod taxMethod, ExtendedDataCollection extendedData)
            : base(taxMethod)
        {
            _settings = extendedData.GetTaxJarProviderSettings();

            _taxjarService = new TaxJarTaxService(_settings);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TaxJarTaxationGatewayMethod"/> class.
        /// </summary>
        /// <param name="taxMethod">
        /// The tax method.
        /// </param>
        /// <param name="extendedData">
        /// The extended Data collection from the provider.
        /// </param>
        public TaxJarTaxationGatewayMethod(ITaxMethod taxMethod, ExtendedDataCollection extendedData) 
            : base(taxMethod)
        {
            _settings = extendedData.GetTaxJarProviderSettings();

            _taxjarService = new TaxJarTaxService(_settings);
        }
Exemple #3
0
 public TaxJarTaxService(TaxJarProviderSettings settings)
 {
     _apiToken = settings.ApiToken;
     _apiVersion = settings.ApiVersion;
 }
Exemple #4
0
 public TaxJarTaxService(TaxJarProviderSettings settings)
 {
     _apiToken   = settings.ApiToken;
     _apiVersion = settings.ApiVersion;
 }
Exemple #5
0
 /// <summary>
 /// Serializes the <see cref="TaxJarProviderSettings"/> and saves them in the extend data collection.
 /// </summary>
 /// <param name="extendedData">
 /// The extended data.
 /// </param>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public static void SaveProviderSettings(this ExtendedDataCollection extendedData, TaxJarProviderSettings settings)
 {
     extendedData.SetValue(TaxJarProviderSettings.ExtendedDataKey, JsonConvert.SerializeObject(settings));
 }