Class: UsageMeter::Customer
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- UsageMeter::Customer
- Defined in:
- app/models/usage_meter/customer.rb
Overview
UsageMeter Customer model A customer in an enttity who's usage is being metered. This is typically a Tenant Organization, or User.
UsageMeter tracks it's own customers to ensure consistency and integrity of usage data. Each customer will have a unique composite key of external_type and external_identifier. Usage data is then associated with these customers, with foreign keys referencing the to ensure referential integrity.
Once created, records are readonly by design to prevent tampering with historical usage data.
Instance Method Summary collapse
Instance Method Details
#readonly? ⇒ Boolean
20 21 22 |
# File 'app/models/usage_meter/customer.rb', line 20 def readonly? persisted? end |