summaryrefslogtreecommitdiff
path: root/lib/super_good/solidus_taxjar.rb
AgeCommit message (Collapse)Author
2021-03-17Rename classes that have API in their name to ApiAdnan Abdulally
This done so Zeitwerk can correctly can correctly load the class from the filename. Co-authored-by: Nick Van Doorn <nick@super.gd>
2021-03-17Rename module SolidusTaxJar to SolidusTaxjarAdnan Abdulally
In order for the Zeitwerk loader to properly identity our classes from the file names, we should remove camel casing from this name that isn't consistent with underscores in the file name itself. Co-authored-by: Nick Van Doorn <nick@super.gd>
2020-07-14Add convenient class for normalizing addressesJared Norman
2020-07-14Refactor API class instantiationJared Norman
This is used by any class that interacts with the TaxJar API and is meant to be able to be consumed by applications for custom needs, so let's just make it exposed at the top level.
2020-07-14Run project through standardrbJared Norman
2020-02-03Add support for modifying order paramsJared Norman
2020-01-14Add tax rate calculator classandrea longhi
This new calculator allows to retrieve tax rate information starting from a `Spree::Address` model. It shares some logic with the tax calculator, for example the ability to handle exceptions using `SolidusTaxJar.exception_handler` lambda.
2020-01-14Add generic default cache_key procandrea longhi
`SuperGood::SolidusTaxJar.cache_key` uses different `APIParams` methods for calculating cache keys for different models.
2020-01-14Add CalculatorHelper for sharing logicandrea longhi
This module includes helper methods that can be shared among different calculators.
2019-06-25Add option to control logging behaviourJared Norman
2019-06-25Make cache key a stringJared Norman
2019-05-28Add configuration option for order tax checkJared Norman
This will allow apps to use properties of an order to determine whether an order is taxable.
2019-04-05Make shipping amount calculator configurableJared Norman
Necessary if you need to factor in order level adjustments (boooooo) into your shipping amounts to make things add up correctly.
2019-03-24Remove cache key hackJared Norman
This never actually worked as expected. While imperfect, use the order params directly will produce better results.
2019-03-24Make cache duration configurableJared Norman
2019-03-24Make cache key configurableJared Norman
Some stores may want to more aggressively cache the responses, preferring fewer requests to more accurate results.
2019-03-24Sort config optionsJared Norman
I just like any list with more than half a dozen things to be sorted.
2019-02-06Provide Spree line items to label makerv0.6.0Jared Norman
2019-02-05Make labels customizable.Jared Norman
2019-02-05Make shipping tax label configurableJared Norman
2019-02-05Introduce configurable taxable address checkv0.5.0Jared Norman
2019-02-05Move exception handler configurationJared Norman
2019-01-30Integrate APIParams classJared Norman
This removes the logic from the API class and moves all the calls to the order_params method to our new module.
2019-01-28Add test mode for disabling calculatorJared Norman
2019-01-28Add configuration for discount calculatorJared Norman
This allows stores to specify their own discount calculator in an initializer, by doing something like the following: SuperGood::SolidusTaxJar.discount_calculator = MyStore::CustomDiscountCalculator The class's constructor should take in a line item and have a #discount method that returns the discount amount (which should be a negative number.)
2019-01-09Communicate with TaxJar APIJared Norman
This allows us to calculate the tax for a Solidus order using the TaxJar API. It's currently hardcoded to use the sandbox, and provides no caching.
2019-01-08Add dummy calculatorJared Norman
This implements the interface required by Solidus, however it currently just reports no taxes.
2018-12-30Define namespaces before requiring other filesJared Norman
2018-12-30Start requiring things we needJared Norman
2018-12-30Initial commitJared Norman