Fixed Interests

Author: Accord Project

fixed-interests@0.5.2 Clause ^0.21.4 c3e1cbda7422377423fe1e9751044e4647abdbb7df93ed44e28f2f05ed97f73d

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": "28a5f088-e16c-4557-a4ec-506a767b9d3a"
}

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.money

/**
 * Represents an amount of Cryptocurrency
 */
concept CryptoMonetaryAmount {
  o Double doubleValue
  o CryptoCurrencyCode cryptoCurrencyCode
}

/**
 * Cyptocurrency codes. From https://en.wikipedia.org/wiki/List_of_cryptocurrencies
 */
enum CryptoCurrencyCode {
  o ADA
  o BCH
  o BTC
  o DASH
  o EOS
  o ETC
  o ETH
  o LTC
  o NEO
  o XLM
  o XMR
  o XRP
  o ZEC
}

/**
 * Represents an amount of money
 */
concept MonetaryAmount {
  o Double doubleValue // convert to fixed-point?
  o CurrencyCode currencyCode
}

/**
 * ISO 4217 codes. From https://en.wikipedia.org/wiki/ISO_4217
 * https://www.currency-iso.org/en/home/tables/table-a1.html
 */
enum CurrencyCode {
o AED
o AFN
o ALL
o AMD
o ANG
o AOA
o ARS
o AUD
o AWG
o AZN
o BAM
o BBD
o BDT
o BGN
o BHD
o BIF
o BMD
o BND
o BOB
o BOV
o BRL
o BSD
o BTN
o BWP
o BYN
o BZD
o CAD
o CDF
o CHE
o CHF
o CHW
o CLF
o CLP
o CNY
o COP
o COU
o CRC
o CUC
o CUP
o CVE
o CZK
o DJF
o DKK
o DOP
o DZD
o EGP
o ERN
o ETB
o EUR
o FJD
o FKP
o GBP
o GEL
o GHS
o GIP
o GMD
o GNF
o GTQ
o GYD
o HKD
o HNL
o HRK
o HTG
o HUF
o IDR
o ILS
o INR
o IQD
o IRR
o ISK
o JMD
o JOD
o JPY
o KES
o KGS
o KHR
o KMF
o KPW
o KRW
o KWD
o KYD
o KZT
o LAK
o LBP
o LKR
o LRD
o LSL
o LYD
o MAD
o MDL
o MGA
o MKD
o MMK
o MNT
o MOP
o MRU
o MUR
o MVR
o MWK
o MXN
o MXV
o MYR
o MZN
o NAD
o NGN
o NIO
o NOK
o NPR
o NZD
o OMR
o PAB
o PEN
o PGK
o PHP
o PKR
o PLN
o PYG
o QAR
o RON
o RSD
o RUB
o RWF
o SAR
o SBD
o SCR
o SDG
o SEK
o SGD
o SHP
o SLL
o SOS
o SRD
o SSP
o STN
o SVC
o SYP
o SZL
o THB
o TJS
o TMT
o TND
o TOP
o TRY
o TTD
o TWD
o TZS
o UAH
o UGX
o USD
o USN
o UYI
o UYU
o UZS
o VEF
o VND
o VUV
o WST
o XAF
o XAG
o XAU
o XBA
o XBB
o XBC
o XBD
o XCD
o XDR
o XOF
o XPD
o XPF
o XPT
o XSU
o XTS
o XUA
o XXX
o YER
o ZAR
o ZMW
o ZWL
}

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": "a766aa70-f810-11ea-a002-4de7db836bda"
}

Request Types

Type Sample JSON
org.accordproject.interests.Request
{
    "$class": "org.accordproject.interests.Request",
    "input": "Irure proident in fugiat.",
    "transactionId": "a7663540-f810-11ea-a002-4de7db836bda",
    "timestamp": "2020-09-16T12:34:59.988+01:00"
}

Response Types

Type Sample JSON
org.accordproject.interests.Response
{
    "$class": "org.accordproject.interests.Response",
    "output": "Tempor proident do tempor.",
    "transactionId": "a7668360-f810-11ea-a002-4de7db836bda",
    "timestamp": "2020-09-16T12:34:59.990+01: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.