Initial Swagger related changes from GSOC 2019 contrib (FINERACT-733)
This commit does not yet provide the full Swagger requirement, as was outlined in FINERACT-733, but it's a first step forming the basis of more to come (hopefully). Here's the original PR description (but note that some of this is about to be reverted in the next commit): Reflected all API descriptions on swagger UI. Formatted API descriptions. Added swagger docs for new APIs. Added swagger-gradle-plugin for automatic save of json during build. Leveraged swagger codegen for generation of language-specific libraries using gradle-swagger-generator plugin.
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
b0dce97b82
commit
e424471162
@@ -43,9 +43,12 @@ buildscript {
|
||||
classpath 'com.radcortez.gradle:openjpa-gradle-plugin:3.1.0'
|
||||
classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.2'
|
||||
classpath "com.github.spotbugs:spotbugs-gradle-plugin:2.0.1"
|
||||
//Use Guava version 23+ as a workaround to spotbug intergration.
|
||||
//Use Guava version 23+ as a workaround to spotbug intergration.
|
||||
// See: https://github.com/spotbugs/spotbugs-gradle-plugin/issues/128#issuecomment-535864882
|
||||
classpath 'com.google.guava:guava:28.1-jre'
|
||||
classpath 'com.google.guava:guava:28.1-jre'
|
||||
|
||||
classpath "io.swagger.core.v3:swagger-gradle-plugin:2.0.8"
|
||||
classpath "gradle.plugin.org.hidetake:gradle-swagger-generator-plugin:2.18.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +62,8 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'com.bmuschko.tomcat'
|
||||
apply plugin: 'project-report'
|
||||
apply plugin: 'java'
|
||||
apply plugin: "org.hidetake.swagger.generator"
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'openjpa'
|
||||
apply plugin: "com.github.spotbugs"
|
||||
@@ -69,7 +74,7 @@ dependencyManagement {
|
||||
imports {
|
||||
mavenBom 'org.springframework:spring-framework-bom:5.1.10.RELEASE'
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
dependency 'org.springframework.security.oauth:spring-security-oauth2:2.3.6.RELEASE'
|
||||
dependency 'org.apache.openjpa:openjpa:3.1.0'
|
||||
@@ -207,6 +212,7 @@ rat {
|
||||
'**/docs/system-architecture/**/*.xml',
|
||||
'**/bootstrap-3.0.0/assets/application.js',
|
||||
'**/system-architecture/js/plugins.js',
|
||||
'**/docs/interoperation/specification/json/*.json',
|
||||
|
||||
//Apache License
|
||||
'**/bootstrap-3.0.0/assets/less.js',
|
||||
@@ -529,3 +535,30 @@ tasks.withType(SpotBugsTask) {
|
||||
reports.html.enabled = true
|
||||
reportLevel = "high"
|
||||
}
|
||||
|
||||
// This is to save json file at build time
|
||||
resolve {
|
||||
outputFileName = 'response.json'
|
||||
outputFormat = 'JSON'
|
||||
prettyPrint = 'TRUE'
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
resourcePackages = ['org.apache.fineract']
|
||||
outputPath = '/src/main/resources/swagger-ui/response.json'
|
||||
}
|
||||
|
||||
//This is for code and swagger UI generation
|
||||
dependencies {
|
||||
swaggerCodegen 'io.swagger:swagger-codegen-cli:2.4.2' // Swagger Codegen V2
|
||||
swaggerCodegen 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.5' // or Swagger Codegen V3
|
||||
swaggerCodegen 'org.openapitools:openapi-generator-cli:3.3.4' // or OpenAPI Generator
|
||||
swaggerUI 'org.webjars:swagger-ui:3.10.0'
|
||||
}
|
||||
|
||||
swaggerSources {
|
||||
fineract {
|
||||
inputFile = file('src/main/resources/swagger-ui/response.json')
|
||||
code {
|
||||
language = 'java'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -40,9 +40,8 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Periodic Accrual Accounting"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Periodic Accrual Accounting", description = "Periodic Accrual is to accrue the loan income till the specific date or till batch job scheduled time.\n\n")
|
||||
@Tag(name = "Periodic Accrual Accounting", description = "Periodic Accrual is to accrue the loan income till the specific date or till batch job scheduled time.\n")
|
||||
})
|
||||
|
||||
public class AccrualAccountingApiResource {
|
||||
|
||||
private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
|
||||
|
||||
+1
-2
@@ -57,9 +57,8 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Accounting Closure"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Accounting Closure", description = "An accounting closure indicates that no more journal entries may be logged (or reversed) in the system, either manually or via the portfolio with an entry date prior to the defined closure date\\n\" + \"\\n\" + \"Field Descriptions\\n\" + \"closingDate\\n\" + \"The date for which the accounting closure is defined\\n\" + \"officeId\\n\" + \"The identifer of the branch for which accounting has been closed\\n\" + \"comments\\n\" + \"Description associated with an Accounting closure")
|
||||
@Tag(name = "Accounting Closure", description = "An accounting closure indicates that no more journal entries may be logged (or reversed) in the system, either manually or via the portfolio with an entry date prior to the defined closure date\n" + "\n" + "Field Descriptions\n" + "closingDate\n" + "The date for which the accounting closure is defined\n" + "officeId\n" + "The identifer of the branch for which accounting has been closed\n" + "comments\n" + "Description associated with an Accounting closure")
|
||||
})
|
||||
|
||||
public class GLClosuresApiResource {
|
||||
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "officeId", "officeName",
|
||||
|
||||
+1
-2
@@ -53,9 +53,8 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Mapping Financial Activities to Accounts"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Mapping Financial Activities to Accounts", description = "Organization Level Financial Activities like Asset and Liability Transfer can be mapped to GL Account. Integrated accounting takes these accounts into consideration when an Account transfer is made between a savings to loan/savings account and vice-versa\\n\" + \"\\n\" +\"\\nField Descriptions\\n\" +\"financialActivityId\\n\" +\"The identifier of the Financial Activity\\n\" +\"glAccountId\\n\" +\"The identifier of a GL Account ( Ledger Account) which shall be used as the default account for the selected Financial Activity")
|
||||
@Tag(name = "Mapping Financial Activities to Accounts", description = "Organization Level Financial Activities like Asset and Liability Transfer can be mapped to GL Account. Integrated accounting takes these accounts into consideration when an Account transfer is made between a savings to loan/savings account and vice-versa\n" + "\n" + "Field Descriptions\n" + "financialActivityId\n" + "The identifier of the Financial Activity\n" + "glAccountId\n" + "The identifier of a GL Account ( Ledger Account) which shall be used as the default account for the selected Financial Activity")
|
||||
})
|
||||
|
||||
public class FinancialActivityAccountsApiResource {
|
||||
|
||||
private final FinancialActivityAccountReadPlatformService financialActivityAccountReadPlatformService;
|
||||
|
||||
+1
-2
@@ -72,9 +72,8 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"General Ledger Account"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "General Ledger Account", description = "Ledger accounts represent an Individual account within an Organizations Chart Of Accounts(COA) and are assigned a name and unique number by which they can be identified. \\n\" + \"All transactions relating to a company's assets, liabilities, owners' equity, revenue and expenses are recorded against these accounts")
|
||||
@Tag(name = "General Ledger Account", description = "Ledger accounts represent an Individual account within an Organizations Chart Of Accounts(COA) and are assigned a name and unique number by which they can be identified. \n" + "All transactions relating to a company's assets, liabilities, owners' equity, revenue and expenses are recorded against these accounts")
|
||||
})
|
||||
|
||||
public class GLAccountsApiResource {
|
||||
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "parentId", "glCode",
|
||||
|
||||
+1
-2
@@ -70,9 +70,8 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Journal Entries"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Journal Entries", description = "A journal entry refers to the logging of transactions against general ledger accounts. A journal entry may consist of several line items, each of which is either a \\\"debit\\\" or a \\\"credit\\\". The total amount of the debits must equal the total amount of the credits or the journal entry is said to be \\\"unbalanced\\\" \\n\" + \"\\n\" + \"A journal entry directly changes the account balances on the general ledger")
|
||||
@Tag(name = "Journal Entries", description = "A journal entry refers to the logging of transactions against general ledger accounts. A journal entry may consist of several line items, each of which is either a \"debit\" or a \"credit\". The total amount of the debits must equal the total amount of the credits or the journal entry is said to be \"unbalanced\" \n" + "\n" + "A journal entry directly changes the account balances on the general ledger")
|
||||
})
|
||||
|
||||
public class JournalEntriesApiResource {
|
||||
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "officeId", "officeName",
|
||||
|
||||
+1
-2
@@ -58,9 +58,8 @@ import java.util.Set;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Provisioning Entries"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Provisioning Entries", description = "This defines the Provisioning Entries for all active loan products\\n\" + \"\\n\" + \"Field Descriptions\\n\" + \"date\\n\" + \"Date on which day provisioning entries should be created\\n\" + \"createjournalentries\\n\" + \"Boolean variable whether to add journal entries for generated provisioning entries\\n")
|
||||
@Tag(name = "Provisioning Entries", description = "This defines the Provisioning Entries for all active loan products\n" + "\n" + "Field Descriptions\n" + "date\n" + "Date on which day provisioning entries should be created\n" + "createjournalentries\n" + "Boolean variable whether to add journal entries for generated provisioning entries\n")
|
||||
})
|
||||
|
||||
public class ProvisioningEntriesApiResource {
|
||||
|
||||
private final PlatformSecurityContext platformSecurityContext;
|
||||
|
||||
+1
-2
@@ -69,9 +69,8 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Accounting Rules"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Accounting Rules", description = "It is typical scenario in MFI's that non accountants pass journal entries on a regular basis. For Ex: A branch office might deposit their entire cash at hand to their Bank account at the end of a working day. The branch office users might not understand enough of accounting to figure out which account needs to get credited and which account needs to be debited to represent this transaction.\\n\" + \"\\n\" + \"Enter accounting rules, an abstraction on top of manual Journal entires for enabling simpler data entry. An accounting rule can define any of the following abstractions\\n\" + \"\\n\" + \"A Simple journal entry where both the credit and debit account have been preselected\\n\" + \"A Simple journal entry where either credit or debit accounts have been limited to a pre-selected list of accounts (Ex: Debit account should be one of \\\"Bank of America\\\" of \\\"JP Morgan\\\" and credit account should be \\\"Cash\\\")\\n\" + \"A Compound journal entry where multiple debits and / or multiple credits may be made amongst a set of preselected list of accounts (Ex: Credit account should be either \\\"Bank Of America\\\" or \\\"Cash\\\" and debit account can be \\\"Employee Salary\\\" and/or \\\"Miscellenous Expenses\\\")\\n\" + \"An accounting rule can also be optionally associated with a branch, so that only a particular Branch's users have access to the rule")
|
||||
@Tag(name = "Accounting Rules", description = "It is typical scenario in MFI's that non accountants pass journal entries on a regular basis. For Ex: A branch office might deposit their entire cash at hand to their Bank account at the end of a working day. The branch office users might not understand enough of accounting to figure out which account needs to get credited and which account needs to be debited to represent this transaction.\n" + "\n" + "Enter accounting rules, an abstraction on top of manual Journal entires for enabling simpler data entry. An accounting rule can define any of the following abstractions\n" + "\n" + "A Simple journal entry where both the credit and debit account have been preselected\n" + "A Simple journal entry where either credit or debit accounts have been limited to a pre-selected list of accounts (Ex: Debit account should be one of \"Bank of America\" of \"JP Morgan\" and credit account should be \"Cash\")\n" + "A Compound journal entry where multiple debits and / or multiple credits may be made amongst a set of preselected list of accounts (Ex: Credit account should be either \"Bank Of America\" or \"Cash\" and debit account can be \"Employee Salary\" and/or \"Miscellenous Expenses\")\n" + "An accounting rule can also be optionally associated with a branch, so that only a particular Branch's users have access to the rule")
|
||||
})
|
||||
|
||||
public class AccountingRuleApiResource {
|
||||
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "officeId", "officeName",
|
||||
|
||||
+8
-3
@@ -35,6 +35,7 @@ import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.fineract.adhocquery.data.AdHocData;
|
||||
import org.apache.fineract.adhocquery.service.AdHocReadPlatformService;
|
||||
@@ -53,6 +54,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/adhocquery")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"AdhocQuery Api"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "AdhocQuery Api", description = "")
|
||||
})
|
||||
public class AdHocApiResource {
|
||||
|
||||
/**
|
||||
@@ -117,7 +122,7 @@ public class AdHocApiResource {
|
||||
@Path("{adHocId}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public String retrieveAdHocQuery(@PathParam("adHocId") final Long adHocId, @Context final UriInfo uriInfo) {
|
||||
public String retrieveAdHocQuery(@PathParam("adHocId") @ApiParam(value = "adHocId") final Long adHocId, @Context final UriInfo uriInfo) {
|
||||
|
||||
this.context.authenticatedUser();
|
||||
|
||||
@@ -131,7 +136,7 @@ public class AdHocApiResource {
|
||||
@Path("{adHocId}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public String update(@PathParam("adHocId") final Long adHocId, final String apiRequestBodyAsJson) {
|
||||
public String update(@PathParam("adHocId") @ApiParam(value = "adHocId") final Long adHocId, final String apiRequestBodyAsJson) {
|
||||
|
||||
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
||||
.updateAdHoc(adHocId) //
|
||||
@@ -152,7 +157,7 @@ public class AdHocApiResource {
|
||||
@Path("{adHocId}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public String deleteAdHocQuery(@PathParam("adHocId") final Long adHocId) {
|
||||
public String deleteAdHocQuery(@PathParam("adHocId") @ApiParam(value = "adHocId") final Long adHocId) {
|
||||
|
||||
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
||||
.deleteAdHoc(adHocId) //
|
||||
|
||||
@@ -62,16 +62,15 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Batch API"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Batch API", description = "The Apache Fineract Batch API enables a consumer to access significant amounts of data in a single call or to make changes to several objects at once. Batching allows a consumer to pass instructions for several operations in a single HTTP request. A consumer can also specify dependencies between related operations. Once all operations have been completed, a consolidated response will be passed back and the HTTP connection will be closed.\\n\" + \"\\n\" + \"The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://example.org/api/v2/), optional headers array (corresponding to HTTP headers), optional reference parameter if a request is dependent on another request and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string).\\n\" + \"\\n\" + \"Batch API uses Json Path to handle dependent parameters. For example, if request '2' is referencing request '1' and in the \\\"body\\\" or in \\\"relativeUrl\\\" of request '2', there is a dependent parameter (which will look like \\\"$.parameter_name\\\"), then Batch API will internally substitute this dependent parameter from the response body of request '1'.\\n\" + \"\\n\" + \"Batch API is able to handle deeply nested dependent requests as well nested parameters. As shown in the example, requests are dependent on each other as, 1<--2<--6, i.e a nested dependency, where request '6' is not directly dependent on request '1' but still it is one of the nested child of request '1'. In the same way Batch API could handle a deeply nested dependent value, such as {..[..{..,$.parameter_name,..}..]}.")
|
||||
@Tag(name = "Batch API", description = "The Apache Fineract Batch API enables a consumer to access significant amounts of data in a single call or to make changes to several objects at once. Batching allows a consumer to pass instructions for several operations in a single HTTP request. A consumer can also specify dependencies between related operations. Once all operations have been completed, a consolidated response will be passed back and the HTTP connection will be closed.\n" + "\n" + "The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://example.org/api/v2/), optional headers array (corresponding to HTTP headers), optional reference parameter if a request is dependent on another request and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string).\n" + "\n" + "Batch API uses Json Path to handle dependent parameters. For example, if request '2' is referencing request '1' and in the \"body\" or in \"relativeUrl\" of request '2', there is a dependent parameter (which will look like \"$.parameter_name\"), then Batch API will internally substitute this dependent parameter from the response body of request '1'.\n" + "\n" + "Batch API is able to handle deeply nested dependent requests as well nested parameters. As shown in the example, requests are dependent on each other as, 1<--2<--6, i.e a nested dependency, where request '6' is not directly dependent on request '1' but still it is one of the nested child of request '1'. In the same way Batch API could handle a deeply nested dependent value, such as {..[..{..,$.parameter_name,..}..]}.")
|
||||
})
|
||||
|
||||
public class BatchApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
private final ToApiJsonSerializer<BatchResponse> toApiJsonSerializer;
|
||||
private final BatchApiService service;
|
||||
private final BatchRequestJsonHelper batchRequestJsonHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a 'BatchApiService' with context, toApiJsonSerializer, service
|
||||
* and batchRequestJsonHelper.
|
||||
|
||||
+4
-1
@@ -52,7 +52,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/audits")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Audits",description = "Every non-read Mifos API request is audited. A fully processed request can not be changed or deleted. See maker checker api for situations where an audit is not fully processed.\n" + "\n" + "Permissions: To search and look at audit entries a user needs to be attached to a role that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.\n" + "\n" + "Data Scope: A user can only see audits that are within their data scope. However, 'head office' users can see all audits including those that aren't office/branch related e.g. Loan Product changes.")
|
||||
@Api(tags = {"Audits"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Audits", description = "Every non-read Mifos API request is audited. A fully processed request can not be changed or deleted. See maker checker api for situations where an audit is not fully processed.\n" + "\n" + "Permissions: To search and look at audit entries a user needs to be attached to a role that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.\n" + "\n" + "Data Scope: A user can only see audits that are within their data scope. However, 'head office' users can see all audits including those that aren't office/branch related e.g. Loan Product changes.\")")
|
||||
})
|
||||
public class AuditsApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId",
|
||||
|
||||
+4
-1
@@ -54,7 +54,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/makercheckers")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Maker Checker (or 4-eye) functionality")
|
||||
@Api(tags = {"Maker Checker (or 4-eye) functionality"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Maker Checker (or 4-eye) functionality")
|
||||
})
|
||||
public class MakercheckersApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId",
|
||||
|
||||
+4
-1
@@ -55,7 +55,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path(AccountNumberFormatConstants.resourceRelativeURL)
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Account number format", description = "Account number preferences are used to describe custom formats for account numbers associated with Customer, Loan and Savings accounts." )
|
||||
@Api(tags = {"Account number format"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Account number format", description = "Account number preferences are used to describe custom formats for account numbers associated with Customer, Loan and Savings accounts." )
|
||||
})
|
||||
public class AccountNumberFormatsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
Vendored
+4
-1
@@ -53,7 +53,10 @@ import org.springframework.stereotype.Component;
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Cache", description = "The following settings are possible for cache:\n" + "\n" + "No Caching: caching turned off\n" + "Single node: caching on for single instance deployments of platorm (works for multiple tenants but only one tomcat)\n" + "By default caching is set to No Caching. Switching between caches results in the cache been clear e.g. from Single node to No cache and back again would clear down the single node cache.")
|
||||
@Api(tags = {"Cache"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Cache", description = "The following settings are possible for cache:\n" + "\n" + "No Caching: caching turned off\n" + "Single node: caching on for single instance deployments of platorm (works for multiple tenants but only one tomcat)\n" + "By default caching is set to No Caching. Switching between caches results in the cache been clear e.g. from Single node to No cache and back again would clear down the single node cache.")
|
||||
})
|
||||
public class CacheApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id"));
|
||||
|
||||
+4
-1
@@ -55,7 +55,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/codes/{codeId}/codevalues")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Code Values", description = "Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.\n" + "\n" + "Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc")
|
||||
@Api(tags = {"Code Values"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Code Values", description = "Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.\n" + "\n" + "Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc")
|
||||
})
|
||||
public class CodeValuesApiResource {
|
||||
|
||||
/**
|
||||
|
||||
+4
-1
@@ -53,7 +53,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/codes")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Codes", description = "Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.\n" + "\n" + "Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc")
|
||||
@Api(tags = {"Codes"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Codes", description = "Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.\n" + "\n" + "Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc")
|
||||
})
|
||||
public class CodesApiResource {
|
||||
|
||||
/**
|
||||
|
||||
+4
-1
@@ -48,7 +48,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/externalservice")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "External Services", description = "External Services Configuration related to set of supported configurations for third party services like Amazon S3 and SMTP:\n" + "\n" + "S3 (Amazon S3):\n" + "s3_access_key -\n" + "s3_bucket_name -\n" + "s3_secret_key -\n" + "\n" + "\n" + "SMTP (Email Service):\n" + "username -\n" + "password -\n" + "host -\n" + "port -\n" + "useTLS -")
|
||||
@Api(tags = {"External Services"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "External Services", description = "External Services Configuration related to set of supported configurations for third party services like Amazon S3 and SMTP:\n" + "\n" + "S3 (Amazon S3):\n" + "s3_access_key -\n" + "s3_bucket_name -\n" + "s3_secret_key -\n" + "\n" + "\n" + "SMTP (Email Service):\n" + "username -\n" + "password -\n" + "host -\n" + "port -\n" + "useTLS -")
|
||||
})
|
||||
public class ExternalServicesConfigurationApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -46,7 +46,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/configurations")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Global Configuration", description = "Global configuration related to set of supported enable/disable configurations:\n" + "\n" + "maker-checker - defaults to false - if true turns on maker-checker functionality\n" + "reschedule-future-repayments - defaults to false - if true reschedules repayemnts which falls on a non-working day to configured repayment rescheduling rule\n" + "allow-transactions-on-non_workingday - defaults to false - if true allows transactions on non-working days\n" + "reschedule-repayments-on-holidays - defaults to false - if true reschedules repayemnts which falls on a non-working day to defined reschedule date\n" + "allow-transactions-on-holiday - defaults to false - if true allows transactions on holidays\n" + "savings-interest-posting-current-period-end - Set it at the database level before any savings interest is posted. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.\n" + "financial-year-beginning-month - Set it at the database level before any savings interest is posted. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.\n" + "meetings-mandatory-for-jlg-loans - if set to true, enforces all JLG loans to follow a meeting schedule belonging to either the parent group or Center.")
|
||||
@Api(tags = {"Global Configuration"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Global Configuration", description = "Global configuration related to set of supported enable/disable configurations:\n" + "\n" + "maker-checker - defaults to false - if true turns on maker-checker functionality\n" + "reschedule-future-repayments - defaults to false - if true reschedules repayemnts which falls on a non-working day to configured repayment rescheduling rule\n" + "allow-transactions-on-non_workingday - defaults to false - if true allows transactions on non-working days\n" + "reschedule-repayments-on-holidays - defaults to false - if true reschedules repayemnts which falls on a non-working day to defined reschedule date\n" + "allow-transactions-on-holiday - defaults to false - if true allows transactions on holidays\n" + "savings-interest-posting-current-period-end - Set it at the database level before any savings interest is posted. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.\n" + "financial-year-beginning-month - Set it at the database level before any savings interest is posted. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.\n" + "meetings-mandatory-for-jlg-loans - if set to true, enforces all JLG loans to follow a meeting schedule belonging to either the parent group or Center.")
|
||||
})
|
||||
public class GlobalConfigurationApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("globalConfiguration"));
|
||||
|
||||
+4
-1
@@ -56,7 +56,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/datatables")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Data Tables", description = "The datatables API allows you to plug-in your own tables (MySql) that have a relationship to a Apache Fineract core table. For example, you might want to add some extra client fields and record information about each of the clients' family members. Via the API you can create, read, update and delete entries for each 'plugged-in' table. The API checks for permission and for 'data scoping' (only data within the users' office hierarchy can be managed by the user).\n" + "\n" + "The Apache Fineract Reference App uses a JQuery plug-in called stretchydatatables (which in turn uses this datatables resource) to provide a pretty flexible CRUD (Create, Read, Update, Delete) User Interface.")
|
||||
@Api(tags = {"Data Tables"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Data Tables", description = "The datatables API allows you to plug-in your own tables (MySql) that have a relationship to a Apache Fineract core table. For example, you might want to add some extra client fields and record information about each of the clients' family members. Via the API you can create, read, update and delete entries for each 'plugged-in' table. The API checks for permission and for 'data scoping' (only data within the users' office hierarchy can be managed by the user).\n" + "\n" + "The Apache Fineract Reference App uses a JQuery plug-in called stretchydatatables (which in turn uses this datatables resource) to provide a pretty flexible CRUD (Create, Read, Update, Delete) User Interface.")
|
||||
})
|
||||
public class DatatablesApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -53,7 +53,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/entityDatatableChecks")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Entity-Datatable Checks", description = "This defines Entity-Datatable Check.")
|
||||
@Api(tags = {"Entity Datatable Check"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Entity Data Table", description = "This defines Entity-Datatable Check.")
|
||||
})
|
||||
public class EntityDatatableChecksApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -53,7 +53,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/reports")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Reports", description = "Non-core reports can be added, updated and deleted.")
|
||||
@Api(tags = {"Reports"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Reports", description = "Non-core reports can be added, updated and deleted.")
|
||||
})
|
||||
public class ReportsApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "reportName", "reportType", "reportSubType",
|
||||
|
||||
+4
-1
@@ -58,7 +58,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/runreports")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Run Reports", description = "")
|
||||
@Api(tags = {"Run Reports"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Run Reports", description = "")
|
||||
})
|
||||
public class RunreportsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -61,7 +61,10 @@ import com.sun.jersey.multipart.FormDataParam;
|
||||
@Path("{entityType}/{entityId}/documents")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Documents", description = "Multiple Documents (a combination of a name, description and a file) may be attached to different Entities like Clients, Groups, Staff, Loans, Savings and Client Identifiers in the system\n" + "\n" + "Note: The currently allowed Entities are\n" + "\n" + "Clients: URL Pattern as clients\n" + "Staff: URL Pattern as staff\n" + "Loans: URL Pattern as loans\n" + "Savings: URL Pattern as savings\n" + "Client Identifiers: URL Pattern as client_identifiers\n" + "Groups: URL Pattern as groups")
|
||||
@Api(tags = {"Documents"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Documents", description = "Multiple Documents (a combination of a name, description and a file) may be attached to different Entities like Clients, Groups, Staff, Loans, Savings and Client Identifiers in the system\n" + "\n" + "Note: The currently allowed Entities are\n" + "\n" + "Clients: URL Pattern as clients\n" + "Staff: URL Pattern as staff\n" + "Loans: URL Pattern as loans\n" + "Savings: URL Pattern as savings\n" + "Client Identifiers: URL Pattern as client_identifiers\n" + "Groups: URL Pattern as groups")
|
||||
})
|
||||
public class DocumentManagementApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "parentEntityType", "parentEntityId",
|
||||
|
||||
+4
-1
@@ -55,7 +55,10 @@ import org.springframework.stereotype.Component;
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Hooks", description = "Hooks are a mechanism to trigger custom code on the occurence of events.")
|
||||
@Api(tags = {"Hooks"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Hooks", description = "Hooks are a mechanism to trigger custom code on the occurence of events. ")
|
||||
})
|
||||
public class HookApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -44,7 +44,10 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
@Path("/scheduler")
|
||||
@Component
|
||||
@Api(value = "Scheduler", description = "")
|
||||
@Api(tags = {"Scheduler"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Scheduler", description = "")
|
||||
})
|
||||
public class SchedulerApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -58,7 +58,10 @@ import org.springframework.stereotype.Component;
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@Component
|
||||
@Api(value = "MIFOSX-BATCH JOBS", description = "Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on a computer at a particular time defined in job's cron expression.\n" + "\n" + "At any point, you can view the list of batch jobs scheduled to run along with other details specific to each job. Manually you can execute the jobs at any point of time.\n" + "\n" + "The scheduler status can be either \"Active\" or \"Standby\". If the scheduler status is Active, it indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler status is Standby, it will ensure all scheduled batch runs are suspended.")
|
||||
@Api(tags = {"MIFOSX-BATCH JOBS"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "MIFOSX-BATCH JOBS", description = "Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on a computer at a particular time defined in job's cron expression.\n\n At any point, you can view the list of batch jobs scheduled to run along with other details specific to each job. Manually you can execute the jobs at any point of time.\n\n The scheduler status can be either \"Active\" or \"Standby\". If the scheduler status is Active, it indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler status is Standby, it will ensure all scheduled batch runs are suspended.")
|
||||
})
|
||||
public class SchedulerJobApiResource {
|
||||
|
||||
private final SchedulerJobRunnerReadService schedulerJobRunnerReadService;
|
||||
|
||||
+4
-1
@@ -52,7 +52,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/" + ReportMailingJobConstants.REPORT_MAILING_JOB_RESOURCE_NAME)
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Report Mailing Jobs", description = "This resource allows you to create a scheduled job that runs a report and sents it by email to specified email addresses.\n" + "\n" + "The scheduled job can be configured to run once or on a regular basis (once a day, twice a week, etc).")
|
||||
@Api(tags = {"Report Mailing Jobs"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Report Mailing Jobs", description = "This resource allows you to create a scheduled job that runs a report and sents it by email to specified email addresses.\n\nThe scheduled job can be configured to run once or on a regular basis (once a day, twice a week, etc)")
|
||||
})
|
||||
public class ReportMailingJobApiResource {
|
||||
|
||||
private final PlatformSecurityContext platformSecurityContext;
|
||||
|
||||
+4
-2
@@ -43,8 +43,10 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
@Path("/" + ReportMailingJobConstants.REPORT_MAILING_JOB_RUN_HISTORY_RESOURCE_NAME)
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "List Report Mailing Job History", description = "")
|
||||
@Api(tags = {"List Report Mailing Job History"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "List Report Mailing Job History", description = "")
|
||||
})
|
||||
public class ReportMailingJobRunHistoryApiResource {
|
||||
|
||||
private final PlatformSecurityContext platformSecurityContext;
|
||||
|
||||
+4
-3
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
package org.apache.fineract.infrastructure.security.api;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -28,7 +27,6 @@ import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
@@ -59,7 +57,10 @@ import com.sun.jersey.core.util.Base64;
|
||||
@Scope("singleton")
|
||||
@Profile("basicauth")
|
||||
@Path("/authentication")
|
||||
@Api(value = "Authentication HTTP Basic", description = "An API capability that allows client applications to verify authentication details using HTTP Basic Authentication.")
|
||||
@Api(tags = {"Authentication HTTP Basic"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Authentication HTTP Basic", description = "An API capability that allows client applications to verify authentication details using HTTP Basic Authentication.")
|
||||
})
|
||||
public class AuthenticationApiResource {
|
||||
|
||||
public static class AuthenticateRequest {
|
||||
|
||||
+4
-1
@@ -54,7 +54,10 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@Profile("oauth")
|
||||
@Scope("singleton")
|
||||
@Api(value = "Fetch authenticated user details", description = "")
|
||||
@Api(tags = {"Fetch authenticated user details"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Fetch authenticated user details", description = "")
|
||||
})
|
||||
public class UserDetailsApiResource {
|
||||
|
||||
private final ResourceServerTokenServices tokenServices;
|
||||
|
||||
+5
-1
@@ -33,11 +33,15 @@ import org.apache.fineract.mix.service.XBRLResultService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/mixreport")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Mix Report", description = "")
|
||||
@Api(tags = {"Mix Report"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Mix Report", description = "")
|
||||
})
|
||||
public class MixReportApiResource {
|
||||
|
||||
private final XBRLResultService xbrlResultService;
|
||||
|
||||
+5
-1
@@ -41,11 +41,15 @@ import org.apache.fineract.mix.service.MixTaxonomyReadPlatformService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/mixtaxonomy")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Mix Taxonomy", description = "")
|
||||
@Api(tags = {"Mix Taxonomy"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Mix Taxonomy", description = "")
|
||||
})
|
||||
public class MixTaxonomyApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("taxonomyId", "name", "namespace", "dimension",
|
||||
|
||||
+6
-1
@@ -31,7 +31,9 @@ import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.fineract.commands.domain.CommandWrapper;
|
||||
import org.apache.fineract.commands.service.CommandWrapperBuilder;
|
||||
import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
|
||||
@@ -49,7 +51,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/mixmapping")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Mix Mapping")
|
||||
@Api(tags = {"Mix Mapping "})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Mix Mapping", description = "")
|
||||
})
|
||||
public class MixTaxonomyMappingApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("identifier", "config"));
|
||||
|
||||
+5
@@ -30,6 +30,7 @@ import org.apache.fineract.notification.service.NotificationReadPlatformService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
@@ -39,6 +40,10 @@ import javax.ws.rs.core.UriInfo;
|
||||
@Path("/notifications")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Notification"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Notification", description = "")
|
||||
})
|
||||
public class NotificationApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -58,7 +58,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/holidays")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Holidays", description = "Some MFI's span large regions where different branch offices might observe different holidays. They need the ability to define holidays for specific branch offices and be able to set the repayment rule to follow during those holidays.\n" + "\n" + "The reschedule of repayments to repaymentsRescheduledTo date during defined holidays is turned on/off by enabling/disabling reschedule-repayments-on-holidays in Global configurations.\n" + "\n" + "Allow Repayment transactions on a defined holidays is turned on/off by enabling/disabling allow-transactions-on-holiday in Global configurations.")
|
||||
@Api(tags = {"Holidays"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Holidays", description = "Some MFI's span large regions where different branch offices might observe different holidays. They need the ability to define holidays for specific branch offices and be able to set the repayment rule to follow during those holidays.\n" + "\n" + "The reschedule of repayments to repaymentsRescheduledTo date during defined holidays is turned on/off by enabling/disabling reschedule-repayments-on-holidays in Global configurations.\n" + "\n" + "Allow Repayment transactions on a defined holidays is turned on/off by enabling/disabling allow-transactions-on-holiday in Global configurations.")
|
||||
})
|
||||
public class HolidaysApiResource {
|
||||
|
||||
private final DefaultToApiJsonSerializer<HolidayData> toApiJsonSerializer;
|
||||
|
||||
+4
-1
@@ -49,7 +49,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/currencies")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Currency", description = "Application related configuration around viewing/updating the currencies permitted for use within the MFI.")
|
||||
@Api(tags = {"Currency"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Currency", description = "Application related configuration around viewing/updating the currencies permitted for use within the MFI.")
|
||||
})
|
||||
public class CurrenciesApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("selectedCurrencyOptions", "currencyOptions"));
|
||||
|
||||
+4
-1
@@ -62,7 +62,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/offices")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Offices", description = "Offices are used to model an MFIs structure. A hierarchical representation of offices is supported. There will always be at least one office (which represents the MFI or an MFIs head office). All subsequent offices added must have a parent office.")
|
||||
@Api(tags = {"Offices"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Offices", description = "Offices are used to model an MFIs structure. A hierarchical representation of offices is supported. There will always be at least one office (which represents the MFI or an MFIs head office). All subsequent offices added must have a parent office.")
|
||||
})
|
||||
public class OfficesApiResource {
|
||||
|
||||
/**
|
||||
|
||||
+5
-1
@@ -33,6 +33,7 @@ import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.fineract.commands.domain.CommandWrapper;
|
||||
import org.apache.fineract.commands.service.CommandWrapperBuilder;
|
||||
import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
|
||||
@@ -50,7 +51,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/provisioningcategory")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Provisioning Category", description = "")
|
||||
@Api(tags = {"Provisioning Category"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Provisioning Category", description = "")
|
||||
})
|
||||
public class ProvisioningCategoryApiResource {
|
||||
|
||||
private final PlatformSecurityContext platformSecurityContext;
|
||||
|
||||
+4
-1
@@ -54,7 +54,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/provisioningcriteria")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Provisioning Criteria", description = "This defines the Provisioning Criteria")
|
||||
@Api(tags = {"Provisioning Criteria"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Provisioning Criteria", description = "This defines the Provisioning Criteria")
|
||||
})
|
||||
public class ProvisioningCriteriaApiResource {
|
||||
|
||||
private final PlatformSecurityContext platformSecurityContext;
|
||||
|
||||
+4
-1
@@ -63,7 +63,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/staff")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Staff", description = "Allows you to model staff members. At present the key role of significance is whether this staff member is a loan officer or not.")
|
||||
@Api(tags = {"Staff"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Staff", description = "Allows you to model staff members. At present the key role of significance is whether this staff member is a loan officer or not.")
|
||||
})
|
||||
public class StaffApiResource {
|
||||
|
||||
/**
|
||||
|
||||
+5
-1
@@ -29,6 +29,7 @@ import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.*;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
@@ -44,7 +45,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("cashiers")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "cashiers", description = "")
|
||||
@Api(tags = {"Cashiers"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Cashiers", description = "")
|
||||
})
|
||||
public class CashierApiResource {
|
||||
|
||||
private final DefaultToApiJsonSerializer<CashierData> jsonSerializer;
|
||||
|
||||
+4
-1
@@ -58,7 +58,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("tellers")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Teller Cash Management", description = "Teller cash management which will allow an organization to manage their cash transactions at branches or head office more effectively.")
|
||||
@Api(tags = {"Teller Cash Management"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Teller Cash Management", description = "Teller cash management which will allow an organization to manage their cash transactions at branches or head office more effectively.")
|
||||
})
|
||||
public class TellerApiResource {
|
||||
|
||||
private final PlatformSecurityContext securityContext;
|
||||
|
||||
+5
-1
@@ -28,6 +28,7 @@ import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
|
||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||
import org.apache.fineract.organisation.teller.data.TellerData;
|
||||
@@ -41,7 +42,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("cashiersjournal")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "cashiersjournal", description = "")
|
||||
@Api(tags = {"Cashier Journals"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Cashier Journals", description = "")
|
||||
})
|
||||
public class TellerJournalApiResource {
|
||||
|
||||
private final PlatformSecurityContext securityContext;
|
||||
|
||||
+4
-1
@@ -45,7 +45,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/workingdays")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Working days", description = "The days of the week that are workdays.\n" + "\n" + "Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable reschedule-future-repayments parameter in Global configurations.\n" + "\n" + "Allow transactions on non-working days is configurable by enabling/disbaling the allow-transactions-on-non_workingday parameter in Global configurations.")
|
||||
@Api(tags = {"Working days"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Working days", description = "The days of the week that are workdays.\n" + "\n" + "Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable reschedule-future-repayments parameter in Global configurations\n" + "\n" + "Allow transactions on non-working days is configurable by enabling/disbaling the allow-transactions-on-non_workingday parameter in Global configurations.")
|
||||
})
|
||||
public class WorkingDaysApiResource {
|
||||
|
||||
private final DefaultToApiJsonSerializer<WorkingDaysData> toApiJsonSerializer;
|
||||
|
||||
+4
-1
@@ -43,7 +43,10 @@ import javax.ws.rs.core.UriInfo;
|
||||
@Path("/accounttransfers")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Account Transfers", description = "Ability to be able to transfer monetary funds from one account to another.\n\n" + "\n\n" + "Note: At present only savings account to savings account transfers are supported.")
|
||||
@Api(tags = {"Account Transfers"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Account Transfers", description = "Ability to be able to transfer monetary funds from one account to another.\n\nNote: At present only savings account to savings account transfers are supported.")
|
||||
})
|
||||
public class AccountTransfersApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -52,7 +52,10 @@ import java.util.Set;
|
||||
@Path("/standinginstructions")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Standing Instructions", description = "Standing instructions (or standing orders) refer to instructions a bank account holder (\"the payer\") gives to his or her bank to pay a set amount at regular intervals to another's (\"the payee's\") account.\n" + "\n" + "Note: At present only savings account to savings account and savings account to Loan account transfers are permitted.")
|
||||
@Api(tags = {"Standing Instructions"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Standing Instructions", description = "Standing instructions (or standing orders) refer to instructions a bank account holder (\"the payer\") gives to his or her bank to pay a set amount at regular intervals to another's (\"the payee's\") account.\n" + "\n" + "Note: At present only savings account to savings account and savings account to Loan account transfers are permitted.")
|
||||
})
|
||||
public class StandingInstructionApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -42,7 +42,10 @@ import java.util.Date;
|
||||
@Path("/standinginstructionrunhistory")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Standing Instructions History", description = "The list capability of history can support pagination and sorting.")
|
||||
@Api(tags = {"Standing Instructions History"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Standing Instructions History", description = "The list capability of history can support pagination and sorting.")
|
||||
})
|
||||
public class StandingInstructionHistoryApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -63,7 +63,10 @@ import java.io.InputStream;
|
||||
@Path("/accounts/{type}")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Share Account", description = "Share accounts are instances of a praticular share product created for an individual. An application process around the creation of accounts is also supported.")
|
||||
@Api(tags = {"Share Account"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Share Account", description = "Share accounts are instances of a praticular share product created for an individual. An application process around the creation of accounts is also supported.")
|
||||
})
|
||||
public class AccountsApiResource {
|
||||
|
||||
private final ApplicationContext applicationContext ;
|
||||
|
||||
+4
-1
@@ -43,7 +43,10 @@ import java.util.Set;
|
||||
@Path("/fieldconfiguration/{entity}")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Entity Field Configuration", description = "Entity Field configuration API is a generic and extensible \n" + "wherein various entities and subentities can be related.\n" + "Also it gives the user an ability to enable/disable fields,\n" + "add regular expression for validation")
|
||||
@Api(tags = {"Entity Field Configuration"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Entity Field Configuration", description = "Entity Field configuration API is a generic and extensible \n" + "wherein various entities and subentities can be related.\n" + "Also it gives the user an ability to enable/disable fields,\n" + "add regular expression for validation")
|
||||
})
|
||||
public class EntityFieldConfigurationApiResources {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("clientAddressId", "client_id",
|
||||
|
||||
+4
-1
@@ -45,7 +45,10 @@ import java.util.Set;
|
||||
@Path("/charges")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Charges", description = "Its typical for MFIs to add extra costs for their financial products. These are typically Fees or Penalties.\n" + "\n" + "A Charge on fineract platform is what we use to model both Fees and Penalties.\n" + "\n" + "At present we support defining charges for use with Client accounts and both loan and saving products.")
|
||||
@Api(tags = {"Charges"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Charges", description = "Its typical for MFIs to add extra costs for their financial products. These are typically Fees or Penalties.\n" + "\n" + "A Charge on fineract platform is what we use to model both Fees and Penalties.\n" + "\n" + "At present we support defining charges for use with Client accounts and both loan and saving products.")
|
||||
})
|
||||
public class ChargesApiResource {
|
||||
|
||||
private final Set<String> CHARGES_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "amount", "currency", "penalty", "active",
|
||||
|
||||
+4
-1
@@ -45,7 +45,10 @@ import java.util.Set;
|
||||
@Path("/client")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Clients Address", description = "Address module is an optional module and can be configured into the system by using GlobalConfiguration setting: enable-address. In order to activate Address module, we need to enable the configuration, enable-address by setting its value to true.")
|
||||
@Api(tags = {"Clients Address"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Clients Address", description = "Address module is an optional module and can be configured into the system by using GlobalConfiguration setting: enable-address. In order to activate Address module, we need to enable the configuration, enable-address by setting its value to true.")
|
||||
})
|
||||
public class ClientAddressApiResources {
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("addressId", "street",
|
||||
"addressLine1", "addressLine2", "addressLine3", "townVillage", "city", "countyDistrict", "stateProvinceId",
|
||||
|
||||
+4
-1
@@ -52,7 +52,10 @@ import java.util.Set;
|
||||
|
||||
@Path("/clients/{clientId}/charges")
|
||||
@Component
|
||||
@Api(value = "Client Charges", description = "It is typical for MFI's to directly associate charges with an implicit Client account. These can be either fees or penalties\n" + "\n" + "Client Charges are client specific instances of Charges. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Client account) are described here")
|
||||
@Api(tags = {"Client Charges"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Client Charges", description = "It is typical for MFI's to directly associate charges with an implicit Client account. These can be either fees or penalties\n" + "\n" + "Client Charges are client specific instances of Charges. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Client account) are described here")
|
||||
})
|
||||
public class ClientChargesApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -50,7 +50,10 @@ import java.util.Set;
|
||||
@Path("/clients/{clientId}/identifiers")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Client Identifier", description = "Client Identifiers refer to documents that are used to uniquely identify a customer\n" + "Ex: Drivers License, Passport, Ration card etc ")
|
||||
@Api(tags = {"Client Identifier"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Client Identifier", description = "Client Identifiers refer to documents that are used to uniquely identify a customer\n" + "Ex: Drivers License, Passport, Ration card etc ")
|
||||
})
|
||||
public class ClientIdentifiersApiResource {
|
||||
|
||||
private static final Set<String> CLIENT_IDENTIFIER_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "clientId",
|
||||
|
||||
+4
-1
@@ -43,7 +43,10 @@ import javax.ws.rs.core.UriInfo;
|
||||
|
||||
@Path("/clients/{clientId}/transactions")
|
||||
@Component
|
||||
@Api(value = "Client Transaction", description = "Client Transactions refer to transactions made directly againt a Client's internal account. Currently, these transactions are only created as a result of charge payments/waivers. You are allowed to undo a transaction, however you cannot explicitly create one. ")
|
||||
@Api(tags = {"Client Transaction"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Client Transaction", description = "Client Transactions refer to transactions made directly againt a Client's internal account. Currently, these transactions are only created as a result of charge payments/waivers. You are allowed to undo a transaction, however you cannot explicitly create one. ")
|
||||
})
|
||||
public class ClientTransactionsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -75,7 +75,10 @@ import com.sun.jersey.multipart.FormDataParam;
|
||||
@Path("/clients")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Client", description = "Clients are people and businesses that have applied (or may apply) to an MFI for loans.\n" + "\n" + "Clients can be created in Pending or straight into Active state.")
|
||||
@Api(tags = {"Client"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Client", description = "Clients are people and businesses that have applied (or may apply) to an MFI for loans.\n" + "\n" + "Clients can be created in Pending or straight into Active state.")
|
||||
})
|
||||
public class ClientsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -44,7 +44,10 @@ import java.util.*;
|
||||
@Path("/loans/{loanId}/collaterals")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Loan Collateral", description = "In lending agreements, collateral is a borrower's pledge of specific property to a lender, to secure repayment of a loan. The collateral serves as protection for a lender against a borrower's default - that is, any borrower failing to pay the principal and interest under the terms of a loan obligation. If a borrower does default on a loan (due to insolvency or other event), that borrower forfeits (gives up) the property pledged as collateral - and the lender then becomes the owner of the collateral")
|
||||
@Api(tags = {"Loan Collateral"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Loan Collateral", description = "In lending agreements, collateral is a borrower's pledge of specific property to a lender, to secure repayment of a loan. The collateral serves as protection for a lender against a borrower's default - that is, any borrower failing to pay the principal and interest under the terms of a loan obligation. If a borrower does default on a loan (due to insolvency or other event), that borrower forfeits (gives up) the property pledged as collateral - and the lender then becomes the owner of the collateral")
|
||||
})
|
||||
public class CollateralsApiResource {
|
||||
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "type", "value", "description",
|
||||
|
||||
+4
-1
@@ -45,7 +45,10 @@ import java.util.Set;
|
||||
@Path("/floatingrates")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Floating Rates", description = "It lets you create, list, retrieve and upload the floating rates")
|
||||
@Api(tags = {"Floating Rates"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Floating Rates", description = "It lets you create, list, retrieve and upload the floating rates")
|
||||
})
|
||||
public class FloatingRatesApiResource {
|
||||
|
||||
private static final String RESOURCE_NAME = "FLOATINGRATE";
|
||||
|
||||
+4
-1
@@ -86,7 +86,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/centers")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Centers", description = "Centers along with Groups are used to provided a distinctive banking distribution channel used in microfinance. Its common in areas such as Southern Asia to use Centers and Group as administrative units in grameen style lending. Typically groups will contain one to five people and centers themselves will be made of anywhere between 2-10 groups.")
|
||||
@Api(tags = {"Centers"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Centers", description = "Centers along with Groups are used to provided a distinctive banking distribution channel used in microfinance. Its common in areas such as Southern Asia to use Centers and Group as administrative units in grameen style lending. Typically groups will contain one to five people and centers themselves will be made of anywhere between 2-10 groups.")
|
||||
})
|
||||
public class CentersApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -94,7 +94,10 @@ import org.springframework.util.CollectionUtils;
|
||||
@Path("/groups")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Groups", description = "Groups are used to provide a distinctive banking distribution channel used in microfinances throughout the world. The Group is an administrative unit. It can contain as few as 5 people or as many as 40 depending on how its used.\n\n" + "\n\n" + "Different styles of group lending - Joint-Liability Group, Grameen Model (Center-Group), Self-Help Groups, Village/Communal Banks)")
|
||||
@Api(tags = {"Groups"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Groups", description = "Groups are used to provide a distinctive banking distribution channel used in microfinances throughout the world. The Group is an administrative unit. It can contain as few as 5 people or as many as 40 depending on how its used.\n" + "\n" + "Different styles of group lending - Joint-Liability Group, Grameen Model (Center-Group), Self-Help Groups, Village/Communal Banks)")
|
||||
})
|
||||
public class GroupsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -48,7 +48,10 @@ import static org.apache.fineract.portfolio.interestratechart.InterestRateChartS
|
||||
@Path("/interestratecharts/{chartId}/chartslabs")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Interest Rate Slab (A.K.A interest bands)", description = "The slabs a.k.a interest bands are associated with Interest Rate Chart. These bands allow to define different interest rates for different deposit term periods.")
|
||||
@Api(tags = {"Interest Rate Slab (A.K.A interest bands)"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Interest Rate Slab (A.K.A interest bands)", description = "The slabs a.k.a interest bands are associated with Interest Rate Chart. These bands allow to define different interest rates for different deposit term periods.")
|
||||
})
|
||||
public class InterestRateChartSlabsApiResource {
|
||||
|
||||
private final InterestRateChartSlabReadPlatformService interestRateChartSlabReadPlatformService;
|
||||
|
||||
+4
-1
@@ -49,7 +49,10 @@ import static org.apache.fineract.portfolio.interestratechart.InterestRateChartA
|
||||
@Path("/interestratecharts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Interest Rate Chart", description = "This defines an interest rate scheme that can be associated to a term deposit product. This will have a slab (band or range) of deposit periods and the associated interest rates applicable along with incentives for each band.")
|
||||
@Api(tags = {"Interest Rate Chart"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Interest Rate Chart", description = "This defines an interest rate scheme that can be associated to a term deposit product. This will have a slab (band or range) of deposit periods and the associated interest rates applicable along with incentives for each band.")
|
||||
})
|
||||
public class InterestRateChartsApiResource {
|
||||
|
||||
private final InterestRateChartReadPlatformService chartReadPlatformService;
|
||||
|
||||
+4
-1
@@ -51,7 +51,10 @@ import java.util.Set;
|
||||
@Path("/loans/{loanId}/charges")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Loan Charges", description = "Its typical for MFIs to add extra costs for their loan products. They can be either Fees or Penalties.\n" + "\n" + "Loan Charges are instances of Charges and represent either fees and penalties for loan products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Loan) are described here")
|
||||
@Api(tags = {"Loan Charges"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Loan Charges", description = "Its typical for MFIs to add extra costs for their loan products. They can be either Fees or Penalties.\n" + "\n" + "Loan Charges are instances of Charges and represent either fees and penalties for loan products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Loan) are described here")
|
||||
})
|
||||
public class LoanChargesApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
|
||||
+4
-1
@@ -43,7 +43,10 @@ import java.util.HashSet;
|
||||
@Path("/loans/{loanId}/schedule")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Loan Rescheduling", description = "Loan Term Variations provides the ability to change due dates, amounts and number of instalments before loan approval.")
|
||||
@Api(tags = {"Loan Rescheduling"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Loan Rescheduling", description = "Loan Term Variations provides the ability to change due dates, amounts and number of instalments before loan approval.")
|
||||
})
|
||||
public class LoanScheduleApiResource {
|
||||
|
||||
private final String resourceNameForPermissions = "LOAN";
|
||||
|
||||
+4
-1
@@ -52,7 +52,10 @@ import java.util.Set;
|
||||
@Path("/loans/{loanId}/transactions")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Loan Transactions", description = "Capabilities include loan repayment's, interest waivers and the ability to 'adjust' an existing transaction. An 'adjustment' of a transaction is really a 'reversal' of existing transaction followed by creation of a new transaction with the provided details.")
|
||||
@Api(tags = {"Loan Transactions"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Loan Transactions", description = "Capabilities include loan repayment's, interest waivers and the ability to 'adjust' an existing transaction. An 'adjustment' of a transaction is really a 'reversal' of existing transaction followed by creation of a new transaction with the provided details.")
|
||||
})
|
||||
public class LoanTransactionsApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "type", "date", "currency", "amount",
|
||||
|
||||
+99
-1
@@ -123,7 +123,105 @@ import org.springframework.util.CollectionUtils;
|
||||
@Path("/loans")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Loans", description = "The API concept of loans models the loan application process and the loan contract/monitoring process.")
|
||||
@Api(tags = {"Loans"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Loans", description = "The API concept of loans models the loan application process and the loan contract/monitoring process.\n" +
|
||||
"\n" +
|
||||
"Field Descriptions\n" +
|
||||
"accountNo\n" +
|
||||
"The account no. associated with this loan. Is auto generated if not provided at loan application creation time.\n" +
|
||||
"externalId\n" +
|
||||
"A place to put an external reference for this loan e.g. The ID another system uses.\n" +
|
||||
"If provided, it must be unique.\n" +
|
||||
"fundId\n" +
|
||||
"Optional: For associating a loan with a given fund.\n" +
|
||||
"loanOfficerId\n" +
|
||||
"Optional: For associating a loan with a given staff member who is a loan officer.\n" +
|
||||
"loanPurposeId\n" +
|
||||
"Optional: For marking a loan with a given loan purpose option. Loan purposes are configurable and can be setup by system admin through code/code values screens.\n" +
|
||||
"principal\n" +
|
||||
"The loan amount to be disbursed to through loan.\n" +
|
||||
"loanTermFrequency\n" +
|
||||
"The length of loan term\n" +
|
||||
"Used like: loanTermFrequency loanTermFrequencyType\n" +
|
||||
"e.g. 12 Months\n" +
|
||||
"loanTermFrequencyType\n" +
|
||||
"The loan term period to use. Used like: loanTermFrequency loanTermFrequencyType\n" +
|
||||
"e.g. 12 Months Example Values: 0=Days, 1=Weeks, 2=Months, 3=Years\n" +
|
||||
"numberOfRepayments\n" +
|
||||
"Number of installments to repay.\n" +
|
||||
"Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType\n" +
|
||||
"e.g. 10 (repayments) Every 12 Weeks\n" +
|
||||
"repaymentEvery\n" +
|
||||
"Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType\n" +
|
||||
"e.g. 10 (repayments) Every 12 Weeks\n" +
|
||||
"repaymentFrequencyType\n" +
|
||||
"Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType\n" +
|
||||
"e.g. 10 (repayments) Every 12 Weeks \n" +
|
||||
"Example Values: 0=Days, 1=Weeks, 2=Months\n" +
|
||||
"interestRatePerPeriod\n" +
|
||||
"Interest Rate.\n" +
|
||||
"Used like: interestRatePerPeriod % interestRateFrequencyType - interestType\n" +
|
||||
"e.g. 12.0000% Per year - Declining Balance\n" +
|
||||
"interestRateFrequencyType\n" +
|
||||
"Used like: interestRatePerPeriod% interestRateFrequencyType - interestType\n" +
|
||||
"e.g. 12.0000% Per year - Declining Balance \n" +
|
||||
"Example Values: 2=Per month, 3=Per year\n" +
|
||||
"graceOnPrincipalPayment\n" +
|
||||
"Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period.\n" +
|
||||
"graceOnInterestPayment\n" +
|
||||
"Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.\n" +
|
||||
"graceOnInterestCharged\n" +
|
||||
"Optional: Integer - represents the number of repayment periods that should be interest-free.\n" +
|
||||
"graceOnArrearsAgeing\n" +
|
||||
"Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue.\n" +
|
||||
"interestChargedFromDate\n" +
|
||||
"Optional: Date - The date from with interest is to start being charged.\n" +
|
||||
"expectedDisbursementDate\n" +
|
||||
"The proposed disbursement date of the loan so a proposed repayment schedule can be provided.\n" +
|
||||
"submittedOnDate\n" +
|
||||
"The date the loan application was submitted by applicant.\n" +
|
||||
"linkAccountId\n" +
|
||||
"The Savings Account id for linking with loan account for payments.\n" +
|
||||
"amortizationType\n" +
|
||||
"Example Values: 0=Equal principle payments, 1=Equal installments\n" +
|
||||
"interestType\n" +
|
||||
"Used like: interestRatePerPeriod% interestRateFrequencyType - interestType\n" +
|
||||
"e.g. 12.0000% Per year - Declining Balance \n" +
|
||||
"Example Values: 0=Declining Balance, 1=Flat\n" +
|
||||
"interestCalculationPeriodType\n" +
|
||||
"Example Values: 0=Daily, 1=Same as repayment period\n" +
|
||||
"allowPartialPeriodInterestCalcualtion\n" +
|
||||
"This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. Example: Interest charged from is 5th of April , Principal is 10000 and interest is 1% per month then the interest will be (10000 * 1%)* (25/30) , it calculates for the month first then calculates exact periods between start date and end date(can be a decimal)\n" +
|
||||
"inArrearsTolerance\n" +
|
||||
"The amount that can be 'waived' at end of all loan payments because it is too small to worry about.\n" +
|
||||
"This is also the tolerance amount assessed when determining if a loan is in arrears.\n" +
|
||||
"transactionProcessingStrategyId\n" +
|
||||
"An enumeration that indicates the type of transaction processing strategy to be used. This relates to functionality that is also known as Payment Application Logic.\n" +
|
||||
"A number of out of the box approaches exist, some are custom to specific MFIs, some are more general and indicate the order in which payments are processed.\n" +
|
||||
"\n" +
|
||||
"Refer to the Payment Application Logic / Transaction Processing Strategy section in the appendix for more detailed overview of each available payment application logic provided out of the box.\n" +
|
||||
"\n" +
|
||||
"List of current approaches:\n" +
|
||||
"1 = Mifos style (Similar to Old Mifos)\n" +
|
||||
"2 = Heavensfamily (Custom MFI approach)\n" +
|
||||
"3 = Creocore (Custom MFI approach)\n" +
|
||||
"4 = RBI (India)\n" +
|
||||
"5 = Principal Interest Penalties Fees Order\n" +
|
||||
"6 = Interest Principal Penalties Fees Order\n" +
|
||||
"7 = Early Payment Strategy\n" +
|
||||
"loanType\n" +
|
||||
"To represent different type of loans.\n" +
|
||||
"At present there are three type of loans are supported. \n" +
|
||||
"Available loan types:\n" +
|
||||
"individual: Loan given to individual member\n" +
|
||||
"group: Loan given to group as a whole\n" +
|
||||
"jlg: Joint liability group loan given to members in a group on individual basis. JLG loan can be given to one or more members in a group.\n" +
|
||||
"recalculationRestFrequencyDate\n" +
|
||||
"Specifies rest frequency start date for interest recalculation. This date must be before or equal to disbursement date\n" +
|
||||
"recalculationCompoundingFrequencyDate\n" +
|
||||
"Specifies compounding frequency start date for interest recalculation. This date must be equal to disbursement date")
|
||||
})
|
||||
public class LoansApiResource {
|
||||
|
||||
private final Set<String> LOAN_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "accountNo", "status", "externalId", "clientId",
|
||||
|
||||
+4
-1
@@ -65,7 +65,10 @@ import java.util.*;
|
||||
@Path("/loanproducts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Loan Products", description = "A Loan product is a template that is used when creating a loan. Much of the template definition can be overridden during loan creation.")
|
||||
@Api(tags = {"Loan Products"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Loan Products", description = "A Loan product is a template that is used when creating a loan. Much of the template definition can be overridden during loan creation.")
|
||||
})
|
||||
public class LoanProductsApiResource {
|
||||
|
||||
private final Set<String> LOAN_PRODUCT_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "shortName", "description",
|
||||
|
||||
+4
-1
@@ -47,7 +47,10 @@ import java.util.Set;
|
||||
@Path("/{resourceType}/{resourceId}/notes")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Notes", description = "Notes API allows to enter notes for supported resources.")
|
||||
@Api(tags = {"Notes"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Notes", description = "Notes API allows to enter notes for supported resources.")
|
||||
})
|
||||
public class NotesApiResource {
|
||||
|
||||
private final Set<String> NOTE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "clientId", "groupId", "loanId",
|
||||
|
||||
+4
-1
@@ -41,7 +41,10 @@ import java.util.Collection;
|
||||
|
||||
@Path("/paymenttypes")
|
||||
@Component
|
||||
@Api(value = "Payment Type", description = "This defines the payment type")
|
||||
@Api(tags = {"Payment Type"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Payment Type", description = "This defines the payment type")
|
||||
})
|
||||
public class PaymentTypeApiResource {
|
||||
|
||||
private final PlatformSecurityContext securityContext;
|
||||
|
||||
+4
-1
@@ -83,7 +83,10 @@ import org.springframework.util.CollectionUtils;
|
||||
@Path("/fixeddepositaccounts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Fixed Deposit Account", description = "Fixed Deposit accounts are instances of a praticular fixed deposit product created. An application process around the creation of accounts is also supported.")
|
||||
@Api(tags = {"Fixed Deposit Account"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Fixed Deposit Account", description = "Fixed Deposit accounts are instances of a praticular fixed deposit product created. An application process around the creation of accounts is also supported.")
|
||||
})
|
||||
public class FixedDepositAccountsApiResource {
|
||||
|
||||
private final DepositAccountReadPlatformService depositAccountReadPlatformService;
|
||||
|
||||
+4
-1
@@ -69,7 +69,10 @@ import java.util.Map;
|
||||
@Path("/fixeddepositproducts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Fixed Deposit Product", description = "This is one of the advanced term deposit product offered by MFI's. The Fixed Deposit Products (aka FD) product offerings are modeled using this API.\n" + "\n" + "The FD products are deposit accounts which are held for a fixed term – like 1 year, 2 years etc.\n" + "\n" + "When creating fixed deposit accounts, the details from the fixed deposit product are used to auto fill details of the fixed deposit account application process.")
|
||||
@Api(tags = {"Fixed Deposit Product"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Fixed Deposit Product", description = "This is one of the advanced term deposit product offered by MFI's. The Fixed Deposit Products (aka FD) product offerings are modeled using this API.\n" + "\n" + "The FD products are deposit accounts which are held for a fixed term – like 1 year, 2 years etc.\n" + "\n" + "When creating fixed deposit accounts, the details from the fixed deposit product are used to auto fill details of the fixed deposit account application process.")
|
||||
})
|
||||
public class FixedDepositProductsApiResource {
|
||||
|
||||
private final DepositProductReadPlatformService depositProductReadPlatformService;
|
||||
|
||||
+4
-1
@@ -52,7 +52,10 @@ import java.util.Set;
|
||||
@Path("/recurringdepositaccounts/{recurringDepositAccountId}/transactions")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Recurring Deposit Account Transactions", description = "Transactions possible on a recurring deposit account.")
|
||||
@Api(tags = {"Recurring Deposit Account Transactions"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Recurring Deposit Account Transactions", description = "Transactions possible on a recurring deposit account.")
|
||||
})
|
||||
public class RecurringDepositAccountTransactionsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -80,7 +80,10 @@ import org.springframework.util.CollectionUtils;
|
||||
@Path("/recurringdepositaccounts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Recurring Deposit Account", description = "Recurring Deposit accounts are instances of a praticular recurring deposit product created. An application process around the creation of accounts is also supported.")
|
||||
@Api(tags = {"Recurring Deposit Account"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Recurring Deposit Account", description = "Recurring Deposit accounts are instances of a praticular recurring deposit product created. An application process around the creation of accounts is also supported.")
|
||||
})
|
||||
public class RecurringDepositAccountsApiResource {
|
||||
|
||||
private final DepositAccountReadPlatformService depositAccountReadPlatformService;
|
||||
|
||||
+4
-1
@@ -69,7 +69,10 @@ import java.util.Map;
|
||||
@Path("/recurringdepositproducts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Recurring Deposit Product", description = "Recurring Deposits are a special kind of Term Deposits offered by MFI's. The Recurring Deposit Products (aka RD) product offerings are modeled using this API.\n" + "\n" + "Recurring Deposits help people with regular incomes to deposit a fixed amount every month (specified recurring frequency) into their Recurring Deposit account.\n" + "\n" + "When creating recurring deposit accounts, the details from the recurring deposit product are used to auto fill details of the recurring deposit account application process.")
|
||||
@Api(tags = {"Recurring Deposit Product"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Recurring Deposit Product", description = "Recurring Deposits are a special kind of Term Deposits offered by MFI's. The Recurring Deposit Products (aka RD) product offerings are modeled using this API.\n" + "\n" + "Recurring Deposits help people with regular incomes to deposit a fixed amount every month (specified recurring frequency) into their Recurring Deposit account.\n" + "\n" + "When creating recurring deposit accounts, the details from the recurring deposit product are used to auto fill details of the recurring deposit account application process.")
|
||||
})
|
||||
public class RecurringDepositProductsApiResource {
|
||||
|
||||
private final DepositProductReadPlatformService depositProductReadPlatformService;
|
||||
|
||||
+4
-1
@@ -47,7 +47,10 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.*;
|
||||
@Path("/savingsaccounts/{savingsAccountId}/charges")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Savings Charges", description = "Its typical for MFIs to add maintenance and operating charges. They can be either Fees or Penalties.\n" + "\n" + "Savings Charges are instances of Charges and represent either fees and penalties for savings products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Savings account) are described here")
|
||||
@Api(tags = {"Savings Charges"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Savings Charges", description = "Its typical for MFIs to add maintenance and operating charges. They can be either Fees or Penalties.\n" + "\n" + "Savings Charges are instances of Charges and represent either fees and penalties for savings products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Savings account) are described here")
|
||||
})
|
||||
public class SavingsAccountChargesApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -73,7 +73,10 @@ import org.springframework.util.CollectionUtils;
|
||||
@Path("/savingsaccounts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Savings Account", description = "Savings accounts are instances of a particular savings product created for an individual or group. An application process around the creation of accounts is also supported.")
|
||||
@Api(tags = {"Savings Account"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Savings Account", description = "Savings accounts are instances of a particular savings product created for an individual or group. An application process around the creation of accounts is also supported.")
|
||||
})
|
||||
public class SavingsAccountsApiResource {
|
||||
|
||||
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
|
||||
|
||||
+4
-1
@@ -65,7 +65,10 @@ import java.util.Map;
|
||||
@Path("/savingsproducts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Savings Product", description = "An MFIs savings product offerings are modeled using this API.\n" + "\n" + "When creating savings accounts, the details from the savings product are used to auto fill details of the savings account application process.")
|
||||
@Api(tags = {"Savings Product"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Savings Product", description = "An MFIs savings product offerings are modeled using this API." + "\n" + "When creating savings accounts, the details from the savings product are used to auto fill details of the savings account application process.")
|
||||
})
|
||||
public class SavingsProductsApiResource {
|
||||
|
||||
private final SavingsProductReadPlatformService savingProductReadPlatformService;
|
||||
|
||||
+19
-2
@@ -21,6 +21,7 @@ package org.apache.fineract.portfolio.search.api;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
@@ -32,6 +33,7 @@ import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
|
||||
import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
|
||||
import org.apache.fineract.infrastructure.core.serialization.ToApiJsonSerializer;
|
||||
@@ -49,6 +51,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/search")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Search API"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Search API", description = "Search API allows to search scoped resources clients, loans and groups on specified fields.")
|
||||
})
|
||||
public class SearchApiResource {
|
||||
|
||||
private final Set<String> searchResponseParameters = SEARCH_RESPONSE_PARAMETERS.getAllValues();
|
||||
@@ -74,6 +80,8 @@ public class SearchApiResource {
|
||||
@Path("/template")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@ApiOperation(value = "Retrive Adhoc Search query template", httpMethod = "GET", notes = "Mandatory Fields\n" + "\n" + "search?query=000000001\n")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "", response = SearchApiResourceSwagger.GetSearchResponse.class)})
|
||||
public String retrieveAdHocSearchQueryTemplate(@Context final UriInfo uriInfo) {
|
||||
|
||||
final AdHocSearchQueryData templateData = this.searchReadPlatformService.retrieveAdHocQueryTemplate();
|
||||
@@ -85,8 +93,10 @@ public class SearchApiResource {
|
||||
@GET
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public String searchData(@Context final UriInfo uriInfo, @QueryParam("query") final String query,
|
||||
@QueryParam("resource") final String resource ,@DefaultValue("false") @QueryParam("exactMatch") Boolean exactMatch) {
|
||||
@ApiOperation(value = "Search Resources", notes = "Example Requests:\n" + "\n" + "search?query=000000001\n" + "\n" + "\n" + "search?query=Petra&resource=clients,groups\n" + "\n" + "\n" + "search?query=Petra&resource=clients,groups&exactMatch=true")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "", response = SearchApiResourceSwagger.GetSearchResponse.class)})
|
||||
public String searchData(@Context final UriInfo uriInfo, @QueryParam("query") @ApiParam(value = "query")final String query,
|
||||
@QueryParam("resource") @ApiParam(value = "resource") final String resource ,@DefaultValue("false") @QueryParam("exactMatch") @ApiParam(value = "exactMatch") Boolean exactMatch) {
|
||||
|
||||
final SearchConditions searchConditions = new SearchConditions(query, resource,exactMatch);
|
||||
|
||||
@@ -100,6 +110,13 @@ public class SearchApiResource {
|
||||
@Path("/advance")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@ApiOperation(value = "Adhoc query search", notes = "AdHocQuery search has more search options, it is a POST request, it uses request body to send search parameters\n" + "\n" + "\n" + "Mandatory fields:" + "entities" + "\n" + "\n" + "Optional fields:" + "loanStatus, loanProducts, offices, loanDateOption, loanFromDate, loanToDate, \n" +
|
||||
"includeOutStandingAmountPercentage, outStandingAmountPercentageCondition, \n" +
|
||||
"minOutStandingAmountPercentage and maxOutStandingAmountPercentage OR outStandingAmountPercentage, \n" +
|
||||
"includeOutstandingAmount, outstandingAmountCondition, \n" +
|
||||
"minOutstandingAmount and maxOutstandingAmount OR outstandingAmount" )
|
||||
@ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SearchApiResourceSwagger.PostAdhocQuerySearchRequest.class )})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "", response = SearchApiResourceSwagger.PostAdhocQuerySearchResponse.class)})
|
||||
public String advancedSearch(@Context final UriInfo uriInfo, final String json) {
|
||||
|
||||
final AdHocQuerySearchConditions searchConditions = this.fromApiJsonDeserializer.retrieveSearchConditions(json);
|
||||
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you 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.
|
||||
*/
|
||||
package org.apache.fineract.portfolio.search.api;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.joda.time.LocalDate;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Created by Kang Breder on 13/06/19.
|
||||
*/
|
||||
final class SearchApiResourceSwagger {
|
||||
private SearchApiResourceSwagger() {
|
||||
|
||||
}
|
||||
|
||||
@ApiModel(value = "GetSearchResponse")
|
||||
public static final class GetSearchResponse {
|
||||
private GetSearchResponse() {
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Long entityId;
|
||||
@ApiModelProperty(example = "000000001")
|
||||
public Long entityAccountNo;
|
||||
@ApiModelProperty(example = "ID_JKZGEXF")
|
||||
public String entityExternalId;
|
||||
@ApiModelProperty(example = "Group_Name_HVCU5")
|
||||
public String entityName;
|
||||
@ApiModelProperty(example = "GROUP")
|
||||
public String entityType;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Long parentId;
|
||||
@ApiModelProperty(example = "Head Office")
|
||||
public String parentName;
|
||||
public EnumOptionData entityStatus;
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostAdhocQuerySearchRequest")
|
||||
public static final class PostAdhocQuerySearchRequest {
|
||||
private PostAdhocQuerySearchRequest() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiModelProperty(example = "en")
|
||||
public String locale;
|
||||
@ApiModelProperty(example = "dd MMMM yyyy")
|
||||
public String dateFormat;
|
||||
@ApiModelProperty(example = "approvalDate")
|
||||
public String loanDateOption;
|
||||
@ApiModelProperty(example = "2013-01-01")
|
||||
public LocalDate loanFromDate;
|
||||
@ApiModelProperty(example = "2014-01-27")
|
||||
public LocalDate loanToDate;
|
||||
@ApiModelProperty(example = "true")
|
||||
public boolean includeOutStandingAmountPercentage;
|
||||
@ApiModelProperty(example = "<=")
|
||||
public String outStandingAmountPercentageCondition;
|
||||
@ApiModelProperty(example = "80")
|
||||
public Long outStandingAmountPercentage;
|
||||
@ApiModelProperty(example = "true")
|
||||
public boolean includeOutstandingAmount;
|
||||
@ApiModelProperty(example = "between")
|
||||
public String outstandingAmountCondition;
|
||||
@ApiModelProperty(example = "100")
|
||||
public Long minOutstandingAmount;
|
||||
@ApiModelProperty(example = "10000")
|
||||
public Long maxOutstandingAmount;
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostAdhocQuerySearchResponse")
|
||||
public static final class PostAdhocQuerySearchResponse {
|
||||
private PostAdhocQuerySearchResponse() {
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "HFC")
|
||||
public String officeName;
|
||||
@ApiModelProperty(example = "01 BC3M")
|
||||
public String loanProductName;
|
||||
@ApiModelProperty(example = " 5692.41")
|
||||
public Long loanOutStanding;
|
||||
@ApiModelProperty(example = "76.4")
|
||||
public Long percentage;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-2
@@ -52,10 +52,15 @@ import org.joda.time.LocalDate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/self/accounttransfers")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Account Transfer"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Account transfer", description = "")
|
||||
})
|
||||
public class SelfAccountTransferApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
@@ -94,8 +99,11 @@ public class SelfAccountTransferApiResource {
|
||||
@Path("template")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@ApiOperation(value = "Retrieve Account Transfer Template", httpMethod = "GET", notes = "Returns list of loan/savings accounts that can be used for account transfer\n" +
|
||||
"\n" + "\n" + "Example Requests:\n" + "\n" + "self/accounttransfers/template\n")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfAccountTransferApiResourceSwagger.GetAccountTransferTemplateResponse.class)})
|
||||
public String template(
|
||||
@DefaultValue("") @QueryParam("type") final String type,
|
||||
@DefaultValue("") @QueryParam("type") @ApiParam("type") final String type,
|
||||
@Context final UriInfo uriInfo) {
|
||||
|
||||
AppUser user = this.context.authenticatedUser();
|
||||
@@ -120,8 +128,11 @@ public class SelfAccountTransferApiResource {
|
||||
@POST
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@ApiOperation(value = "Create new Transfer", httpMethod = "POST", notes = "Ability to create new transfer of monetary funds from one account to another.\n" +
|
||||
"\n" + "\n" + "Example Requests:\n" + "\n" + " self/accounttransfers/\n")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfAccountTransferApiResourceSwagger.PostNewTransferResponse.class)})
|
||||
public String create(
|
||||
@DefaultValue("") @QueryParam("type") final String type,
|
||||
@DefaultValue("") @QueryParam("type") @ApiParam("type") final String type,
|
||||
final String apiRequestBodyAsJson) {
|
||||
Map<String, Object> params = this.dataValidator.validateCreate(type,
|
||||
apiRequestBodyAsJson);
|
||||
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you 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.
|
||||
*/
|
||||
package org.apache.fineract.portfolio.self.account.api;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Created by Kang Breder on 29/07/19.
|
||||
*/
|
||||
|
||||
final class SelfAccountTransferApiResourceSwagger {
|
||||
private SelfAccountTransferApiResourceSwagger() {
|
||||
}
|
||||
|
||||
|
||||
@ApiModel(value = "GetAccountTransferTemplateResponse")
|
||||
public final static class GetAccountTransferTemplateResponse {
|
||||
private GetAccountTransferTemplateResponse() {
|
||||
}
|
||||
|
||||
final class GetAccountOptions {
|
||||
private GetAccountOptions() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountType.savings")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "Savings Account")
|
||||
public String value;
|
||||
}
|
||||
|
||||
public Set<GetAccountOptions> accountTypeOptions;
|
||||
|
||||
final class GetFromAccountOptions {
|
||||
private GetFromAccountOptions() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer accountId;
|
||||
@ApiModelProperty(example = "00000001")
|
||||
public Integer accountNo;
|
||||
public GetAccountTransferTemplateResponse.GetAccountOptions accountType;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer clientId;
|
||||
@ApiModelProperty(example = "ABC")
|
||||
public String clientName;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer officeId;
|
||||
@ApiModelProperty(example = "HEAD OFFICE")
|
||||
public String officeName;
|
||||
|
||||
}
|
||||
|
||||
public Set<GetFromAccountOptions> fromAccountTypeOptions;
|
||||
|
||||
final class GetToAccountOptions {
|
||||
private GetToAccountOptions() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer accountId;
|
||||
@ApiModelProperty(example = "00000001")
|
||||
public Integer accountNo;
|
||||
public GetAccountTransferTemplateResponse.GetAccountOptions accountType;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer clientId;
|
||||
@ApiModelProperty(example = "ABC")
|
||||
public String clientName;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer officeId;
|
||||
@ApiModelProperty(example = "HEAD OFFICE")
|
||||
public String officeName;
|
||||
|
||||
}
|
||||
|
||||
public Set<GetFromAccountOptions> toAccountTypeOptions;
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostNewTransferRequest")
|
||||
public final static class PostNewTransferRequest {
|
||||
private PostNewTransferRequest() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer fromOfficeId;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer fromClientId;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer fromAccountType;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer fromAccountId;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer toOfficeId;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer toClientId;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer toAccountType;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer toAccountId;
|
||||
@ApiModelProperty(example = "dd MMMM YYYY")
|
||||
public String dateFormat;
|
||||
@ApiModelProperty(example = "en")
|
||||
public String locale;
|
||||
@ApiModelProperty(example = "01 August 2011")
|
||||
public String transferDate;
|
||||
@ApiModelProperty(example = "112.45")
|
||||
public Float transferAmount;
|
||||
@ApiModelProperty(example = "A description of the transfer")
|
||||
public String transferDescription;
|
||||
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostNewTransferResponse")
|
||||
public final static class PostNewTransferResponse {
|
||||
private PostNewTransferResponse() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer savingsId;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer resourceId;
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -48,7 +48,10 @@ import java.util.Set;
|
||||
@Path("/self/beneficiaries/tpt")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Beneficiary Third Party Transfer", description = "")
|
||||
@Api(tags = {"Self Third Party Transfer"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Third Party Transfer", description = "")
|
||||
})
|
||||
public class SelfBeneficiariesTPTApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -57,7 +57,10 @@ import com.sun.jersey.multipart.FormDataParam;
|
||||
@Path("/self/clients")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Self Client", description = "")
|
||||
@Api(tags = {"Self Client"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Client", description = "")
|
||||
})
|
||||
public class SelfClientsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+4
-1
@@ -47,7 +47,10 @@ import java.util.HashMap;
|
||||
@Path("/self/loans")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Self Loans", description = "")
|
||||
@Api(tags = {"Self Loans"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Loans", description = "")
|
||||
})
|
||||
public class SelfLoansApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+10
-1
@@ -40,10 +40,15 @@ import org.apache.fineract.portfolio.self.pockets.service.PocketAccountMappingRe
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/self/pockets")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Pocket"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Pocket", description = "")
|
||||
})
|
||||
public class PocketApiResource {
|
||||
private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
|
||||
@SuppressWarnings("rawtypes")
|
||||
@@ -63,7 +68,9 @@ public class PocketApiResource {
|
||||
@POST
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public String handleCommands(@QueryParam("command") final String commandParam, @Context final UriInfo uriInfo,
|
||||
@ApiOperation(value = "Link/delink accounts to/from pocket", httpMethod = "POST", notes = "Pockets behave as favourites. An user can link his/her Loan, Savings and Share accounts to pocket for faster access. In a similar way linked accounts can be delinked from the pocket.\n\n" + "Example Requests:\n" + "\n" + "self/pockets?command=linkAccounts\n" + "\n" + "self/pockets?command=delinkAccounts")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PocketApiResourceSwagger.PostLinkDelinkAccountsToFromPocketResponse.class)})
|
||||
public String handleCommands(@QueryParam("command") @ApiParam(value = "command") final String commandParam, @Context final UriInfo uriInfo,
|
||||
final String apiRequestBodyAsJson) {
|
||||
|
||||
final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson);
|
||||
@@ -88,6 +95,8 @@ public class PocketApiResource {
|
||||
@GET
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@ApiOperation(value = "Retrieve accounts linked to pocket", httpMethod = "GET", notes = "All linked loan\n\n" + "Example Requests:\n" + "\n" + "\n" + "self/pockets")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PocketApiResourceSwagger.GetAccountsLinkedToPocketResponse.class)})
|
||||
public String retrieveAll() {
|
||||
return this.toApiJsonSerializer.serialize(this.pocketAccountMappingReadPlatformService.retrieveAll());
|
||||
}
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you 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.
|
||||
*/
|
||||
package org.apache.fineract.portfolio.self.pockets.api;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* Created by Kang Breder on 07/08/19.
|
||||
*/
|
||||
|
||||
final class PocketApiResourceSwagger {
|
||||
private PocketApiResourceSwagger() {
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostLinkDelinkAccountsToFromPocketRequest")
|
||||
public final static class PostLinkDelinkAccountsToFromPocketRequest {
|
||||
private PostLinkDelinkAccountsToFromPocketRequest() {
|
||||
}
|
||||
final class GetPocketAccountDetail {
|
||||
private GetPocketAccountDetail() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "11")
|
||||
public Integer accountId;
|
||||
@ApiModelProperty(example = "LOAN")
|
||||
public String accountType;
|
||||
}
|
||||
public Set<GetPocketAccountDetail> accountDetail;
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostLinkDelinkAccountsToFromPocketResponse")
|
||||
public final static class PostLinkDelinkAccountsToFromPocketResponse {
|
||||
private PostLinkDelinkAccountsToFromPocketResponse() {
|
||||
}
|
||||
@ApiModelProperty(example = "6")
|
||||
public Integer resourceId;
|
||||
}
|
||||
|
||||
@ApiModel(value = "GetAccountsLinkedToPocketResponse")
|
||||
public final static class GetAccountsLinkedToPocketResponse {
|
||||
private GetAccountsLinkedToPocketResponse() {
|
||||
}
|
||||
|
||||
final class GetPocketLoanAccounts {
|
||||
private GetPocketLoanAccounts() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "6")
|
||||
public Integer pocketId;
|
||||
@ApiModelProperty(example = "11")
|
||||
public Integer accountId;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer accountType;
|
||||
@ApiModelProperty(example = "000000011")
|
||||
public Integer accountNumber;
|
||||
@ApiModelProperty(example = "10")
|
||||
public Integer id;
|
||||
}
|
||||
|
||||
final class GetPocketSavingAccounts {
|
||||
private GetPocketSavingAccounts() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "6")
|
||||
public Integer pocketId;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer accountId;
|
||||
@ApiModelProperty(example = "3")
|
||||
public Integer accountType;
|
||||
@ApiModelProperty(example = "000000002")
|
||||
public Integer accountNumber;
|
||||
@ApiModelProperty(example = "11")
|
||||
public Integer id;
|
||||
}
|
||||
|
||||
final class GetPocketShareAccounts {
|
||||
private GetPocketShareAccounts() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Set<GetPocketLoanAccounts> loanAccounts;
|
||||
public Set<GetPocketSavingAccounts> savingAccounts;
|
||||
public Set<GetPocketShareAccounts> shareAccounts;
|
||||
}
|
||||
}
|
||||
|
||||
+134
@@ -35,10 +35,144 @@ import org.apache.fineract.portfolio.self.client.service.AppuserClientMapperRead
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/self/loanproducts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Loan Products"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Loan Products", description = "A Loan product is a template that is used when creating a loan. Much of the template definition can be overridden during loan creation.\n" + "\n" +
|
||||
"Field Descriptions\n" +
|
||||
"name\n" +
|
||||
"Name associated with loan product on system.\n" +
|
||||
"shortName\n" +
|
||||
"Short name associated with a loan product. \n" +
|
||||
"An abbreviated version of the name, used in reports or menus where space is limited, such as Collection Sheets.\n" +
|
||||
"description\n" +
|
||||
"For providing helpful description of product offering.\n" +
|
||||
"fundId\n" +
|
||||
"For associating a loan product with a given fund by default.\n" +
|
||||
"includeInBorrowerCycle\n" +
|
||||
"It is a flag, Used to denote whether the loans should include in loan cycle counter or not.\n" +
|
||||
"useBorrowerCycle\n" +
|
||||
"It is a flag, Used to denote whether the loans should depend on \n" +
|
||||
"borrower loan cycle counter or not.\n" +
|
||||
"currencyCode\n" +
|
||||
"A three letter ISO code of currency.\n" +
|
||||
"digitsAfterDecimal\n" +
|
||||
"Override the currency default value for digitsAfterDecimal.\n" +
|
||||
"inMultiplesOf\n" +
|
||||
"Override the default value for rounding currency to multiples of value provided.\n" +
|
||||
"installmentAmountInMultiplesOf\n" +
|
||||
"Override the default value for rounding instalment amount to multiples of value provided.\n" +
|
||||
"principal\n" +
|
||||
"The loan amount to be disbursed to through loan.\n" +
|
||||
"numberOfRepayments\n" +
|
||||
"Number of installments to repay.\n" +
|
||||
"Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType\n" +
|
||||
"e.g. 10 (repayments) Every 12 Weeks\n" +
|
||||
"repaymentEvery\n" +
|
||||
"Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType\n" +
|
||||
"e.g. 10 (repayments) Every 12 Weeks\n" +
|
||||
"repaymentFrequencyType\n" +
|
||||
"Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType\n" +
|
||||
"e.g. 10 (repayments) Every 12 Weeks \n" +
|
||||
"Example Values: 0=Days, 1=Weeks, 2=Months\n" +
|
||||
"interestRatePerPeriod\n" +
|
||||
"Interest Rate.\n" +
|
||||
"Used like: interestRatePerPeriod % interestRateFrequencyType - interestType\n" +
|
||||
"e.g. 12.0000% Per year - Declining Balance\n" +
|
||||
"interestRateFrequencyType\n" +
|
||||
"Used like: interestRatePerPeriod% interestRateFrequencyType - interestType\n" +
|
||||
"e.g. 12.0000% Per year - Declining Balance \n" +
|
||||
"Example Values: 2=Per month, 3=Per year\n" +
|
||||
"amortizationType\n" +
|
||||
"Example Values: 0=Equal principle payments, 1=Equal installments\n" +
|
||||
"interestType\n" +
|
||||
"Used like: interestRatePerPeriod% interestRateFrequencyType - interestType\n" +
|
||||
"e.g. 12.0000% Per year - Declining Balance \n" +
|
||||
"Example Values: 0=Declining Balance, 1=Flat\n" +
|
||||
"interestCalculationPeriodType\n" +
|
||||
"Example Values: 0=Daily, 1=Same as repayment period\n" +
|
||||
"allowPartialPeriodInterestCalcualtion\n" +
|
||||
"This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. Example: Interest charged from is 5th of April , Principal is 10000 and interest is 1% per month then the interest will be (10000 * 1%)* (25/30) , it calculates for the month first then calculates exact periods between start date and end date(can be a decimal)\n" +
|
||||
"inArrearsTolerance\n" +
|
||||
"The amount that can be 'waived' at end of all loan payments because it is too small to worry about.\n" +
|
||||
"This is also the tolerance amount assessed when determining if a loan is in arrears.\n" +
|
||||
"principalVariationsForBorrowerCycle,interestRateVariationsForBorrowerCycle,\n" +
|
||||
"numberOfRepaymentVariationsForBorrowerCycle\n" +
|
||||
"Variations for loan, based on borrower cycle number\n" +
|
||||
"minimumDaysBetweenDisbursalAndFirstRepayment\n" +
|
||||
"The minimum number of days allowed between a Loan disbursal and its first repayment.\n" +
|
||||
"principalThresholdForLastInstalment\n" +
|
||||
"Field represents percentage of current instalment principal amount for comparing against principal outstanding to add another repayment instalment. If the outstanding principal amount is less then calculated amount, remaining outstanding amount will be added to current instalment. Default value for multi disburse loan is 50% and non-multi disburse loan is 0%\n" +
|
||||
"canDefineInstallmentAmount\n" +
|
||||
"if provided as true, then fixed instalment amount can be provided from loan account.\n" +
|
||||
"transactionProcessingStrategyId\n" +
|
||||
"An enumeration that indicates the type of transaction processing strategy to be used. This relates to functionality that is also known as Payment Application Logic.\n" +
|
||||
"A number of out of the box approaches exist, some are custom to specific MFIs, some are more general and indicate the order in which payments are processed.\n" +
|
||||
"\n" +
|
||||
"Refer to the Payment Application Logic / Transaction Processing Strategy section in the appendix for more detailed overview of each available payment application logic provided out of the box.\n" +
|
||||
"\n" +
|
||||
"List of current approaches:\n" +
|
||||
"1 = Mifos style (Similar to Old Mifos)\n" +
|
||||
"2 = Heavensfamily (Custom MFI approach)\n" +
|
||||
"3 = Creocore (Custom MFI approach)\n" +
|
||||
"4 = RBI (India)\n" +
|
||||
"5 = Principal Interest Penalties Fees Order\n" +
|
||||
"6 = Interest Principal Penalties Fees Order\n" +
|
||||
"7 = Early Payment Strategy\n" +
|
||||
"graceOnPrincipalPayment\n" +
|
||||
"Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period.\n" +
|
||||
"graceOnInterestPayment\n" +
|
||||
"Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.\n" +
|
||||
"graceOnInterestCharged\n" +
|
||||
"Optional: Integer - represents the number of repayment periods that should be interest-free.\n" +
|
||||
"graceOnArrearsAgeing\n" +
|
||||
"Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue.\n" +
|
||||
"overdueDaysForNPA\n" +
|
||||
"Optional: Integer - represents the maximum number of days a Loan may be overdue before being classified as a NPA (non performing asset)\n" +
|
||||
"accountMovesOutOfNPAOnlyOnArrearsCompletion\n" +
|
||||
"Optional: Boolean - if provided as true, Loan Account moves out of NPA state only when all arrears are cleared\n" +
|
||||
"accountingRule\n" +
|
||||
"Specifies if accounting is enabled for the particular product and the type of the accounting rule to be used Example Values:1=NONE, 2=CASH_BASED, 3=ACCRUAL_PERIODIC, 4=ACCRUAL_UPFRONT\n" +
|
||||
"isInterestRecalculationEnabled\n" +
|
||||
"It is a flag, Used to denote whether interest recalculation is enabled or disabled for the particular product\n" +
|
||||
"daysInYearType\n" +
|
||||
"Specifies the number of days in a year. \n" +
|
||||
"Example Values:1=ACTUAL(Actual number of days in year), 360=360 DAYS, 364=364 DAYS(52 WEEKS), 365=365 DAYS\n" +
|
||||
"daysInMonthType\n" +
|
||||
"Specifies the number of days in a month. \n" +
|
||||
"Example Values:1=ACTUAL(Actual number of days in month), 30=30 DAYS\n" +
|
||||
"interestRecalculationCompoundingMethod\n" +
|
||||
"Specifies which amount portion should be added to principal for interest recalculation. \n" +
|
||||
"Example Values:0=NONE(Only on principal), 1=INTEREST(Principal+Interest), 2=FEE(Principal+Fee), 3=FEE And INTEREST (Principal+Fee+Interest)\n" +
|
||||
"rescheduleStrategyMethod\n" +
|
||||
"Specifies what action should perform on loan repayment schedule for advance payments. \n" +
|
||||
"Example Values:1=Reschedule next repayments, 2=Reduce number of installments, 3=Reduce EMI amount\n" +
|
||||
"recalculationCompoundingFrequencyType\n" +
|
||||
"Specifies effective date from which the compounding of interest or fee amounts will be considered in recalculation on late payment.\n" +
|
||||
"Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly\n" +
|
||||
"recalculationCompoundingFrequencyInterval\n" +
|
||||
"Specifies compounding frequency interval for interest recalculation.\n" +
|
||||
"recalculationCompoundingFrequencyDate\n" +
|
||||
"Specifies compounding frequency start date for interest recalculation.\n" +
|
||||
"recalculationRestFrequencyType\n" +
|
||||
"Specifies effective date from which the late or advanced payment amounts will be considered in recalculation.\n" +
|
||||
"Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly\n" +
|
||||
"recalculationRestFrequencyInterval\n" +
|
||||
"Specifies rest frequency interval for interest recalculation.\n" +
|
||||
"recalculationRestFrequencyDate\n" +
|
||||
"Specifies rest frequency start date for interest recalculation.\n" +
|
||||
"preClosureInterestCalculationStrategy\n" +
|
||||
"Specifies applicable days for interest calculation on pre closure of a loan.\n" +
|
||||
"Example Values:1=Calculate till pre closure date, 2=Calculate till rest frequency date\n" +
|
||||
"isArrearsBasedOnOriginalSchedule\n" +
|
||||
"If Specified as true, arrears will be identified based on original schedule.\n" +
|
||||
"allowAttributeOverrides\n" +
|
||||
"Specifies if select attributes may be overridden for individual loan accounts.")
|
||||
})
|
||||
public class SelfLoanProductsApiResource {
|
||||
|
||||
private final LoanProductsApiResource loanProductsApiResource;
|
||||
|
||||
+5
@@ -33,10 +33,15 @@ import org.apache.fineract.useradministration.domain.AppUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/self/registration")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Service Registration"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Service Registration", description = "")
|
||||
})
|
||||
public class SelfServiceRegistrationApiResource {
|
||||
|
||||
private final SelfServiceRegistrationWritePlatformService selfServiceRegistrationWritePlatformService;
|
||||
|
||||
+18
-1
@@ -33,10 +33,24 @@ import org.apache.fineract.infrastructure.security.service.PlatformSecurityConte
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/self/runreports")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Run Report "})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Run Report", description = "This resource allows you to run and receive output from pre-defined Apache Fineract reports.\n" +
|
||||
"\n" +
|
||||
"The default output is a JSON formatted \"Generic Resultset\". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding \"&exportCSV=true\" to the end of your URL.\n" +
|
||||
"\n" +
|
||||
"If Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.\n" +
|
||||
"\n" +
|
||||
"The Apache Fineract reference application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).\n" +
|
||||
"\n" +
|
||||
"ARGUMENTS\n" +
|
||||
"R_'parameter names' ... optional, No defaults The number and names of the parameters depend on the specific report and how it has been configured. R_officeId is an example parameter name.Note: the prefix R_ stands for ReportinggenericResultSetoptional, defaults to true If 'true' an optimised JSON format is returned suitable for tabular display of data. If 'false' a simple JSON format is returned. parameterType optional, The only valid value is 'true'. If any other value is provided the argument will be ignored Determines whether the request looks in the list of reports or the list of parameters for its data. Doesn't apply to Pentaho reports.exportCSV optional, The only valid value is 'true'. If any other value is provided the argument will be ignored Output will be delivered as a CSV file instead of JSON. Doesn't apply to Pentaho reports.output-type optional, Defaults to HTML. Valid Values are HTML, XLS, XSLX, CSV and PDF for html, Excel, Excel 2007+, CSV and PDF formats respectively.Only applies to Pentaho reports.locale optional Any valid locale Ex: en_US, en_IN, fr_FR etcOnly applies to Pentaho reports.")
|
||||
})
|
||||
public class SelfRunReportApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
@@ -52,7 +66,10 @@ public class SelfRunReportApiResource {
|
||||
@Path("{reportName}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON, "text/csv", "application/vnd.ms-excel", "application/pdf", "text/html" })
|
||||
public Response runReport(@PathParam("reportName") final String reportName, @Context final UriInfo uriInfo) {
|
||||
@ApiOperation(value = "Running A Report", httpMethod = "GET", notes = "" + "Example Requests:\n" + "\n" + "\n" + "self/runreports/Client%20Details?R_officeId=1" + "\n" + "\n" + "\n" +
|
||||
"self/runreports/Client%20Details?R_officeId=1&exportCSV=true")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfRunReportApiResourceSwagger.GetRunReportResponse.class)})
|
||||
public Response runReport(@PathParam("reportName") @ApiParam(value = "reportName") final String reportName, @Context final UriInfo uriInfo) {
|
||||
this.context.authenticatedUser();
|
||||
final boolean isSelfServiceUserReport = true;
|
||||
return this.runreportsApiResource.runReport(reportName, uriInfo, isSelfServiceUserReport);
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you 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.
|
||||
*/
|
||||
package org.apache.fineract.portfolio.self.runreport;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.time.LocalDate;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Kang Breder on 07/08/19.
|
||||
*/
|
||||
|
||||
final class SelfRunReportApiResourceSwagger {
|
||||
private SelfRunReportApiResourceSwagger() {
|
||||
}
|
||||
@ApiModel(value = "GetRunReportResponse")
|
||||
public final static class GetRunReportResponse {
|
||||
private GetRunReportResponse() {
|
||||
}
|
||||
final class GetRunReportColumnHeaders {
|
||||
private GetRunReportColumnHeaders() {
|
||||
}
|
||||
@ApiModelProperty(example = "Office/Branch")
|
||||
public String columnName;
|
||||
@ApiModelProperty(example = "VARCHAR")
|
||||
public String columnType;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean isColumnNullable;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean isColumnPrimaryKey;
|
||||
@ApiModelProperty(example = "[]")
|
||||
public String columnValues;
|
||||
|
||||
}
|
||||
final class GetPocketData {
|
||||
private GetPocketData() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "[\"Head Office\", \"000000001\", \"John Doe\" \"2017-03-04\", \"786YYH7\"")
|
||||
public String row;
|
||||
}
|
||||
public Set<GetRunReportColumnHeaders> columnHeaders;
|
||||
public Set<GetPocketData> data;
|
||||
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -52,7 +52,10 @@ import org.springframework.stereotype.Component;
|
||||
@Path("/self/savingsaccounts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Self Savings Account", description = "")
|
||||
@Api(tags = {"Self Savings Account"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Savings Account", description = "")
|
||||
})
|
||||
public class SelfSavingsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+3
-2
@@ -29,14 +29,15 @@ import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Profile("basicauth")
|
||||
@Path("/self/authentication")
|
||||
@Api(value = "Self Authentication", description = "")
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Authentication", description = "Authenticates the credentials provided and returns the set roles and permissions allowed")
|
||||
})
|
||||
public class SelfAuthenticationApiResource {
|
||||
|
||||
private final AuthenticationApiResource authenticationApiResource;
|
||||
|
||||
+4
-1
@@ -40,7 +40,10 @@ import java.util.Set;
|
||||
|
||||
@Path("/self/user")
|
||||
@Component
|
||||
@Api(value = "Self User", description = "")
|
||||
@Api(tags = {"Self User"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self User", description = "")
|
||||
})
|
||||
public class SelfUserApiResource {
|
||||
|
||||
private final UsersApiResource usersApiResource;
|
||||
|
||||
+4
-1
@@ -35,7 +35,10 @@ import javax.ws.rs.core.MediaType;
|
||||
@Component
|
||||
@Profile("oauth")
|
||||
@Scope("singleton")
|
||||
@Api(value = "Self User Details", description = "")
|
||||
@Api(tags = {"Self User Details"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self User Details", description = "")
|
||||
})
|
||||
public class SelfUserDetailsApiResource {
|
||||
|
||||
private final UserDetailsApiResource userDetailsApiResource;
|
||||
|
||||
+19
-2
@@ -56,10 +56,16 @@ import org.apache.fineract.useradministration.domain.AppUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
|
||||
@Path("/self/shareaccounts")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Share Accounts"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Share Accounts", description = "")
|
||||
})
|
||||
public class SelfShareAccountsApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
@@ -101,7 +107,12 @@ public class SelfShareAccountsApiResource {
|
||||
@Path("template")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public String template(@QueryParam("clientId") final Long clientId, @QueryParam("productId") final Long productId,
|
||||
@ApiOperation(value = "Retrieve Share Account Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" +
|
||||
"Field Defaults\n" + "\n"+
|
||||
"Allowed Value Lists\n" + "\n"+ "\n"+ "Arguments\n"+ "\n"+ "clientId:Integer mandatory\n"+ "productId:Integer optionalIf entered, productId, productName and selectedProduct fields are returned.\n"+ "Example Requests:\n" + "\n" + "self/shareaccounts/template?clientId=14\n" + "\n" +
|
||||
"self/shareaccounts/template?clientId=14&productId=3\n")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.GetShareAccountsClientIdProductIdResponse.class)})
|
||||
public String template(@QueryParam("clientId") @ApiParam("clientId") final Long clientId, @QueryParam("productId") @ApiParam("productId") final Long productId,
|
||||
@Context final UriInfo uriInfo) {
|
||||
|
||||
validateAppuserClientsMapping(clientId);
|
||||
@@ -126,6 +137,8 @@ public class SelfShareAccountsApiResource {
|
||||
@POST
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
@ApiOperation(value = "Submit new share application", httpMethod = "POST", notes = "Mandatory fields:\n" + "\n" + "clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate\n" + "\n" + "\n" + "Optional Fields\n" + "\n" + "accountNo, externalId\n" + "\n" + "\n" + "Inherited from Product (if not provided)\n" + "\n" + "minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType.")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.PostNewShareApplicationResponse.class)})
|
||||
public String createAccount(final String apiRequestBodyAsJson) {
|
||||
HashMap<String, Object> attr = this.selfShareAccountsDataValidator
|
||||
.validateShareAccountApplication(apiRequestBodyAsJson);
|
||||
@@ -139,7 +152,11 @@ public class SelfShareAccountsApiResource {
|
||||
@Path("{accountId}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public String retrieveShareAccount(@PathParam("accountId") final Long accountId, @Context final UriInfo uriInfo) {
|
||||
/*
|
||||
@ApiOperation(value = "Retrieve a share application/account", httpMethod = "GET", notes = "\n" +
|
||||
"\n" + "\n" + "Example Requests:\n" + "\n" + "self/shareaccounts/12\n")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response SelfShareAccountsApiResourceSwagger.GetShareAccountResponse.class)})*/
|
||||
public String retrieveShareAccount(@PathParam("accountId") final Long accountId, @Context final UriInfo uriInfo) {
|
||||
validateAppuserShareAccountMapping(accountId);
|
||||
final boolean includeTemplate = false;
|
||||
AccountData accountData = this.readPlatformService.retrieveOne(accountId, includeTemplate);
|
||||
|
||||
+656
@@ -0,0 +1,656 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you 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.
|
||||
*/
|
||||
|
||||
package org.apache.fineract.portfolio.self.shareaccounts.api;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Kang Breder on 05/08/19.
|
||||
*/
|
||||
|
||||
final class SelfShareAccountsApiResourceSwagger {
|
||||
private SelfShareAccountsApiResourceSwagger(){
|
||||
|
||||
}
|
||||
|
||||
@ApiModel(value = "GetShareAccountsClientIdResponse")
|
||||
public final static class GetShareAccountsClientIdResponse {
|
||||
private GetShareAccountsClientIdResponse() {
|
||||
}
|
||||
|
||||
final class GetShareAccountsProductOptions {
|
||||
private GetShareAccountsProductOptions() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "3")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "SP")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "SP")
|
||||
public String shortName;
|
||||
@ApiModelProperty(example = "1000")
|
||||
public Integer totalShares;
|
||||
}
|
||||
|
||||
final class GetShareAccountsChargeOptions {
|
||||
private GetShareAccountsChargeOptions() {
|
||||
}
|
||||
|
||||
final class GetShareAccountsCurrency {
|
||||
private GetShareAccountsCurrency() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "USD")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "US Dollar")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer decimalPlaces;
|
||||
@ApiModelProperty(example = "$")
|
||||
public String displaySymbol;
|
||||
@ApiModelProperty(example = "currency.USD")
|
||||
public String nameCode;
|
||||
@ApiModelProperty(example = "US Dollar ($)")
|
||||
public String displayLabel;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsChargeTimeType {
|
||||
private GetShareAccountsChargeTimeType() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "14")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "chargeTimeType.sharespurchase")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "Share purchase")
|
||||
public String value;
|
||||
}
|
||||
|
||||
final class GetShareAccountsChargeAppliesTo {
|
||||
private GetShareAccountsChargeAppliesTo() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "4")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "chargeAppliesTo.shares")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "Shares")
|
||||
public String value;
|
||||
}
|
||||
|
||||
final class GetShareAccountsChargeCalculationType {
|
||||
private GetShareAccountsChargeCalculationType() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "chargeCalculationType.flat")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "Flat")
|
||||
public String value;
|
||||
}
|
||||
|
||||
final class GetShareAccountsChargePaymentMode {
|
||||
private GetShareAccountsChargePaymentMode() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "chargepaymentmode.regular")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "Regular")
|
||||
public String value;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Activation fee")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "true")
|
||||
public Boolean active;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean penalty;
|
||||
public GetShareAccountsCurrency currency;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer amount;
|
||||
public GetShareAccountsChargeTimeType chargeTimeType;
|
||||
public GetShareAccountsChargeAppliesTo chargeAppliesTo;
|
||||
public GetShareAccountsChargeCalculationType calculationType;
|
||||
public GetShareAccountsChargePaymentMode paymentMode;
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "14")
|
||||
public Integer clientId;
|
||||
public Set<GetShareAccountsProductOptions> productOptions;
|
||||
public Set<GetShareAccountsChargeOptions> chargeOptions;
|
||||
}
|
||||
|
||||
@ApiModel(value = "GetShareAccountsClientIdProductIdResponse")
|
||||
public final static class GetShareAccountsClientIdProductIdResponse {
|
||||
private GetShareAccountsClientIdProductIdResponse() {
|
||||
}
|
||||
|
||||
final class GetClientIdProductIdProductOptions {
|
||||
private GetClientIdProductIdProductOptions() {
|
||||
}
|
||||
|
||||
final class GetShareAccountsClientIdProductIdLockPeriodTypeEnum {
|
||||
private GetShareAccountsClientIdProductIdLockPeriodTypeEnum() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "shares.lockin.sharePeriodFrequencyType.days")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "days")
|
||||
public String value;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsClientIdProductIdMinimumActivePeriodForDividendsTypeEnum {
|
||||
private GetShareAccountsClientIdProductIdMinimumActivePeriodForDividendsTypeEnum() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "shares.minimumactive.sharePeriodFrequencyType.days")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "days")
|
||||
public String value;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsClientIdProductIdAccountingRule {
|
||||
private GetShareAccountsClientIdProductIdAccountingRule() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountingRuleType.cash")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "CASH BASED")
|
||||
public String value;
|
||||
|
||||
}
|
||||
|
||||
final class GetClientIdProductIdAccountingMappings {
|
||||
private GetClientIdProductIdAccountingMappings() {
|
||||
}
|
||||
|
||||
final class GetShareAccountsShareReferenceId {
|
||||
private GetShareAccountsShareReferenceId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "32")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Cash in Hand")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "20301")
|
||||
public Integer glCode;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsIncomeFromFeeAccountId {
|
||||
private GetShareAccountsIncomeFromFeeAccountId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "40")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Other Operating Income")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "30105")
|
||||
public Integer glCode;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsShareEquityId {
|
||||
private GetShareAccountsShareEquityId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "56")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Share Equity")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "00098")
|
||||
public Integer glCode;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsShareSuspenseId {
|
||||
private GetShareAccountsShareSuspenseId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Overpayment Liability")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "10200")
|
||||
public Integer glCode;
|
||||
|
||||
}
|
||||
|
||||
public GetShareAccountsShareReferenceId shareReferenceId;
|
||||
public GetShareAccountsIncomeFromFeeAccountId incomeFromFeeAccountId;
|
||||
public GetShareAccountsShareEquityId ShareEquityId;
|
||||
public GetShareAccountsShareSuspenseId shareSuspenseId;
|
||||
}
|
||||
|
||||
final class GetClientIdProductIdMinimumActivePeriodFrequencyTypeOptions {
|
||||
private GetClientIdProductIdMinimumActivePeriodFrequencyTypeOptions() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "shares.lockin.sharePeriodFrequencyType.days")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "Days")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetClientIdProductIdLockinPeriodFrequencyTypeOptions {
|
||||
private GetClientIdProductIdLockinPeriodFrequencyTypeOptions() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "shares.lockin.sharePeriodFrequencyType.days")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "Days")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetAccountingMappingOptions {
|
||||
private GetAccountingMappingOptions() {
|
||||
}
|
||||
|
||||
final class GetAccountingMappingLiabilityAccountOptions {
|
||||
private GetAccountingMappingLiabilityAccountOptions() {
|
||||
}
|
||||
|
||||
final class GetLiabilityAccountType {
|
||||
private GetLiabilityAccountType() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountType.liability")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "LIABILITY")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetLiabilityAccountUsage {
|
||||
private GetLiabilityAccountUsage() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountUsage.detail")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "DETAIL")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetLiabilityAccountTagId {
|
||||
private GetLiabilityAccountTagId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean active;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean mandatory;
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "30")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Recurring Deposits")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer parentId;
|
||||
@ApiModelProperty(example = "10104")
|
||||
public Integer glCode;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean disabled;
|
||||
@ApiModelProperty(example = "true")
|
||||
public Boolean manualEntriesAllowed;
|
||||
public GetLiabilityAccountType type;
|
||||
public GetLiabilityAccountUsage usage;
|
||||
@ApiModelProperty(example = " ....Recurring Deposits")
|
||||
public String nameDecorated;
|
||||
public GetLiabilityAccountTagId tagId;
|
||||
|
||||
}
|
||||
|
||||
final class GetAccountingMappingAssetAccountOptions {
|
||||
private GetAccountingMappingAssetAccountOptions() {
|
||||
}
|
||||
|
||||
final class GetAssetAccountType {
|
||||
private GetAssetAccountType() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountType.asset")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "ASSET")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetAssetAccountUsage {
|
||||
private GetAssetAccountUsage() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountUsage.detail")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "DETAIL")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetAssetAccountTagId {
|
||||
private GetAssetAccountTagId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean active;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean mandatory;
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "31")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Furniture and Fixtures")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "8")
|
||||
public Integer parentId;
|
||||
@ApiModelProperty(example = "20101")
|
||||
public Integer glCode;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean disabled;
|
||||
@ApiModelProperty(example = "true")
|
||||
public Boolean manualEntriesAllowed;
|
||||
public GetAssetAccountType type;
|
||||
public GetAssetAccountUsage usage;
|
||||
@ApiModelProperty(example = " ....Furniture and Fixtures")
|
||||
public String nameDecorated;
|
||||
public GetAssetAccountTagId tagId;
|
||||
|
||||
}
|
||||
|
||||
final class GetAccountingMappingIncomeAccountOptions {
|
||||
private GetAccountingMappingIncomeAccountOptions() {
|
||||
}
|
||||
|
||||
final class GetIncomeAccountType {
|
||||
private GetIncomeAccountType() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "4")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountType.income")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "INCOME")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetIncomeAccountUsage {
|
||||
private GetIncomeAccountUsage() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountUsage.detail")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "DETAIL")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetIncomeAccountTagId {
|
||||
private GetIncomeAccountTagId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean active;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean mandatory;
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "54")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Loan Recovery (Temp)")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "220002-Temp")
|
||||
public Integer glCode;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean disabled;
|
||||
@ApiModelProperty(example = "true")
|
||||
public Boolean manualEntriesAllowed;
|
||||
public GetIncomeAccountType type;
|
||||
public GetIncomeAccountUsage usage;
|
||||
@ApiModelProperty(example = "Temporary account to track income from Loan recovery")
|
||||
public String Description;
|
||||
@ApiModelProperty(example = "Loan Recovery (Temp)")
|
||||
public String nameDecorated;
|
||||
public GetIncomeAccountTagId tagId;
|
||||
}
|
||||
|
||||
final class GetShareAccountAccountingMappingEquityAccountOptions {
|
||||
private GetShareAccountAccountingMappingEquityAccountOptions() {
|
||||
}
|
||||
|
||||
final class GetShareAccountsEquityAccountType {
|
||||
private GetShareAccountsEquityAccountType() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "3")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountType.equity")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "EQUITY")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsEquityAccountUsage {
|
||||
private GetShareAccountsEquityAccountUsage() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "accountUsage.detail")
|
||||
public String code;
|
||||
@ApiModelProperty(example = "DETAIL")
|
||||
public Integer value;
|
||||
|
||||
}
|
||||
|
||||
final class GetShareAccountsEquityAccountTagId {
|
||||
private GetShareAccountsEquityAccountTagId() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "0")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean active;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean mandatory;
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "56")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "Share Equity")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "25")
|
||||
public Integer parentId;
|
||||
@ApiModelProperty(example = "00098")
|
||||
public Integer glCode;
|
||||
@ApiModelProperty(example = "false")
|
||||
public Boolean disabled;
|
||||
@ApiModelProperty(example = "true")
|
||||
public Boolean manualEntriesAllowed;
|
||||
public GetShareAccountsEquityAccountType type;
|
||||
public GetShareAccountsEquityAccountUsage usage;
|
||||
@ApiModelProperty(example = "....Share Equity")
|
||||
public String nameDecorated;
|
||||
public GetShareAccountsEquityAccountTagId tagId;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "3")
|
||||
public Integer id;
|
||||
@ApiModelProperty(example = "SP")
|
||||
public String name;
|
||||
@ApiModelProperty(example = "SP")
|
||||
public String shortName;
|
||||
@ApiModelProperty(example = "SP1")
|
||||
public String description;
|
||||
public GetShareAccountsClientIdResponse.GetShareAccountsChargeOptions.GetShareAccountsCurrency currency;
|
||||
@ApiModelProperty(example = "1000")
|
||||
public Integer totalShares;
|
||||
@ApiModelProperty(example = "900")
|
||||
public Integer totalSharesIssued;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer unitPrice;
|
||||
@ApiModelProperty(example = "900")
|
||||
public Integer shareCapital;
|
||||
@ApiModelProperty(example = "8")
|
||||
public Integer minimumShares;
|
||||
@ApiModelProperty(example = "500")
|
||||
public Integer norminalShares;
|
||||
@ApiModelProperty(example = "500")
|
||||
public Integer maximumShares;
|
||||
@ApiModelProperty(example = "[]")
|
||||
public String marketPrice;
|
||||
@ApiModelProperty(example = "[]")
|
||||
public String charges;
|
||||
@ApiModelProperty(example = "False")
|
||||
public Boolean allowDividendCalculationForInactiveClients;
|
||||
@ApiModelProperty(example = "50")
|
||||
public Integer lockinPeriod;
|
||||
public GetShareAccountsClientIdProductIdLockPeriodTypeEnum lockinPeriodEnum;
|
||||
@ApiModelProperty(example = "10")
|
||||
public Integer minimumActivePeriod;
|
||||
public GetShareAccountsClientIdProductIdMinimumActivePeriodForDividendsTypeEnum minimumActivePeriodForDividendsTypeEnum;
|
||||
public GetShareAccountsClientIdProductIdAccountingRule accountingRule;
|
||||
public GetClientIdProductIdAccountingMappings accountingMappings;
|
||||
public GetShareAccountsClientIdResponse.GetShareAccountsChargeOptions.GetShareAccountsCurrency currencyOptions;
|
||||
public GetShareAccountsClientIdResponse.GetShareAccountsChargeOptions chargeOptions;
|
||||
public GetClientIdProductIdMinimumActivePeriodFrequencyTypeOptions minimumActivePeriodFrequencyTypeOptions;
|
||||
public GetClientIdProductIdLockinPeriodFrequencyTypeOptions lockinPeriodFrequencyTypeOptions;
|
||||
public GetAccountingMappingOptions accountingMappingOptions;
|
||||
}
|
||||
|
||||
final class GetClientIdProductIdChargeOptions {
|
||||
private GetClientIdProductIdChargeOptions() {
|
||||
}
|
||||
|
||||
public GetShareAccountsClientIdResponse.GetShareAccountsChargeOptions chargeOptions;
|
||||
}
|
||||
|
||||
public Set<GetClientIdProductIdProductOptions> productOptions;
|
||||
public Set<GetClientIdProductIdChargeOptions> chargeOptions;
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostNewShareApplicationRequest")
|
||||
public final static class PostNewShareApplicationRequest {
|
||||
private PostNewShareApplicationRequest() {
|
||||
}
|
||||
|
||||
final class GetShareAccountsCharges {
|
||||
private GetShareAccountsCharges() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer chargeId;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer amount;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "3")
|
||||
public Integer productId;
|
||||
@ApiModelProperty(example = "1")
|
||||
public Integer unitPrice;
|
||||
@ApiModelProperty(example = "500")
|
||||
public Integer requestedShares;
|
||||
@ApiModelProperty(example = "31 July 2018")
|
||||
public String submittedDate;
|
||||
@ApiModelProperty(example = "2")
|
||||
public Integer savingsAccountId;
|
||||
@ApiModelProperty(example = "31 July 2018")
|
||||
public String applicationDate;
|
||||
@ApiModelProperty(example = "en")
|
||||
public String locale;
|
||||
@ApiModelProperty(example = "dd MMMM YYYY")
|
||||
public String dateFormat;
|
||||
public GetShareAccountsCharges charges;
|
||||
@ApiModelProperty(example = "14")
|
||||
public Integer clientId;
|
||||
}
|
||||
|
||||
@ApiModel(value = "PostNewShareApplicationResponse")
|
||||
public final static class PostNewShareApplicationResponse {
|
||||
private PostNewShareApplicationResponse() {
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "12")
|
||||
public Integer resourceId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+5
@@ -38,11 +38,16 @@ import org.apache.fineract.useradministration.domain.AppUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Path("/self/surveys/scorecards")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Score Card"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Score Card", description = "")
|
||||
})
|
||||
public class SelfScorecardApiResource {
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
|
||||
+5
@@ -33,11 +33,16 @@ import org.apache.fineract.spm.data.SurveyData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Path("/self/surveys")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Spm"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Spm", description = "")
|
||||
})
|
||||
public class SelfSpmApiResource {
|
||||
|
||||
private final PlatformSecurityContext securityContext;
|
||||
|
||||
+5
@@ -46,10 +46,15 @@ import org.apache.fineract.portfolio.shareproducts.service.ShareProductDividendR
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@Path("/shareproduct/{productId}/dividend")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(tags = {"Self Dividend"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Self Dividend", description = "")
|
||||
})
|
||||
public class ShareDividendApiResource {
|
||||
|
||||
private final DefaultToApiJsonSerializer<ShareProductDividendPayOutData> toApiJsonSerializer;
|
||||
|
||||
+4
-1
@@ -42,7 +42,10 @@ import java.util.Collection;
|
||||
@Path("/taxes/component")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Tax Components", description = "This defines the Tax Components")
|
||||
@Api(tags = {"Tax Components"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Tax Components", description = "This defines the Tax Components")
|
||||
})
|
||||
public class TaxComponentApiResource {
|
||||
|
||||
private final String resourceNameForPermissions = "TAXCOMPONENT";
|
||||
|
||||
+4
-1
@@ -42,7 +42,10 @@ import java.util.Collection;
|
||||
@Path("/taxes/group")
|
||||
@Component
|
||||
@Scope("singleton")
|
||||
@Api(value = "Tax Group", description = "This defines the Tax Group")
|
||||
@Api(tags = {"Tax Group"})
|
||||
@SwaggerDefinition(tags = {
|
||||
@Tag(name = "Tax Group", description = "This defines the Tax Group")
|
||||
})
|
||||
public class TaxGroupApiResource {
|
||||
|
||||
private final String resourceNameForPermissions = "TAXGROUP";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user