Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
The safe navigator is not necessary here, as all other method
calls on `address` don't have it.
|
|
When validating addresses, it may happen that the address
has no country, so trying to fetch the country ISO raises
an unnecessary error. Using ruby safe navigation prevents
this to happen. Of course, the address will still result
invalid eventually.
|
|
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.
|
|
When calculating tax rates, the recommended endpoint from TaxJar
support for live calculations is `/v2/taxes`, the same used for
calculating order taxes, as it accounts for all factors like
sourcing or nexus, while the `/v2/rates` endpoint will return
the full combined rate for the queried location.
|
|
This helper converts a `Spree::Address` to address params that can be
used to retrieve the tax rate for that location.
|
|
`SuperGood::SolidusTaxJar.cache_key` uses different `APIParams`
methods for calculating cache keys for different models.
|
|
This module includes helper methods that can be shared among different
calculators.
|
|
|
|
Much easier to trace a request by doing this.
|
|
|
|
This will log the params sent to and responses received from TaxJar in
order to facilitate debugging production issues.
|
|
|
|
|
|
|
|
|
|
This just uses the taxable order check configuration added in the parent
commit to provide a hook to short circuit order tax checks.
|
|
This will allow apps to use properties of an order to determine whether
an order is taxable.
|
|
|
|
This is required to support per-customer exemptions through the TaxJar
API.
|
|
|
|
I have a plan for how to handle these better in v1.0 though!
|
|
|
|
|
|
If an order is adjusted to zero, we don't want to subtract the tax from
it... because that don't make no sense.
A better solution that properly factors in order level adjustments will
be coming eventually, this is just a hack to process some orders
immediately.
|
|
|
|
|
|
|
|
Necessary if you need to factor in order level adjustments (boooooo)
into your shipping amounts to make things add up correctly.
|
|
|
|
This never actually worked as expected. While imperfect, use the order
params directly will produce better results.
|
|
|
|
|
|
Some stores may want to more aggressively cache the responses,
preferring fewer requests to more accurate results.
|
|
I just like any list with more than half a dozen things to be sorted.
|
|
|
|
|
|
|
|
This sends the full list of line items in the order with their SKUs and
tax codes when creating/updating transactions in TaxJar.
|
|
|
|
From Solidus Documentation:
An order's tax_address can – through duck typing – be a
Spree::TaxLocation instead of the shipping address.
This adds a guard clause that validates if the tax_address is a
TaxLocation, in this case we know that the address is incomplete.
|
|
|
|
Solidus has deprecated the `empty?` method on
https://github.com/solidusio/solidus/pull/1686 . This adds a private
`incomplete_address?` method for avoid future problems and remove the
deprecation warning in projects that uses this gem.
|
|
|
|
|
|
|
|
|
|
|