<commit_before>package com.blinkbox.books.credit.admin


import org.joda.time.DateTime

case class AddCreditRequest(
  requestId: String, 
  value: BigDecimal, 
  action: Int, 
  attributes: List[CampaignAttributeRequest], 
  startDate: DateTime, 
  endDate: Option[DateTime], 
  redemptionLimit: Option[Int], 
  initialVoucherCount: Option[Int]
) {
  AddCreditRequest.this match {
    case AddCreditRequest(_, _, _, _, startDate, Some(endDate), _, _) if endDate.isBefore(startDate) =>
      throw new ConstraintViolation("endDate", "endDate must not be before startDate")
    case _ =>
  }
}
<commit_msg>added request schema<commit_after>package com.blinkbox.books.credit.admin

import org.joda.time.DateTime

case class AddCreditRequest(
  requestId: String,
  value: BigDecimal,
  reason: Reason.Reason)

object Reason extends Enumeration {
  type Reason = Value
  val GoodwillBookIssue, GoodwillTechnicalIssue, GoodwillServiceIssue, GoodwillCustomerRetention, CreditRefund, StaffCredit, CreditVoucherCode, Hudl2Promotion = Value
}

{'fraction_non_alphanumeric': 0.09082125603864734, 'fraction_numerical': 0.000966183574879227, 'mean_word_length': 5.278787878787878, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7662465', 'n_tokens_mistral': 336, 'n_tokens_neox': 313, 'n_words': 73}