Skip to content
Permalink
Browse files
initial commit
  • Loading branch information
mgeiss committed Aug 21, 2017
0 parents commit 6828d67961e46261fd42b34df55fa1aae7e6fd98
Showing 64 changed files with 3,873 additions and 0 deletions.
@@ -0,0 +1,17 @@
.gradle
.idea
build/
target/
out/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

*.iml

*.log

*.toDelete
13 HEADER
@@ -0,0 +1,13 @@
Copyright ${year} ${company}.

All Rights Reserved.

NOTICE: All information contained herein is, and remains
the property of ${company} and its suppliers, if any.
The intellectual and technical concepts contained herein
are proprietary to ${company} and its suppliers and may
be covered by U.S. and Foreign Patents, patents in process,
and are protected by trade secret or copyright law.
Dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
${company}.
@@ -0,0 +1,30 @@
# Mifos I/O Deposit Account Management

[![Join the chat at https://gitter.im/mifos-initiative/mifos.io](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mifos-initiative/mifos.io?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This project provides a services to create deposit accounts, e.g. checking, savings, and shares.

## Abstract
Mifos I/O is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.

## Versioning
The version numbers follow the [Semantic Versioning](http://semver.org/) scheme.

In addition to MAJOR.MINOR.PATCH the following postfixes are used to indicate the development state.

* BUILD-SNAPSHOT - A release currently in development.
* M - A _milestone_ release include specific sets of functions and are released as soon as the functionality is complete.
* RC - A _release candidate_ is a version with potential to be a final product, considered _code complete_.
* RELEASE - _General availability_ indicates that this release is the best available version and is recommended for all usage.

The versioning layout is {MAJOR}.{MINOR}.{PATCH}-{INDICATOR}[.{PATCH}]. Only milestones and release candidates can have patch versions. Some examples:

1.2.3.BUILD-SNAPSHOT
1.3.5.M.1
1.5.7.RC.2
2.0.0.RELEASE

## License
Copyright 2017 Kuelap, Inc.

All Rights Reserved.
@@ -0,0 +1,39 @@
buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
}
}

plugins {
id "com.github.hierynomus.license" version "0.13.1"
}

apply from: '../shared.gradle'

dependencies {
compile(
[group: 'org.springframework.cloud', name: 'spring-cloud-starter-feign'],
[group: 'io.mifos.core', name: 'api', version: versions.frameworkapi],
[group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator],
[group: 'org.hibernate', name: 'hibernate-validator-annotation-processor', version: versions.validator]
)

testCompile(
[group: 'io.mifos.core', name: 'test', version: versions.frameworktest],
)
}

publishing {
publications {
api(MavenPublication) {
from components.java
groupId project.group
artifactId project.name
version project.version
}
}
}
@@ -0,0 +1 @@
rootProject.name = 'api'
@@ -0,0 +1,35 @@
/*
* Copyright 2017 Kuelap, Inc.
*
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Kuelap, Inc and its suppliers, if any.
* The intellectual and technical concepts contained herein
* are proprietary to Kuelap, Inc and its suppliers and may
* be covered by U.S. and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* Kuelap, Inc.
*/
package io.mifos.cheque.api.v1;

@SuppressWarnings("unused")
public interface EventConstants {

String DESTINATION = "cheques-v1";
String SELECTOR_NAME = "action";

String INITIALIZE = "initialize";
String SELECTOR_INITIALIZE = SELECTOR_NAME + " = '" + INITIALIZE + "'";

String ISSUE_CHEQUES = "issue-cheques";
String SELECTOR_ISSUE_CHEQUES = SELECTOR_NAME + " = '" + ISSUE_CHEQUES + "'";
String CHEQUE_TRANSACTION = "cheque-transaction";
String SELECTOR_CHEQUE_TRANSACTION = SELECTOR_NAME + " = '" + CHEQUE_TRANSACTION + "'";
String CHEQUE_TRANSACTION_APPROVED = "cheque-transaction-approved";
String SELECTOR_CHEQUE_TRANSACTION_APPROVED = SELECTOR_NAME + " = '" + CHEQUE_TRANSACTION_APPROVED + "'";
String CHEQUE_TRANSACTION_CANCELED = "cheque-transaction-canceled";
String SELECTOR_CHEQUE_TRANSACTION_CANCELED = SELECTOR_NAME + " = '" + CHEQUE_TRANSACTION_CANCELED + "'";
}
@@ -0,0 +1,22 @@
/*
* Copyright 2017 Kuelap, Inc.
*
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Kuelap, Inc and its suppliers, if any.
* The intellectual and technical concepts contained herein
* are proprietary to Kuelap, Inc and its suppliers and may
* be covered by U.S. and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* Kuelap, Inc.
*/
package io.mifos.cheque.api.v1;

@SuppressWarnings("unused")
public interface PermittableGroupIds {
String CHEQUE_MANAGEMENT = "cheques__v1__management";
String CHEQUE_TRANSACTION = "cheques__v1__transaction";
}
@@ -0,0 +1,87 @@
/*
* Copyright 2017 Kuelap, Inc.
*
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Kuelap, Inc and its suppliers, if any.
* The intellectual and technical concepts contained herein
* are proprietary to Kuelap, Inc and its suppliers and may
* be covered by U.S. and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* Kuelap, Inc.
*/
package io.mifos.cheque.api.v1.client;

import io.mifos.cheque.api.v1.domain.Cheque;
import io.mifos.cheque.api.v1.domain.ChequeProcessingCommand;
import io.mifos.cheque.api.v1.domain.ChequeTransaction;
import io.mifos.core.api.util.CustomFeignClientsConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

@SuppressWarnings("unused")
@FeignClient(value = "cheques-v1", path = "/cheques/v1", configuration = CustomFeignClientsConfiguration.class)
public interface ChequeManager {

@RequestMapping(
value = "/cheques/",
method = RequestMethod.POST,
produces = {MediaType.APPLICATION_JSON_VALUE},
consumes = {MediaType.APPLICATION_JSON_VALUE}
)
String issue(@RequestBody @Valid final IssuingCount issuingCount);

@RequestMapping(
value = "/cheques/",
method = RequestMethod.GET,
produces = {MediaType.ALL_VALUE},
consumes = {MediaType.APPLICATION_JSON_VALUE}
)
List<Cheque> fetch(@RequestParam(value = "state", required = false, defaultValue = "ALL") final String state,
@RequestParam(value = "account", required = false) final String accountIdentifier);

/**
* The identifier is created by concatenating the MICR parts with the character <code>~</code>.
* Sample:<br/>
* &nbsp;&nbsp;{cheque-no}~{branch-sort-code}~{account-no}<br/>
* &nbsp;&nbsp;246~13579~20030011<br/>
*
* @param identifier concatenated MICR
* @return
*/
@RequestMapping(
value = "/cheques/{identifier}",
method = RequestMethod.GET,
produces = {MediaType.ALL_VALUE},
consumes = {MediaType.APPLICATION_JSON_VALUE}
)
Cheque get(@PathVariable("identifier") final String identifier);

@RequestMapping(
value = "/cheques/{identifier}/commands",
method = RequestMethod.POST,
produces = {MediaType.ALL_VALUE},
consumes = {MediaType.APPLICATION_JSON_VALUE}
)
void process(@PathVariable("identifier") final String identifier,
@RequestBody @Valid final ChequeProcessingCommand chequeProcessingCommand);

@RequestMapping(
value = "/transactions/",
method = RequestMethod.POST,
produces = {MediaType.ALL_VALUE},
consumes = {MediaType.APPLICATION_JSON_VALUE}
)
void process(@RequestBody @Valid final ChequeTransaction chequeTransaction);
}
@@ -0,0 +1,56 @@
/*
* Copyright 2017 Kuelap, Inc.
*
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Kuelap, Inc and its suppliers, if any.
* The intellectual and technical concepts contained herein
* are proprietary to Kuelap, Inc and its suppliers and may
* be covered by U.S. and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* Kuelap, Inc.
*/
package io.mifos.cheque.api.v1.client;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

public class IssuingCount {

private String accountIdentifier;
private Integer start;
@NotNull
@Min(1)
private Integer amount;

public IssuingCount() {
super();
}

public String getAccountIdentifier() {
return this.accountIdentifier;
}

public void setAccountIdentifier(final String accountIdentifier) {
this.accountIdentifier = accountIdentifier;
}

public Integer getStart() {
return this.start;
}

public void setStart(final Integer start) {
this.start = start;
}

public Integer getAmount() {
return this.amount;
}

public void setAmount(final Integer amount) {
this.amount = amount;
}
}
@@ -0,0 +1,21 @@
/*
* Copyright 2017 Kuelap, Inc.
*
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Kuelap, Inc and its suppliers, if any.
* The intellectual and technical concepts contained herein
* are proprietary to Kuelap, Inc and its suppliers and may
* be covered by U.S. and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* Kuelap, Inc.
*/
package io.mifos.cheque.api.v1.domain;

public enum Action {
APPROVE,
CANCEL
}

0 comments on commit 6828d67

Please sign in to comment.