Fixed Interests

Author: Accord Project

fixed-interests@0.6.0 Clause ^0.22.0 2c614b2304db8e37bf2d409bcf6ebacf7a6106622f5d85957466f8d3f9c698e3

A Fixed Interests Loan Clause, with a monthly Payment

Download Archive Download Compiled Archive Open in Template Studio Open in VSCode Web

Fixed interests

A Fixed Interests Loan Clause, with a monthly Payment

Template Text

Fixed rate loan

This is a fixed interest loan to the amount of £100,000.00 at the yearly interest rate of 2.5% with a loan term of 15, and monthly payments of {{%I'm not sure which amount right now%}}

## Fixed rate loan

This is a _fixed interest_ loan to the amount of £100,000.00
at the yearly interest rate of 2.5%
with a loan term of 15,
and monthly payments of {{%I'm not sure which amount right now%}}
## Fixed rate loan

This is a *fixed interest* loan to the amount of {{loanAmount as "K0,0.00"}}
at the yearly interest rate of {{rate}}%
with a loan term of {{loanDuration}},
and monthly payments of {{% monthlyPaymentFormula(loanAmount,rate,loanDuration) as "K0,0.00" %}}
{
    "$class": "org.accordproject.interests.TemplateModel",
    "loanAmount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 100000,
        "currencyCode": "GBP"
    },
    "rate": 2.5,
    "loanDuration": 15,
    "clauseId": "2d4d800b-b455-4a97-8950-4ce5a475bd24",
    "$identifier": "2d4d800b-b455-4a97-8950-4ce5a475bd24"
}

Template Model

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace org.accordproject.interests

import org.accordproject.contract.* from https://models.accordproject.org/accordproject/contract.cto
import org.accordproject.runtime.* from https://models.accordproject.org/accordproject/runtime.cto
import org.accordproject.time.* from https://models.accordproject.org/time@0.2.0.cto
import org.accordproject.money.* from https://models.accordproject.org/money@0.2.0.cto

transaction Request {
  o String input
}

transaction Response {
  o String output
}

asset TemplateModel extends Clause {
  o MonetaryAmount loanAmount
  o Double rate
  o Integer loanDuration
}

concept TextResponse {
  o String text
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.runtime.State
{
    "$class": "org.accordproject.runtime.State",
    "$identifier": "7a6f90c0-a77b-11eb-9770-7ddd576a12c2"
}

Request Types

Type Sample JSON
org.accordproject.interests.Request
{
    "$class": "org.accordproject.interests.Request",
    "input": "Proident eu velit magna ex.",
    "$timestamp": "2021-04-27T13:10:34.187-04:00"
}

Response Types

Type Sample JSON
org.accordproject.interests.Response
{
    "$class": "org.accordproject.interests.Response",
    "output": "Anim Lorem quis.",
    "$timestamp": "2021-04-27T13:10:34.188-04:00"
}

Events Types

Type Sample JSON
concerto.Event
{
    "abstract": "this is an abstract type"
}

Technical Integration

Please refer to the Accord Project documentation for how to use a template or integrate it within your application.

View the Latest code for this template on GitHub.