rewrite monthly_usage algorithm, using transcripts not tasks. transcripts are authoritative for purposes of billing. see #640 and #633
add "cost" column to monthly_usages
memoize: cache basic and premium objects since it is a class method
show cost on monthly usage
introduce concept of "billable_to" with methods on collection and audio_file (the latter delegates to the former). the idea here is to delineate authz (collection_grants) from billable objects, so that all transcripts wind their way up to exactly one billable subscription plan instance, based (currently) on the collection ownership
refactor, moving cost calculation onto the transcript object
show billable_to on collection profile
step 1 of N: delineate user.monthly_usages from org.monthly_usages
add explicit :owner role for Collections, to which an Organization or User can be assigned. ColllectionGrant is used only for authorization; billing is explicitly tracked via owner role
rewrite monthly_usage algorithm, using transcripts not tasks. transcripts are authoritative for purposes of billing. see #640 and #633
add "cost" column to monthly_usages
memoize: cache basic and premium objects since it is a class method
show cost on monthly usage
introduce concept of "billable_to" with methods on collection and audio_file (the latter delegates to the former). the idea here is to delineate authz (collection_grants) from billable objects, so that all transcripts wind their way up to exactly one billable subscription plan instance, based (currently) on the collection ownership
refactor, moving cost calculation onto the transcript object
show billable_to on collection profile
step 1 of N: delineate user.monthly_usages from org.monthly_usages
add explicit :owner role for Collections, to which an Organization or User can be assigned. ColllectionGrant is used only for authorization; billing is explicitly tracked via owner role
typo
fix spec test to reflect new usage calculation