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

Manage models #1527

Merged
merged 5 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
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.

1 change: 1 addition & 0 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ android {

dependencies {
api(projects.core.common)
api(projects.core.model)

implementation(libs.squareup.retrofit2) {
// exclude Retrofit’s OkHttp peer-dependency module and define your own module import
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 com.mifos.mobilewallet.model.entity.accounts.savings.TransferDetail
import retrofit2.http.GET
import retrofit2.http.Path
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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 com.mifos.mobilewallet.model.entity.UserEntity
import com.mifos.mobilewallet.model.entity.authentication.AuthenticationPayload
import retrofit2.http.Body
import retrofit2.http.POST
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ 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 com.mifos.mobilewallet.model.entity.beneficary.Beneficiary
import com.mifos.mobilewallet.model.entity.beneficary.BeneficiaryPayload
import com.mifos.mobilewallet.model.entity.beneficary.BeneficiaryUpdatePayload
import com.mifos.mobilewallet.model.entity.templates.beneficiary.BeneficiaryTemplate
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ 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 com.mifos.mobilewallet.model.entity.Page
import com.mifos.mobilewallet.model.entity.client.Client
import com.mifos.mobilewallet.model.entity.client.ClientAccounts
import com.mifos.mobilewallet.model.domain.NewAccount
import org.mifos.mobilewallet.core.domain.usecase.client.CreateClient
import retrofit2.http.Body
import retrofit2.http.GET
Expand Down Expand Up @@ -51,7 +50,7 @@ interface ClientService {
): Observable<ClientAccounts>

@POST(ApiEndPoints.CLIENTS)
fun createClient(@Body newClient: NewClient): Observable<CreateClient.ResponseValue>
fun createClient(@Body newClient: com.mifos.mobilewallet.model.domain.client.NewClient): Observable<CreateClient.ResponseValue>

@POST
fun createAccount(@Body newAccount: NewAccount?): Observable<GenericResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.noncore.Document
import com.mifos.mobilewallet.model.entity.noncore.Document
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.Multipart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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.api.GenericResponse
import org.mifos.mobilewallet.core.data.fineract.entity.Invoice
import com.mifos.mobilewallet.model.entity.Invoice
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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.api.GenericResponse
import org.mifos.mobilewallet.core.data.fineract.entity.kyc.KYCLevel1Details
import com.mifos.mobilewallet.model.entity.kyc.KYCLevel1Details
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobilewallet.core.data.fineract.api.services

import org.mifos.mobilewallet.core.data.fineract.api.ApiEndPoints
import org.mifos.mobilewallet.core.domain.model.NotificationPayload
import com.mifos.mobilewallet.model.domain.NotificationPayload
import retrofit2.http.GET
import retrofit2.http.Path
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ 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.register.RegisterPayload
import org.mifos.mobilewallet.core.data.fineract.entity.register.UserVerify
import com.mifos.mobilewallet.model.entity.register.RegisterPayload
import com.mifos.mobilewallet.model.entity.register.UserVerify
import retrofit2.http.Body
import retrofit2.http.POST
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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.api.GenericResponse
import org.mifos.mobilewallet.core.data.fineract.entity.savedcards.Card
import com.mifos.mobilewallet.model.entity.savedcards.Card
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ 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.api.GenericResponse
import org.mifos.mobilewallet.core.data.fineract.entity.Page
import org.mifos.mobilewallet.core.data.fineract.entity.accounts.savings.SavingAccount
import org.mifos.mobilewallet.core.data.fineract.entity.accounts.savings.SavingsWithAssociations
import org.mifos.mobilewallet.core.data.fineract.entity.accounts.savings.Transactions
import com.mifos.mobilewallet.model.entity.Page
import com.mifos.mobilewallet.model.entity.accounts.savings.SavingAccount
import com.mifos.mobilewallet.model.entity.accounts.savings.SavingsWithAssociations
import com.mifos.mobilewallet.model.entity.accounts.savings.Transactions
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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.SearchedEntity
import com.mifos.mobilewallet.model.entity.SearchedEntity
import retrofit2.http.GET
import retrofit2.http.Query
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ 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.api.GenericResponse
import org.mifos.mobilewallet.core.data.fineract.entity.Page
import org.mifos.mobilewallet.core.data.fineract.entity.standinginstruction.SDIResponse
import org.mifos.mobilewallet.core.data.fineract.entity.payload.StandingInstructionPayload
import org.mifos.mobilewallet.core.data.fineract.entity.standinginstruction.StandingInstruction
import com.mifos.mobilewallet.model.entity.Page
import com.mifos.mobilewallet.model.entity.standinginstruction.SDIResponse
import com.mifos.mobilewallet.model.entity.payload.StandingInstructionPayload
import com.mifos.mobilewallet.model.entity.standinginstruction.StandingInstruction
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
Expand Down Expand Up @@ -45,8 +45,8 @@ interface StandingInstructionService {

@PUT("${ApiEndPoints.STANDING_INSTRUCTION}/{standingInstructionId}")
fun updateStandingInstruction(
@Path("standingInstructionId") standingInstructionId: Long,
@Body standingInstructionPayload: StandingInstructionPayload,
@Query("command") command: String): Observable<GenericResponse>
@Path("standingInstructionId") standingInstructionId: Long,
@Body standingInstructionPayload: StandingInstructionPayload,
@Query("command") command: String): Observable<GenericResponse>

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
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.TPTResponse
import org.mifos.mobilewallet.core.data.fineract.entity.payload.TransferPayload
import org.mifos.mobilewallet.core.data.fineract.entity.templates.account.AccountOptionsTemplate
import com.mifos.mobilewallet.model.entity.TPTResponse
import com.mifos.mobilewallet.model.entity.payload.TransferPayload
import com.mifos.mobilewallet.model.entity.templates.account.AccountOptionsTemplate
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.mifos.mobilewallet.core.data.fineract.api.services

import org.mifos.mobilewallet.core.data.fineract.api.ApiEndPoints
import org.mifos.mobilewallet.core.domain.model.twofactor.AccessToken
import org.mifos.mobilewallet.core.domain.model.twofactor.DeliveryMethod
import com.mifos.mobilewallet.model.domain.twofactor.AccessToken
import com.mifos.mobilewallet.model.domain.twofactor.DeliveryMethod
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ 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.api.GenericResponse
import org.mifos.mobilewallet.core.data.fineract.entity.UserWithRole
import org.mifos.mobilewallet.core.domain.model.user.NewUser
import com.mifos.mobilewallet.model.entity.UserWithRole
import com.mifos.mobilewallet.model.domain.user.NewUser
import org.mifos.mobilewallet.core.domain.usecase.user.CreateUser
import retrofit2.http.Body
import retrofit2.http.DELETE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.mifos.mobilewallet.core.data.fineract.entity.mapper;

import org.mifos.mobilewallet.core.data.fineract.entity.accounts.savings.SavingAccount;
import org.mifos.mobilewallet.core.data.fineract.entity.client.ClientAccounts;
import org.mifos.mobilewallet.core.domain.model.Account;
import com.mifos.mobilewallet.model.entity.accounts.savings.SavingAccount;
import com.mifos.mobilewallet.model.entity.client.ClientAccounts;
import com.mifos.mobilewallet.model.domain.Account;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.mifos.mobilewallet.core.data.fineract.entity.mapper;

import org.mifos.mobilewallet.core.domain.model.client.Client;
import com.mifos.mobilewallet.model.domain.client.Client;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -17,21 +17,20 @@ public class ClientDetailsMapper {
public ClientDetailsMapper() {
}

public List<Client> transformList(List<org.mifos.mobilewallet.core.data
.fineract.entity.client.Client> clients) {
public List<Client> transformList(List<com.mifos.mobilewallet.model.entity.client.Client> clients) {

List<Client> clientList = new ArrayList<>();

if (clients != null && clients.size() != 0) {
for (org.mifos.mobilewallet.core.data.fineract.entity.client.Client client : clients) {
for (com.mifos.mobilewallet.model.entity.client.Client client : clients) {
clientList.add(transform(client));
}

}
return clientList;
}

public Client transform(org.mifos.mobilewallet.core.data.fineract.entity.client.Client client) {
public Client transform(com.mifos.mobilewallet.model.entity.client.Client client) {
Client clientDetails = new Client();

if (client != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.mifos.mobilewallet.core.data.fineract.entity.mapper;

import org.mifos.mobilewallet.core.domain.model.Currency;
import com.mifos.mobilewallet.model.domain.Currency;

import javax.inject.Inject;

Expand All @@ -14,8 +14,7 @@ public class CurrencyMapper {
CurrencyMapper() {
}

public Currency transform(org.mifos.mobilewallet.core.data.fineract
.entity.accounts.savings.Currency savingsCurrency) {
public Currency transform(com.mifos.mobilewallet.model.entity.accounts.savings.Currency savingsCurrency) {

Currency currency = new Currency();
currency.setCode(savingsCurrency.getCode());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobilewallet.core.data.fineract.entity.mapper;

import org.mifos.mobilewallet.core.data.fineract.entity.SearchedEntity;
import org.mifos.mobilewallet.core.domain.model.SearchResult;
import com.mifos.mobilewallet.model.entity.SearchedEntity;
import com.mifos.mobilewallet.model.domain.SearchResult;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.mifos.mobilewallet.core.data.fineract.entity.mapper;

import org.mifos.mobilewallet.core.data.fineract.entity.accounts.savings.SavingsWithAssociations;
import org.mifos.mobilewallet.core.data.fineract.entity.accounts.savings.Transactions;
import org.mifos.mobilewallet.core.domain.model.Transaction;
import org.mifos.mobilewallet.core.domain.model.TransactionType;
import org.mifos.mobilewallet.core.utils.DateHelper;
import com.mifos.mobilewallet.model.entity.accounts.savings.SavingsWithAssociations;
import com.mifos.mobilewallet.model.entity.accounts.savings.Transactions;
import com.mifos.mobilewallet.model.domain.Transaction;
import com.mifos.mobilewallet.model.domain.TransactionType;
import com.mifos.mobilewallet.model.utils.DateHelper;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobilewallet.core.data.fineract.entity.mapper;

import org.mifos.mobilewallet.core.data.fineract.entity.UserEntity;
import org.mifos.mobilewallet.core.domain.model.user.User;
import com.mifos.mobilewallet.model.entity.UserEntity;
import com.mifos.mobilewallet.model.domain.user.User;

import javax.inject.Inject;

Expand Down
Loading
Loading