Fixed Interests Static

Author: Accord Project

fixed-interests-static@0.3.1 Clause ^0.20.10 1be488ceac5e27c5796d0a276731b0863ccb6db190e2e12358834b6d083ca234

A Fixed Interests Loan Clause, with a monthly Payment (static)

Download Archive Open in Template Studio

Fixed interests (Static Version)

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 USD at the yearly interest rate of 2.5% with a loan term of 15, and monthly payments of 667.00 USD

## Fixed rate loan

This is a _fixed interest_ loan to the amount of 100,000.00 USD
at the yearly interest rate of 2.5%
with a loan term of 15,
and monthly payments of 667.00 USD
Fixed rate loan
----

This is a *fixed interest* loan to the amount of {{loanAmount as "0,0.00 CCC"}}
at the yearly interest rate of {{rate}}%
with a loan term of {{loanDuration}},
and monthly payments of {{monthlyPayment as "0,0.00 CCC"}}
{
    "$class": "org.accordproject.interests.TemplateModel",
    "clauseId": "feb32fa3-e979-4ef4-ac42-db25ee56a8a0",
    "loanAmount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 100000,
        "currencyCode": "USD"
    },
    "rate": 2.5,
    "loanDuration": 15,
    "monthlyPayment": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 667,
        "currencyCode": "USD"
    }
}

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.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.cicero.runtime.* from https://models.accordproject.org/cicero/runtime.cto
import org.accordproject.time.* from https://models.accordproject.org/v2.0/time.cto
import org.accordproject.money.* from https://models.accordproject.org/money.cto

transaction Request {
  o String input
}

transaction Response {
  o String output
}

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

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.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "dd0d3991-7b6b-11ea-b280-c173749a9e96"
}

Request Types

Type Sample JSON
org.accordproject.interests.Request
{
    "$class": "org.accordproject.interests.Request",
    "input": "Voluptate ullamco eiusmod.",
    "transactionId": "dd0d1280-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:42:58.857-04:00"
}

Response Types

Type Sample JSON
org.accordproject.interests.Response
{
    "$class": "org.accordproject.interests.Response",
    "output": "Anim commodo irure.",
    "transactionId": "dd0d3990-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:42:58.857-04:00"
}

Events Types

Type Sample JSON
org.accordproject.base.Event
{
    "abstract": "this is an abstract type"
}

Technical Integration

Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.

View the Latest code for this template on GitHub.