Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Say when exemption resolution starts returning anything

Łukasz Adamczyk7f6e709ef9fd
diff --git a/spree/core/app/services/spree/tax/resolve_exemptions.rb b/spree/core/app/services/spree/tax/resolve_exemptions.rb
index 7aee20ebee..0bf90112fa 100644
--- a/spree/core/app/services/spree/tax/resolve_exemptions.rb
+++ b/spree/core/app/services/spree/tax/resolve_exemptions.rb
@@ -3,12 +3,19 @@ module Spree
# Assembles the exemption evidence for a sale, handed to the tax provider
# as +estimate+'s +exemptions:+ input.
#
- # Core resolves nothing: stock Spree stores no exemption certificates, and
- # inventing a claim would be worse than collecting tax. Merchants get
- # working exemption either from their provider's own certificate store
- # (Avalara's, for instance) or by swapping this service through
- # +Spree.tax_resolve_exemptions_service+ to read wherever their
- # certificates live.
+ # Returns nothing yet, because core has nothing to read: exemption
+ # certificates arrive with +Spree::TaxExemptionCertificate+, which is gated
+ # on the B2B Company model (docs/plans/6.0-tax-provider.md, Phase 7). This
+ # body then becomes the certificate lookup it is standing in for, and the
+ # provider contract does not change — which is the reason the seam ships
+ # first rather than alongside.
+ #
+ # Until then, exemption works two ways without core storing anything:
+ # through the provider's own certificate store (Avalara's, for instance),
+ # or by swapping this service through
+ # +Spree.tax_resolve_exemptions_service+ to read wherever the merchant's
+ # certificates already live. Inventing a claim here would be worse than
+ # collecting the tax.
class ResolveExemptions
prepend Spree::ServiceModule::Base