Skip to content
Permalink
Browse files
Document the Teller API
  • Loading branch information
Izakey committed Apr 23, 2018
1 parent 3e65a07 commit 778b0f1e3b9fe4bfa11ac8d07fb815c0344e9558
Showing 77 changed files with 4,202 additions and 0 deletions.
@@ -26,6 +26,7 @@ buildscript {

dependencies {
classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
}
}

@@ -36,6 +37,7 @@ plugins {

apply from: '../shared.gradle'

apply plugin: 'org.asciidoctor.convert'
apply plugin: 'spring-boot'

springBoot {
@@ -64,6 +66,24 @@ dependencies {
[group: 'org.apache.fineract.cn', name: 'crypto', version: versions.frameworkcrypto],
[group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator]
)
testCompile(
[group: 'org.apache.fineract.cn.teller', name: 'api', version: project.version],
[group: 'org.apache.fineract.cn.anubis', name: 'test', version: versions.frameworkanubis],
[group: 'org.apache.fineract.cn', name: 'api', version: versions.frameworkapi],
[group: 'org.apache.fineract.cn', name: 'test', version: versions.frameworktest],
[group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
[group: 'org.springframework.boot', name: 'spring-boot-starter-test'],
[group: 'org.springframework.restdocs', name: 'spring-restdocs-mockmvc'],
[group: 'junit', name: 'junit', version: '4.12']
)
}

asciidoctor {
sourceDir 'src/doc/asciidoc/'
outputDir 'src/doc/html5'
options backend: "html", doctype: "book"
attributes "source-highlighter": "highlightjs", \
'snippets': file('src/doc/generated-snippets/')
}

publishToMavenLocal.dependsOn bootRepackage
@@ -0,0 +1,244 @@
== Apache Fineract CN Teller Management API Documentation ==

== Tellers ==

==== Create A Teller ====

.curl-request
include::{snippets}/test-teller-management/should-create-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-create-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-create-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-create-teller/httpie-request.adoc[]

==== Create Teller ====

.curl-request
include::{snippets}/test-teller-management/should-create-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-create-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-create-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-create-teller/httpie-request.adoc[]

==== Find A Teller ====

.curl-request
include::{snippets}/test-teller-management/should-find-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-find-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-find-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-find-teller/httpie-request.adoc[]

==== Fetch A Teller ====

.curl-request
include::{snippets}/test-teller-management/should-fetch-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-fetch-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-fetch-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-fetch-teller/httpie-request.adoc[]

==== Open A Teller ====

.curl-request
include::{snippets}/test-teller-management/should-open-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-open-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-open-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-open-teller/httpie-request.adoc[]

==== Close A Teller ====

.curl-request
include::{snippets}/test-teller-management/should-close-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-close-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-close-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-close-teller/httpie-request.adoc[]

==== Update A Teller ====

.curl-request
include::{snippets}/test-teller-management/should-update-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-update-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-update-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-update-teller/httpie-request.adoc[]

==== Delete A Teller ====

.curl-request
include::{snippets}/test-teller-management/should-delete-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-teller-management/should-delete-teller/http-request.adoc[]

.http-response
include::{snippets}/test-teller-management/should-delete-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-teller-management/should-delete-teller/httpie-request.adoc[]

== Teller Operations ==

==== Unlock Drawer ====

.curl-request
include::{snippets}/test-operation-management/should-unlock/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-unlock/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-unlock/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-unlock/httpie-request.adoc[]

==== Open Account ====

.curl-request
include::{snippets}/test-operation-management/should-open-account/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-open-account/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-open-account/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-open-account/httpie-request.adoc[]

==== Deposit ====

.curl-request
include::{snippets}/test-operation-management/should-deposit/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-deposit/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-deposit/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-deposit/httpie-request.adoc[]

==== Withdraw ====

.curl-request
include::{snippets}/test-operation-management/should-withdraw/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-withdraw/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-withdraw/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-withdraw/httpie-request.adoc[]

==== Transfer ====

.curl-request
include::{snippets}/test-operation-management/should-transfer-account-to-account/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-transfer-account-to-account/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-transfer-account-to-account/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-transfer-account-to-account/httpie-request.adoc[]

==== Process Cheque ====

.curl-request
include::{snippets}/test-operation-management/should-process-cheque/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-process-cheque/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-process-cheque/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-process-cheque/httpie-request.adoc[]

==== Process Repayment ====

.curl-request
include::{snippets}/test-operation-management/should-process-repayment/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-process-repayment/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-process-repayment/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-process-repayment/httpie-request.adoc[]

==== Close Account ====

.curl-request
include::{snippets}/test-operation-management/should-close-account/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-close-account/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-close-account/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-close-account/httpie-request.adoc[]

==== Pause Teller ====

.curl-request
include::{snippets}/test-operation-management/should-pause-teller/curl-request.adoc[]

.http-request
include::{snippets}/test-operation-management/should-pause-teller/http-request.adoc[]

.http-response
include::{snippets}/test-operation-management/should-pause-teller/http-response.adoc[]

.httpie-request
include::{snippets}/test-operation-management/should-pause-teller/httpie-request.adoc[]

@@ -0,0 +1,4 @@
[source,bash]
----
$ curl 'http://localhost:8080/teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d 'sROdHiJEPhkxqDECxLbzVfq37C06mP35 Closed'
----
@@ -0,0 +1,10 @@
[source,http,options="nowrap"]
----
POST /teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/ HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 39
sROdHiJEPhkxqDECxLbzVfq37C06mP35 Closed
----
@@ -0,0 +1,5 @@
[source,http,options="nowrap"]
----
HTTP/1.1 404 Not Found
----
@@ -0,0 +1,4 @@
[source,bash]
----
$ echo 'sROdHiJEPhkxqDECxLbzVfq37C06mP35 Closed' | http POST 'http://localhost:8080/teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/' 'Accept:application/json' 'Content-Type:application/json'
----
@@ -0,0 +1,4 @@
[source,bash]
----
$ curl 'http://localhost:8080/teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/transactions/' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d 'sROdHiJEPhkxqDECxLbzVfq37C06mP35 Deposited'
----
@@ -0,0 +1,10 @@
[source,http,options="nowrap"]
----
POST /teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/transactions/ HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 42
sROdHiJEPhkxqDECxLbzVfq37C06mP35 Deposited
----
@@ -0,0 +1,5 @@
[source,http,options="nowrap"]
----
HTTP/1.1 404 Not Found
----
@@ -0,0 +1,4 @@
[source,bash]
----
$ echo 'sROdHiJEPhkxqDECxLbzVfq37C06mP35 Deposited' | http POST 'http://localhost:8080/teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/transactions/' 'Content-Type:application/json' 'Accept:application/json'
----
@@ -0,0 +1,4 @@
[source,bash]
----
$ curl 'http://localhost:8080/teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d 'sROdHiJEPhkxqDECxLbzVfq37C06mP35 Open'
----
@@ -0,0 +1,10 @@
[source,http,options="nowrap"]
----
POST /teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/ HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 37
sROdHiJEPhkxqDECxLbzVfq37C06mP35 Open
----
@@ -0,0 +1,5 @@
[source,http,options="nowrap"]
----
HTTP/1.1 404 Not Found
----
@@ -0,0 +1,4 @@
[source,bash]
----
$ echo 'sROdHiJEPhkxqDECxLbzVfq37C06mP35 Open' | http POST 'http://localhost:8080/teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/' 'Accept:application/json' 'Content-Type:application/json'
----
@@ -0,0 +1,4 @@
[source,bash]
----
$ curl 'http://localhost:8080/teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d 'sROdHiJEPhkxqDECxLbzVfq37C06mP35 Paused'
----
@@ -0,0 +1,10 @@
[source,http,options="nowrap"]
----
POST /teller/v1/teller/sROdHiJEPhkxqDECxLbzVfq37C06mP35/ HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 39
sROdHiJEPhkxqDECxLbzVfq37C06mP35 Paused
----

0 comments on commit 778b0f1

Please sign in to comment.