<commit_before>`import DS from 'ember-data'`

Invoice = DS.Model.extend
  user : DS.belongsTo 'user', inverse: 'invoices'
  amount: DS.attr 'string'
  paidOn: DS.attr 'date'
  source: DS.attr 'number'
  pricing: DS.belongsTo 'pricing', inverse:'invoices'

`export default Invoice`<commit_msg>enhance: compute source type<commit_after>`import DS from 'ember-data'`
`import ENUMS from 'irene/enums'`

Invoice = DS.Model.extend
  user : DS.belongsTo 'user', inverse: 'invoices'
  amount: DS.attr 'string'
  paidOn: DS.attr 'date'
  source: DS.attr 'number'
  pricing: DS.belongsTo 'pricing', inverse:'invoices'

  sourceType: (->
    switch @get "source"
      when ENUMS.PAYMENT_SOURCE.PAYPAL then "paypal"
      when ENUMS.PAYMENT_SOURCE.STRIPE_MANUAL then "stripeManual"
      when ENUMS.PAYMENT_SOURCE.BANK_TRANSFER then "bankTransfer"
      when ENUMS.PAYMENT_SOURCE.MANUAL then "manual"
      when ENUMS.PAYMENT_SOURCE.STRIPE_RECURRING then "stripeRecurring"
      else "none"
  ).property "source"

`export default Invoice`
{'fraction_non_alphanumeric': 0.11781888997078871, 'fraction_numerical': 0.0, 'mean_word_length': 4.382198952879581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6686006', 'n_tokens_mistral': 380, 'n_tokens_neox': 373, 'n_words': 88}