From 873204e24e2e8c35bf4dd950837b8d073cffde47 Mon Sep 17 00:00:00 2001 From: jawidMuhammadi Date: Tue, 2 Jun 2020 09:45:33 +0530 Subject: [PATCH] Feat: Convert Service related Interfaces to from Java to Kotlin --- .../data/services/AnonymousService.java | 18 --- .../data/services/AnonymousService.kt | 14 +++ .../fineract/data/services/AuthService.java | 25 ---- .../fineract/data/services/AuthService.kt | 21 ++++ .../data/services/CustomerService.java | 117 ------------------ .../fineract/data/services/CustomerService.kt | 103 +++++++++++++++ .../data/services/DepositService.java | 43 ------- .../fineract/data/services/DepositService.kt | 32 +++++ .../services/IndividualLendingService.java | 26 ---- .../data/services/IndividualLendingService.kt | 24 ++++ .../fineract/data/services/LoanService.java | 43 ------- .../fineract/data/services/LoanService.kt | 37 ++++++ .../fineract/data/services/RolesService.java | 19 --- .../fineract/data/services/RolesService.kt | 14 +++ 14 files changed, 245 insertions(+), 291 deletions(-) delete mode 100644 app/src/main/java/org/apache/fineract/data/services/AnonymousService.java create mode 100644 app/src/main/java/org/apache/fineract/data/services/AnonymousService.kt delete mode 100644 app/src/main/java/org/apache/fineract/data/services/AuthService.java create mode 100644 app/src/main/java/org/apache/fineract/data/services/AuthService.kt delete mode 100644 app/src/main/java/org/apache/fineract/data/services/CustomerService.java create mode 100644 app/src/main/java/org/apache/fineract/data/services/CustomerService.kt delete mode 100644 app/src/main/java/org/apache/fineract/data/services/DepositService.java create mode 100644 app/src/main/java/org/apache/fineract/data/services/DepositService.kt delete mode 100644 app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.java create mode 100644 app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.kt delete mode 100644 app/src/main/java/org/apache/fineract/data/services/LoanService.java create mode 100644 app/src/main/java/org/apache/fineract/data/services/LoanService.kt delete mode 100644 app/src/main/java/org/apache/fineract/data/services/RolesService.java create mode 100644 app/src/main/java/org/apache/fineract/data/services/RolesService.kt diff --git a/app/src/main/java/org/apache/fineract/data/services/AnonymousService.java b/app/src/main/java/org/apache/fineract/data/services/AnonymousService.java deleted file mode 100644 index dfd7782f..00000000 --- a/app/src/main/java/org/apache/fineract/data/services/AnonymousService.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.apache.fineract.data.services; - -import org.apache.fineract.data.models.customer.Country; - -import java.util.List; - -import io.reactivex.Observable; -import retrofit2.http.GET; - -/** - * @author Rajan Maurya - * On 26/07/17. - */ -public interface AnonymousService { - - @GET("http://restcountries.eu/rest/v2/all?fields=name;alpha2Code;translations") - Observable> getCountries(); -} diff --git a/app/src/main/java/org/apache/fineract/data/services/AnonymousService.kt b/app/src/main/java/org/apache/fineract/data/services/AnonymousService.kt new file mode 100644 index 00000000..846926eb --- /dev/null +++ b/app/src/main/java/org/apache/fineract/data/services/AnonymousService.kt @@ -0,0 +1,14 @@ +package org.apache.fineract.data.services + +import io.reactivex.Observable +import org.apache.fineract.data.models.customer.Country +import retrofit2.http.GET + +/** + * Created by Ahmad Jawid Muhammadi on 2/6/20 + */ +interface AnonymousService { + + @GET("http://restcountries.eu/rest/v2/all?fields=name;alpha2Code;translations") + fun getCountries(): Observable?>? +} \ No newline at end of file diff --git a/app/src/main/java/org/apache/fineract/data/services/AuthService.java b/app/src/main/java/org/apache/fineract/data/services/AuthService.java deleted file mode 100644 index 46a94980..00000000 --- a/app/src/main/java/org/apache/fineract/data/services/AuthService.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.apache.fineract.data.services; - - -import org.apache.fineract.data.models.Authentication; -import org.apache.fineract.data.remote.EndPoints; - -import io.reactivex.Observable; -import retrofit2.http.POST; -import retrofit2.http.Query; - -/** - * @author Rajan Maurya - * On 16/03/17. - */ -public interface AuthService { - - @POST(EndPoints.API_IDENTITY_PATH + "/token?grant_type=password") - Observable login( - @Query("username") String username, - @Query("password") String password); - - @POST(EndPoints.API_IDENTITY_PATH + "/token?grant_type=refresh_token") - Observable refreshToken(); - -} diff --git a/app/src/main/java/org/apache/fineract/data/services/AuthService.kt b/app/src/main/java/org/apache/fineract/data/services/AuthService.kt new file mode 100644 index 00000000..2dca9e89 --- /dev/null +++ b/app/src/main/java/org/apache/fineract/data/services/AuthService.kt @@ -0,0 +1,21 @@ +package org.apache.fineract.data.services + +import io.reactivex.Observable +import org.apache.fineract.data.models.Authentication +import org.apache.fineract.data.remote.EndPoints +import retrofit2.http.POST +import retrofit2.http.Query + +/** + * Created by Ahmad Jawid Muhammadi on 2/6/20 + */ +interface AuthService { + + @POST(EndPoints.API_IDENTITY_PATH + "/token?grant_type=password") + fun login( + @Query("username") username: String?, + @Query("password") password: String?): Observable? + + @POST(EndPoints.API_IDENTITY_PATH + "/token?grant_type=refresh_token") + fun refreshToken(): Observable? +} \ No newline at end of file diff --git a/app/src/main/java/org/apache/fineract/data/services/CustomerService.java b/app/src/main/java/org/apache/fineract/data/services/CustomerService.java deleted file mode 100644 index 493e38c5..00000000 --- a/app/src/main/java/org/apache/fineract/data/services/CustomerService.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.apache.fineract.data.services; - -import org.apache.fineract.data.models.customer.Command; -import org.apache.fineract.data.models.customer.Customer; -import org.apache.fineract.data.models.customer.CustomerPage; -import org.apache.fineract.data.models.customer.identification.Identification; -import org.apache.fineract.data.models.customer.identification.ScanCard; -import org.apache.fineract.data.remote.EndPoints; - -import java.util.List; - -import io.reactivex.Completable; -import io.reactivex.Observable; -import okhttp3.MultipartBody; -import retrofit2.http.Body; -import retrofit2.http.DELETE; -import retrofit2.http.GET; -import retrofit2.http.Multipart; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Part; -import retrofit2.http.Path; -import retrofit2.http.Query; - -/** - * @author Rajan Maurya - * On 20/06/17. - */ - -public interface CustomerService { - - @GET(EndPoints.API_CUSTOMER_PATH + "/customers") - Observable fetchCustomers( - @Query("pageIndex") Integer integer, - @Query("size") Integer size); - - @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}") - Observable fetchCustomer(@Path("identifier") String identifier); - - @PUT(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}") - Completable updateCustomer( - @Path("identifier") String identifier, - @Body Customer customer); - - @GET(EndPoints.API_CUSTOMER_PATH + "/customers") - Observable searchCustomer( - @Query("pageIndex") Integer pageIndex, - @Query("size") Integer size, - @Query("term") String term); - - @POST(EndPoints.API_CUSTOMER_PATH + "/customers") - Completable createCustomer(@Body Customer customer); - - @POST(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/commands") - Completable customerCommand(@Path("identifier") String identifier, @Body Command command); - - @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{customerIdentifier}/commands") - Observable> fetchCustomerCommands( - @Path("customerIdentifier") String customerIdentifier); - - @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/identifications") - Observable> fetchIdentification( - @Path("identifier") String identifier); - - @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/identifications/{number}") - Observable searchIdentification( - @Path("identifier") String identifier, @Path("number") String number); - - @POST(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/identifications") - Completable createIdentificationCard(@Path("identifier") String identifier, - @Body Identification identification); - - @PUT(EndPoints.API_CUSTOMER_PATH + - "/customers/{identifier}/identifications/{identificationNumber}") - Completable updateIdentificationCard( - @Path("identifier") String identifier, - @Path("identificationNumber") String identificationNumber, - @Body Identification identification); - - @GET(EndPoints.API_CUSTOMER_PATH + - "/customers/{identifier}/identifications/{identificationnumber}/scans") - Observable> fetchIdentificationScanCards( - @Path("identifier") String identifier, - @Path("identificationnumber") String identificationnumber); - - @Multipart - @POST(EndPoints.API_CUSTOMER_PATH + - "/customers/{identifier}/identifications/{identificationnumber}/scans") - Completable uploadIdentificationCardScan( - @Path("identifier") String identifier, - @Path("identificationnumber") String identificationnumber, - @Query("scanIdentifier") String scanIdentifier, - @Query("description") String description, - @Part MultipartBody.Part file); - - @DELETE(EndPoints.API_CUSTOMER_PATH + - "/customers/{identifier}/identifications/{identificationnumber}/scans/{scanIdentifier}") - Completable deleteIdentificationCardScan( - @Path("identifier") String identifier, - @Path("identificationnumber") String identificationnumber, - @Path("scanIdentifier") String scanIdentifier); - - @DELETE(EndPoints.API_CUSTOMER_PATH + - "/customers/{identifier}/identifications/{identificationnumber}") - Completable deleteIdentificationCard( - @Path("identifier") String identifier, - @Path("identificationnumber") String identificationnumber); - - @Multipart - @POST(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/portrait") - Completable uploadCustomerPortrait( - @Path("identifier") String customerIdentifier, - @Part MultipartBody.Part file); - - @DELETE(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/portrait") - Completable deleteCustomerPortrait(@Path("identifier") String customerIdentifier); -} diff --git a/app/src/main/java/org/apache/fineract/data/services/CustomerService.kt b/app/src/main/java/org/apache/fineract/data/services/CustomerService.kt new file mode 100644 index 00000000..1c28efb8 --- /dev/null +++ b/app/src/main/java/org/apache/fineract/data/services/CustomerService.kt @@ -0,0 +1,103 @@ +package org.apache.fineract.data.services + +import io.reactivex.Completable +import io.reactivex.Observable +import okhttp3.MultipartBody +import org.apache.fineract.data.models.customer.Command +import org.apache.fineract.data.models.customer.Customer +import org.apache.fineract.data.models.customer.CustomerPage +import org.apache.fineract.data.models.customer.identification.Identification +import org.apache.fineract.data.models.customer.identification.ScanCard +import org.apache.fineract.data.remote.EndPoints +import retrofit2.http.* + +/** + * Created by Ahmad Jawid Muhammadi on 2/6/20 + */ +interface CustomerService { + @GET(EndPoints.API_CUSTOMER_PATH + "/customers") + fun fetchCustomers( + @Query("pageIndex") integer: Int?, + @Query("size") size: Int?): Observable? + + @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}") + fun fetchCustomer(@Path("identifier") identifier: String?): Observable? + + @PUT(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}") + fun updateCustomer( + @Path("identifier") identifier: String?, + @Body customer: Customer?): Completable? + + @GET(EndPoints.API_CUSTOMER_PATH + "/customers") + fun searchCustomer( + @Query("pageIndex") pageIndex: Int?, + @Query("size") size: Int?, + @Query("term") term: String?): Observable? + + @POST(EndPoints.API_CUSTOMER_PATH + "/customers") + fun createCustomer(@Body customer: Customer?): Completable? + + @POST(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/commands") + fun customerCommand(@Path("identifier") identifier: String?, @Body command: Command?): Completable? + + @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{customerIdentifier}/commands") + fun fetchCustomerCommands( + @Path("customerIdentifier") customerIdentifier: String?): Observable?>? + + @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/identifications") + fun fetchIdentification( + @Path("identifier") identifier: String?): Observable?>? + + @GET(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/identifications/{number}") + fun searchIdentification( + @Path("identifier") identifier: String?, @Path("number") number: String?): Observable? + + @POST(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/identifications") + fun createIdentificationCard(@Path("identifier") identifier: String?, + @Body identification: Identification?): Completable? + + @PUT(EndPoints.API_CUSTOMER_PATH + + "/customers/{identifier}/identifications/{identificationNumber}") + fun updateIdentificationCard( + @Path("identifier") identifier: String?, + @Path("identificationNumber") identificationNumber: String?, + @Body identification: Identification?): Completable? + + @GET(EndPoints.API_CUSTOMER_PATH + + "/customers/{identifier}/identifications/{identificationnumber}/scans") + fun fetchIdentificationScanCards( + @Path("identifier") identifier: String?, + @Path("identificationnumber") identificationnumber: String?): Observable?>? + + @Multipart + @POST(EndPoints.API_CUSTOMER_PATH + + "/customers/{identifier}/identifications/{identificationnumber}/scans") + fun uploadIdentificationCardScan( + @Path("identifier") identifier: String?, + @Path("identificationnumber") identificationnumber: String?, + @Query("scanIdentifier") scanIdentifier: String?, + @Query("description") description: String?, + @Part file: MultipartBody.Part?): Completable? + + @DELETE(EndPoints.API_CUSTOMER_PATH + + "/customers/{identifier}/identifications/{identificationnumber}/scans/{scanIdentifier}") + fun deleteIdentificationCardScan( + @Path("identifier") identifier: String?, + @Path("identificationnumber") identificationnumber: String?, + @Path("scanIdentifier") scanIdentifier: String?): Completable? + + @DELETE(EndPoints.API_CUSTOMER_PATH + + "/customers/{identifier}/identifications/{identificationnumber}") + fun deleteIdentificationCard( + @Path("identifier") identifier: String?, + @Path("identificationnumber") identificationnumber: String?): Completable? + + @Multipart + @POST(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/portrait") + fun uploadCustomerPortrait( + @Path("identifier") customerIdentifier: String?, + @Part file: MultipartBody.Part?): Completable? + + @DELETE(EndPoints.API_CUSTOMER_PATH + "/customers/{identifier}/portrait") + fun deleteCustomerPortrait(@Path("identifier") customerIdentifier: String?): Completable? +} \ No newline at end of file diff --git a/app/src/main/java/org/apache/fineract/data/services/DepositService.java b/app/src/main/java/org/apache/fineract/data/services/DepositService.java deleted file mode 100644 index 508a055e..00000000 --- a/app/src/main/java/org/apache/fineract/data/services/DepositService.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.apache.fineract.data.services; - -import org.apache.fineract.data.models.deposit.DepositAccount; -import org.apache.fineract.data.models.deposit.ProductDefinition; -import org.apache.fineract.data.remote.EndPoints; - -import java.util.List; - -import io.reactivex.Completable; -import io.reactivex.Observable; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Path; -import retrofit2.http.Query; - -/** - * @author Rajan Maurya - * On 07/07/17. - */ - -public interface DepositService { - - @GET(EndPoints.API_DEPOSIT_PATH + "/instances") - Observable> fetchCustomersDeposits( - @Query("customer") String customerIdentifier); - - @GET(EndPoints.API_DEPOSIT_PATH + "/instances/{accountIdentifier}") - Observable fetchCustomerDepositDetails( - @Path("accountIdentifier") String accountIdentifier); - - @GET(EndPoints.API_DEPOSIT_PATH + "/definitions") - Observable> fetchProductDefinitions(); - - @POST(EndPoints.API_DEPOSIT_PATH + "/instances") - Completable createDepositAccount(@Body DepositAccount depositAccount); - - @PUT(EndPoints.API_DEPOSIT_PATH + "/instances/{accountIdentifier}") - Completable updateDepositAccount( - @Path("accountIdentifier") String accountIdentifier, - @Body DepositAccount depositAccount); -} diff --git a/app/src/main/java/org/apache/fineract/data/services/DepositService.kt b/app/src/main/java/org/apache/fineract/data/services/DepositService.kt new file mode 100644 index 00000000..2c8ff329 --- /dev/null +++ b/app/src/main/java/org/apache/fineract/data/services/DepositService.kt @@ -0,0 +1,32 @@ +package org.apache.fineract.data.services + +import io.reactivex.Completable +import io.reactivex.Observable +import org.apache.fineract.data.models.deposit.DepositAccount +import org.apache.fineract.data.models.deposit.ProductDefinition +import org.apache.fineract.data.remote.EndPoints +import retrofit2.http.* + +/** + * Created by Ahmad Jawid Muhammadi on 2/6/20 + */ +interface DepositService { + @GET(EndPoints.API_DEPOSIT_PATH + "/instances") + fun fetchCustomersDeposits( + @Query("customer") customerIdentifier: String?): Observable?>? + + @GET(EndPoints.API_DEPOSIT_PATH + "/instances/{accountIdentifier}") + fun fetchCustomerDepositDetails( + @Path("accountIdentifier") accountIdentifier: String?): Observable? + + @GET(EndPoints.API_DEPOSIT_PATH + "/definitions") + fun fetchProductDefinitions(): Observable?>? + + @POST(EndPoints.API_DEPOSIT_PATH + "/instances") + fun createDepositAccount(@Body depositAccount: DepositAccount?): Completable? + + @PUT(EndPoints.API_DEPOSIT_PATH + "/instances/{accountIdentifier}") + fun updateDepositAccount( + @Path("accountIdentifier") accountIdentifier: String?, + @Body depositAccount: DepositAccount?): Completable? +} \ No newline at end of file diff --git a/app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.java b/app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.java deleted file mode 100644 index 77b1e638..00000000 --- a/app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.apache.fineract.data.services; - -import org.apache.fineract.data.models.payment.PlannedPaymentPage; -import org.apache.fineract.data.remote.EndPoints; - -import io.reactivex.Observable; -import retrofit2.http.GET; -import retrofit2.http.Path; -import retrofit2.http.Query; - -/** - * @author Rajan Maurya - * On 13/07/17. - */ -public interface IndividualLendingService { - - @GET(EndPoints.API_PORTFOLIO_PATH - + "/individuallending/products/{productidentifier}" - + "/cases/{caseidentifier}/plannedpayments") - Observable getPaymentScheduleForCase( - @Path("productidentifier") String productIdentifier, - @Path("caseidentifier") String caseIdentifier, - @Query("pageIndex") Integer pageIndex, - @Query("size") Integer size, - @Query("initialDisbursalDate") String initialDisbursalDate); -} diff --git a/app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.kt b/app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.kt new file mode 100644 index 00000000..acba94ab --- /dev/null +++ b/app/src/main/java/org/apache/fineract/data/services/IndividualLendingService.kt @@ -0,0 +1,24 @@ +package org.apache.fineract.data.services + +import io.reactivex.Observable +import org.apache.fineract.data.models.payment.PlannedPaymentPage +import org.apache.fineract.data.remote.EndPoints +import retrofit2.http.GET +import retrofit2.http.Path +import retrofit2.http.Query + +/** + * Created by Ahmad Jawid Muhammadi on 2/6/20 + */ +interface IndividualLendingService { + + @GET(EndPoints.API_PORTFOLIO_PATH + + "/individuallending/products/{productidentifier}" + + "/cases/{caseidentifier}/plannedpayments") + fun getPaymentScheduleForCase( + @Path("productidentifier") productIdentifier: String?, + @Path("caseidentifier") caseIdentifier: String?, + @Query("pageIndex") pageIndex: Int?, + @Query("size") size: Int?, + @Query("initialDisbursalDate") initialDisbursalDate: String?): Observable? +} \ No newline at end of file diff --git a/app/src/main/java/org/apache/fineract/data/services/LoanService.java b/app/src/main/java/org/apache/fineract/data/services/LoanService.java deleted file mode 100644 index f547c9f2..00000000 --- a/app/src/main/java/org/apache/fineract/data/services/LoanService.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.apache.fineract.data.services; - -import org.apache.fineract.data.models.loan.LoanAccount; -import org.apache.fineract.data.models.loan.LoanAccountPage; -import org.apache.fineract.data.models.product.ProductPage; -import org.apache.fineract.data.remote.EndPoints; - -import io.reactivex.Completable; -import io.reactivex.Observable; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.POST; -import retrofit2.http.Path; -import retrofit2.http.Query; - -/** - * @author Rajan Maurya - * On 07/07/17. - */ -public interface LoanService { - - @GET(EndPoints.API_PORTFOLIO_PATH + "/individuallending/customers/{customeridentifier}/cases") - Observable fetchCustomerLoanAccounts( - @Path("customeridentifier") String customerIdentifier, - @Query("pageIndex") Integer pageIndex, - @Query("size") Integer size); - - @GET(EndPoints.API_PORTFOLIO_PATH + "/products/{productidentifier}/cases/{caseidentifier}") - Observable fetchCustomerLoanDetails( - @Path("productidentifier") String productIdentifier, - @Path("caseidentifier") String caseIdentifier); - - @GET(EndPoints.API_PORTFOLIO_PATH + "/products/") - Observable getProducts( - @Query("pageIndex") Integer pageIndex, - @Query("size") Integer size, - @Query("includeDisabled") Boolean includeDisabled); - - @POST(EndPoints.API_PORTFOLIO_PATH + "/products/{productidentifier}/cases/") - Completable createLoan( - @Path("productidentifier") String productidentifier, - @Body LoanAccount loanAccount); -} diff --git a/app/src/main/java/org/apache/fineract/data/services/LoanService.kt b/app/src/main/java/org/apache/fineract/data/services/LoanService.kt new file mode 100644 index 00000000..2f705521 --- /dev/null +++ b/app/src/main/java/org/apache/fineract/data/services/LoanService.kt @@ -0,0 +1,37 @@ +package org.apache.fineract.data.services + +import io.reactivex.Completable +import io.reactivex.Observable +import org.apache.fineract.data.models.loan.LoanAccount +import org.apache.fineract.data.models.loan.LoanAccountPage +import org.apache.fineract.data.models.product.ProductPage +import org.apache.fineract.data.remote.EndPoints +import retrofit2.http.* + +/** + * Created by Ahmad Jawid Muhammadi on 2/6/20 + */ +interface LoanService { + + @GET(EndPoints.API_PORTFOLIO_PATH + "/individuallending/customers/{customeridentifier}/cases") + fun fetchCustomerLoanAccounts( + @Path("customeridentifier") customerIdentifier: String?, + @Query("pageIndex") pageIndex: Int?, + @Query("size") size: Int?): Observable? + + @GET(EndPoints.API_PORTFOLIO_PATH + "/products/{productidentifier}/cases/{caseidentifier}") + fun fetchCustomerLoanDetails( + @Path("productidentifier") productIdentifier: String?, + @Path("caseidentifier") caseIdentifier: String?): Observable? + + @GET(EndPoints.API_PORTFOLIO_PATH + "/products/") + fun getProducts( + @Query("pageIndex") pageIndex: Int?, + @Query("size") size: Int?, + @Query("includeDisabled") includeDisabled: Boolean?): Observable? + + @POST(EndPoints.API_PORTFOLIO_PATH + "/products/{productidentifier}/cases/") + fun createLoan( + @Path("productidentifier") productidentifier: String?, + @Body loanAccount: LoanAccount?): Completable? +} \ No newline at end of file diff --git a/app/src/main/java/org/apache/fineract/data/services/RolesService.java b/app/src/main/java/org/apache/fineract/data/services/RolesService.java deleted file mode 100644 index 138efc62..00000000 --- a/app/src/main/java/org/apache/fineract/data/services/RolesService.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.apache.fineract.data.services; - -import org.apache.fineract.data.models.rolesandpermission.Role; -import org.apache.fineract.data.remote.EndPoints; - -import java.util.List; - -import io.reactivex.Observable; -import retrofit2.http.GET; - -/** - * @author Rajan Maurya - * On 24/08/17. - */ -public interface RolesService { - - @GET(EndPoints.API_IDENTITY_PATH + "/roles") - Observable> getRoles(); -} diff --git a/app/src/main/java/org/apache/fineract/data/services/RolesService.kt b/app/src/main/java/org/apache/fineract/data/services/RolesService.kt new file mode 100644 index 00000000..ebc91fb0 --- /dev/null +++ b/app/src/main/java/org/apache/fineract/data/services/RolesService.kt @@ -0,0 +1,14 @@ +package org.apache.fineract.data.services + +import io.reactivex.Observable +import org.apache.fineract.data.models.rolesandpermission.Role +import org.apache.fineract.data.remote.EndPoints +import retrofit2.http.GET + +/** + * Created by Ahmad Jawid Muhammadi on 2/6/20 + */ +interface RolesService { + @GET(EndPoints.API_IDENTITY_PATH + "/roles") + fun getRoles(): Observable?>? +} \ No newline at end of file