-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from YAPP-Github/feature/MZ-137-received-enve…
…lope-filter-api Feature/mz 137 received envelope filter api
- Loading branch information
Showing
30 changed files
with
634 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
core/model/src/main/java/com/susu/core/model/EnvelopeFilterConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.susu.core.model | ||
|
||
data class EnvelopeFilterConfig( | ||
val minReceivedAmount: Long, | ||
val maxReceivedAmount: Long, | ||
val minSentAmount: Long, | ||
val maxSentAmount: Long, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
core/ui/src/main/java/com/susu/core/ui/argument/EnvelopeFilterArgument.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.susu.core.ui.argument | ||
|
||
import com.susu.core.model.Friend | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class EnvelopeFilterArgument( | ||
val selectedFriendList: List<Friend> = emptyList(), | ||
val fromAmount: Long? = null, | ||
val toAmount: Long? = null, | ||
val isSent: Boolean = false, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
data/src/main/java/com/susu/data/remote/model/response/EnvelopeFilterConfigResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.susu.data.remote.model.response | ||
|
||
import com.susu.core.model.EnvelopeFilterConfig | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class EnvelopeFilterConfigResponse( | ||
val minReceivedAmount: Long, | ||
val maxReceivedAmount: Long, | ||
val minSentAmount: Long, | ||
val maxSentAmount: Long, | ||
) | ||
|
||
internal fun EnvelopeFilterConfigResponse.toModel() = EnvelopeFilterConfig( | ||
minReceivedAmount = minReceivedAmount, | ||
maxReceivedAmount = maxReceivedAmount, | ||
minSentAmount = minSentAmount, | ||
maxSentAmount = maxSentAmount, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
domain/src/main/java/com/susu/domain/usecase/envelope/GetEnvelopeFilterConfigUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.susu.domain.usecase.envelope | ||
|
||
import com.susu.core.common.runCatchingIgnoreCancelled | ||
import com.susu.domain.repository.EnvelopesRepository | ||
import javax.inject.Inject | ||
|
||
class GetEnvelopeFilterConfigUseCase @Inject constructor( | ||
private val envelopesRepository: EnvelopesRepository, | ||
) { | ||
suspend operator fun invoke() = runCatchingIgnoreCancelled { | ||
envelopesRepository.getEnvelopeFilterConfig() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.