diff options
Diffstat (limited to 'lib/super_good/solidus_taxjar/api.rb')
-rw-r--r-- | lib/super_good/solidus_taxjar/api.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/super_good/solidus_taxjar/api.rb b/lib/super_good/solidus_taxjar/api.rb index c9cc99f..ca6ff6c 100644 --- a/lib/super_good/solidus_taxjar/api.rb +++ b/lib/super_good/solidus_taxjar/api.rb @@ -1,6 +1,6 @@ module SuperGood module SolidusTaxjar - class API + class Api def self.default_taxjar_client ::Taxjar::Client.new( api_key: ENV.fetch("TAXJAR_API_KEY"), @@ -16,7 +16,7 @@ module SuperGood end def tax_for(order) - taxjar_client.tax_for_order(APIParams.order_params(order)).tap do |taxes| + taxjar_client.tax_for_order(ApiParams.order_params(order)).tap do |taxes| next unless SuperGood::SolidusTaxjar.logging_enabled Rails.logger.info( @@ -26,19 +26,19 @@ module SuperGood end def tax_rate_for(address) - taxjar_client.tax_for_order(APIParams.tax_rate_address_params(address)).rate + taxjar_client.tax_for_order(ApiParams.tax_rate_address_params(address)).rate end def tax_rates_for(address) - taxjar_client.rates_for_location(*APIParams.address_params(address)) + taxjar_client.rates_for_location(*ApiParams.address_params(address)) end def create_transaction_for(order) - taxjar_client.create_order APIParams.transaction_params(order) + taxjar_client.create_order ApiParams.transaction_params(order) end def update_transaction_for(order) - taxjar_client.update_order APIParams.transaction_params(order) + taxjar_client.update_order ApiParams.transaction_params(order) end def delete_transaction_for(order) @@ -46,11 +46,11 @@ module SuperGood end def create_refund_for(reimbursement) - taxjar_client.create_refund APIParams.refund_params(reimbursement) + taxjar_client.create_refund ApiParams.refund_params(reimbursement) end def validate_spree_address(spree_address) - taxjar_client.validate_address APIParams.validate_address_params(spree_address) + taxjar_client.validate_address ApiParams.validate_address_params(spree_address) end private |