Module: SpreeAvataxOfficial::HasUuid
- Defined in:
- app/models/spree_avatax_official/has_uuid.rb
Constant Summary collapse
- AVATAX_CODES =
{ 'LineItem' => 'LI', 'Shipment' => 'FR' }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
8 9 10 |
# File 'app/models/spree_avatax_official/has_uuid.rb', line 8 def self.included(base) base.before_create :generate_uuid end |
Instance Method Details
#avatax_number ⇒ Object
12 13 14 |
# File 'app/models/spree_avatax_official/has_uuid.rb', line 12 def avatax_number "#{AVATAX_CODES[self.class.name.demodulize]}-#{avatax_uuid}" end |