summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-30Add support for deleting order transactionsJared Norman
2019-01-30Add support for updating order transactionsJared Norman
2019-01-30Add ability to create order transactionsJared Norman
2019-01-30Extract address lookup params as wellJared 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-30Introduce class to handle param generationJared Norman
This leaves the API class to just be resonsible for calling the right methods on the TaxJar gem.
2019-01-28Bump to v0.3.0v0.3.0Jared Norman
2019-01-28Add test mode for disabling calculatorJared Norman
2019-01-28Use DiscountCalculator and fix duplicationJared Norman
There's no reason for both the TaxCalculator and the API to have nearly the same logic... so I unified that while was in there.
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-28Introduce DiscountCalculatorJared Norman
This extracts the functionality of calculating the discount for a line item in the interest of making this behaviour configurable for stores that would like to factor in order level adjustments in some way.
2019-01-28Use correct value in cache keyJared Norman
2019-01-27Bump to v0.2.0v0.2.0Jared Norman
2019-01-23Bump versionv0.1.3Jared Norman
2019-01-23Handle situation where there are no line itemsJared Norman
TaxJar API is not keen on orders with no line items and will throw errors.
2019-01-23Add support for fetching tax rates by locationJared Norman
2019-01-22Bump versionv0.1.2Jared Norman
2019-01-22Use promo total instead of adjustment totalJared Norman
2019-01-22Bump versionv0.1.1Jared Norman
2019-01-22Make API URL configurableJared Norman
2019-01-21Add warning to top of READMEJared Norman
2019-01-21Correct typo in READMEv0.1.0Jared Norman
2019-01-21Handle errors gracefullyJared Norman
2019-01-21Cache requests for ten minutesJared Norman
2019-01-20Don't send amountJared Norman
It's not necessary because we're sending line items.
2019-01-20Use correctly value for shipping taxJared Norman
Oops, was grabbing the total shipping tax for the order and using that as the tax, instead of grabbing the collectable tax from the breakdown. That makes more sense.
2019-01-20Use more correct test dataJared Norman
2019-01-20Improve tax handlingJared Norman
This is partially a refactor, and also handles the unlikely scenario where there is a shipping tax, but no breakdown.
2019-01-18Support shipping taxesJared Norman
2019-01-10Flesh out Calculator behaviourJared Norman
This adds the functionality to the calculator required to map per line item taxes coming from the TaxJar API to the taxes required for each line item in an order. The calculator does not yet support shipping taxes.
2019-01-10Use tax_address rather than ship_addressJared Norman
2019-01-10Add RAILS_VERSION to Travis configJared Norman
2019-01-10Add Gemfile hackJared Norman
Unfortunately bundler (1.x and 2.x) seems to be horrible at resolving the dependencies here. I chatted with someone who knows a fair bit more than me about how bundler's algorithm works, and he suggested that the issue was that it was having trouble locking down to a specific Rails version. This allows us to specify the Rails version we want ("~> 5.1.0" does the trick) which causes bundler to not struggle for 15 minutes to resolve dependencies anymore.
2019-01-09Fix TravisJared Norman
2019-01-09Update README.mdJared Norman
2019-01-09Update README.mdJared Norman
2019-01-09Rename methodJared Norman
2019-01-09Fix stale class name referenceJared Norman
I renamed this class to be less confusing.
2019-01-09Fix spec issuesJared Norman
Because I hadn't set up database cleaner, there was some junk in my local test database that was causing tests to pass.
2019-01-09Use DatabaseCleaner to keep the database cleanJared Norman
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-09Use pry for consoleJared Norman
2019-01-08Add dummy calculatorJared Norman
This implements the interface required by Solidus, however it currently just reports no taxes.
2019-01-08Setup up environment betterJared Norman
Just load the dummy app environment instead of explicitly requiring things.
2019-01-08Remove FactoryBotJared Norman
We don't really need it. Let's keep things simple.
2019-01-08Add factory_bot_railsJared Norman
Also alphabetize things, because who doesn't love the alphabet, you know?
2019-01-08Correct version specificationJared Norman
Let's leave it open ended, and also require the version of Solidus that introduced the configurable tax interface that this extension relies on.
2018-12-30Require dummy app into test environmentJared Norman
2018-12-30Add more useful development dependenciesJared Norman
2018-12-30Bring in everyone's favourite RSpec optionsJared Norman