From 1dfc8a9efaf95e3f179efae0eaad8d78cb935722 Mon Sep 17 00:00:00 2001 From: David McNally Date: Mon, 8 May 2017 11:24:33 +0100 Subject: [PATCH 1/2] Added TaxCode --- app/models/tax_code.rb | 6 ++++++ lib/flex_commerce.rb | 1 + lib/flex_commerce_api/api_base.rb | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 app/models/tax_code.rb diff --git a/app/models/tax_code.rb b/app/models/tax_code.rb new file mode 100644 index 0000000..612df29 --- /dev/null +++ b/app/models/tax_code.rb @@ -0,0 +1,6 @@ +require "flex_commerce_api/api_base" + +module FlexCommerce + class TaxCode < FlexCommerceApi::ApiBase + end +end diff --git a/lib/flex_commerce.rb b/lib/flex_commerce.rb index ef89632..6393902 100644 --- a/lib/flex_commerce.rb +++ b/lib/flex_commerce.rb @@ -78,6 +78,7 @@ def self.gem_root autoload :PasswordRecovery, File.join(gem_root, "app", "models", "password_recovery") autoload :Slug, File.join(gem_root, "app", "models", "slug") autoload :ExternalUrl, File.join(gem_root, "app", "models", "external_url") + autoload :TaxCode, File.join(gem_root, "app", "models", "tax_code") # Services autoload :ParamToShql, File.join(gem_root, "app", "services", "param_to_shql") diff --git a/lib/flex_commerce_api/api_base.rb b/lib/flex_commerce_api/api_base.rb index 2998b8c..32e6288 100644 --- a/lib/flex_commerce_api/api_base.rb +++ b/lib/flex_commerce_api/api_base.rb @@ -101,7 +101,7 @@ def reconfigure_all options = {} def reconfigure options = {} self.site = FlexCommerceApi.config.api_base_url base_options = { - adapter: FlexCommerceApi.config.adapter || :net_http, + adapter: :net_http, http_cache: FlexCommerceApi.config.http_cache, timeout: FlexCommerceApi.config.timeout, open_timeout: FlexCommerceApi.config.open_timeout From aecd9639775a079288a0ae43caf89f2d33403c2c Mon Sep 17 00:00:00 2001 From: David McNally Date: Mon, 8 May 2017 11:25:50 +0100 Subject: [PATCH 2/2] Reverted change --- lib/flex_commerce_api/api_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flex_commerce_api/api_base.rb b/lib/flex_commerce_api/api_base.rb index 32e6288..2998b8c 100644 --- a/lib/flex_commerce_api/api_base.rb +++ b/lib/flex_commerce_api/api_base.rb @@ -101,7 +101,7 @@ def reconfigure_all options = {} def reconfigure options = {} self.site = FlexCommerceApi.config.api_base_url base_options = { - adapter: :net_http, + adapter: FlexCommerceApi.config.adapter || :net_http, http_cache: FlexCommerceApi.config.http_cache, timeout: FlexCommerceApi.config.timeout, open_timeout: FlexCommerceApi.config.open_timeout