From 2e37b40e08cc4f2dcb31bf0bb3c41fb213669065 Mon Sep 17 00:00:00 2001 From: Jared Norman Date: Mon, 3 Feb 2020 21:16:45 -0800 Subject: Add support for modifying order params --- lib/super_good/solidus_taxjar.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/super_good/solidus_taxjar.rb') diff --git a/lib/super_good/solidus_taxjar.rb b/lib/super_good/solidus_taxjar.rb index 1b1a4ac..2c47dda 100644 --- a/lib/super_good/solidus_taxjar.rb +++ b/lib/super_good/solidus_taxjar.rb @@ -15,6 +15,7 @@ module SuperGood class << self attr_accessor :cache_duration attr_accessor :cache_key + attr_accessor :custom_order_params attr_accessor :discount_calculator attr_accessor :exception_handler attr_accessor :line_item_tax_label_maker @@ -31,6 +32,7 @@ module SuperGood record_type = record.class.name.demodulize.underscore APIParams.send("#{record_type}_params", record).to_json } + self.custom_order_params = ->(order) { {} } self.discount_calculator = ::SuperGood::SolidusTaxJar::DiscountCalculator self.exception_handler = ->(e) { Rails.logger.error "An error occurred while fetching TaxJar tax rates - #{e}: #{e.message}" -- cgit v1.2.3