Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor #1520: migrated api services from java to kotlin #1521

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.mifos.mobilewallet.core.data.fineract.api.services

import org.mifos.mobilewallet.core.data.fineract.api.ApiEndPoints
import org.mifos.mobilewallet.core.data.fineract.entity.accounts.savings.TransferDetail
import retrofit2.http.GET
import retrofit2.http.Path
import rx.Observable

/**
* Created by ankur on 05/June/2018
*/
interface AccountTransfersService {
@GET(ApiEndPoints.ACCOUNT_TRANSFER + "/{transferId}")
fun getAccountTransfer(@Path("transferId") transferId: Long): Observable<TransferDetail>
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.mifos.mobilewallet.core.data.fineract.api.services

import org.mifos.mobilewallet.core.data.fineract.api.ApiEndPoints
import org.mifos.mobilewallet.core.data.fineract.entity.UserEntity
import org.mifos.mobilewallet.core.data.fineract.entity.authentication.AuthenticationPayload
import retrofit2.http.Body
import retrofit2.http.POST
import rx.Observable

/**
* Created by naman on 17/6/17.
*/
interface AuthenticationService {
@POST(ApiEndPoints.AUTHENTICATION)
fun authenticate(@Body authPayload: AuthenticationPayload): Observable<UserEntity>
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package org.mifos.mobilewallet.core.data.fineract.api.services

import okhttp3.ResponseBody
import org.mifos.mobilewallet.core.data.fineract.api.ApiEndPoints
import org.mifos.mobilewallet.core.data.fineract.entity.beneficary.Beneficiary
import org.mifos.mobilewallet.core.data.fineract.entity.beneficary.BeneficiaryPayload
import org.mifos.mobilewallet.core.data.fineract.entity.beneficary.BeneficiaryUpdatePayload
import org.mifos.mobilewallet.core.data.fineract.entity.templates.beneficiary.BeneficiaryTemplate
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import rx.Observable

/**
* Created by dilpreet on 14/6/17.
*/
interface BeneficiaryService {
@get:GET(ApiEndPoints.BENEFICIARIES + "/tpt")
val beneficiaryList: Observable<List<Beneficiary>>

@get:GET(ApiEndPoints.BENEFICIARIES + "/tpt/template")
val beneficiaryTemplate: Observable<BeneficiaryTemplate>

@POST(ApiEndPoints.BENEFICIARIES + "/tpt")
fun createBeneficiary(@Body beneficiaryPayload: BeneficiaryPayload): Observable<ResponseBody>

@PUT(ApiEndPoints.BENEFICIARIES + "/tpt/{beneficiaryId}")
fun updateBeneficiary(
@Path("beneficiaryId") beneficiaryId: Long,
@Body payload: BeneficiaryUpdatePayload
): Observable<ResponseBody>

@DELETE(ApiEndPoints.BENEFICIARIES + "/tpt/{beneficiaryId}")
fun deleteBeneficiary(@Path("beneficiaryId") beneficiaryId: Long): Observable<ResponseBody>
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package org.mifos.mobilewallet.core.data.fineract.api.services

import okhttp3.MultipartBody
import okhttp3.ResponseBody
import org.mifos.mobilewallet.core.data.fineract.api.ApiEndPoints
import org.mifos.mobilewallet.core.data.fineract.api.GenericResponse
import org.mifos.mobilewallet.core.data.fineract.entity.Page
import org.mifos.mobilewallet.core.data.fineract.entity.client.Client
import org.mifos.mobilewallet.core.data.fineract.entity.client.ClientAccounts
import org.mifos.mobilewallet.core.domain.model.NewAccount
import org.mifos.mobilewallet.core.domain.model.client.NewClient
import org.mifos.mobilewallet.core.domain.usecase.client.CreateClient
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Query
import rx.Observable

interface ClientService {
@get:GET(ApiEndPoints.CLIENTS)
val clients: Observable<Page<Client>>

@GET(ApiEndPoints.CLIENTS + "/{clientId}")
fun getClientForId(@Path("clientId") clientId: Long): Observable<Client>

@PUT(ApiEndPoints.CLIENTS + "/{clientId}")
fun updateClient(
@Path("clientId") clientId: Long,
@Body payload: Any
): Observable<ResponseBody>

@GET(ApiEndPoints.CLIENTS + "/{clientId}/images")
fun getClientImage(@Path("clientId") clientId: Long): Observable<ResponseBody>

@PUT(ApiEndPoints.CLIENTS + "/{clientId}/images")
fun updateClientImage(
@Path("clientId") clientId: Long,
@Part typedFile: MultipartBody.Part?
): Observable<GenericResponse>

@GET(ApiEndPoints.CLIENTS + "/{clientId}/accounts")
fun getClientAccounts(@Path("clientId") clientId: Long): Observable<ClientAccounts>

@GET(ApiEndPoints.CLIENTS + "/{clientId}/accounts")
fun getAccounts(
@Path("clientId") clientId: Long,
@Query("fields") accountType: String
): Observable<ClientAccounts>

@POST(ApiEndPoints.CLIENTS)
fun createClient(@Body newClient: NewClient): Observable<CreateClient.ResponseValue>

@POST
fun createAccount(@Body newAccount: NewAccount?): Observable<GenericResponse>
}
Loading