namespace org.accordproject.volumediscount

import org.accordproject.contract.* from https://models.accordproject.org/accordproject/contract.cto
import org.accordproject.runtime.* from https://models.accordproject.org/accordproject/runtime.cto

/**
 * Defines the data model for the VolumeDiscount template.
 * This defines the structure of the abstract syntax tree that the parser for the template
 * must generate from input source text.
 */
asset TemplateModel extends Clause {
  /**
   * First volume
   */
  o Double firstVolume

  /**
   * Second volume
   */
  o Double secondVolume

  /**
   * First rate
   */
  o Double firstRate

  /**
   * Second rate
   */
  o Double secondRate

  /**
   * Third rate
   */
  o Double thirdRate

}

/**
 * Defines the input data required by the template
 */
transaction VolumeDiscountRequest extends Request {

  /**
   * 
   */
  o Double netAnnualChargeVolume

}

/**
 * Defines the output data for the template
 */
transaction VolumeDiscountResponse extends Response {
  /**
   * The discount rate
   */
  o Double discountRate
}