-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Redesign requeset screen UI * fix MissingKoinDefinitionException * removed comments and fixed share qr code bug * fix: Invoice APIs
- Loading branch information
1 parent
fac59da
commit 28f9bd5
Showing
34 changed files
with
879 additions
and
554 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
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
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
49 changes: 0 additions & 49 deletions
49
core/model/src/main/java/com/mifospay/core/model/entity/Invoice.kt
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
core/model/src/main/java/com/mifospay/core/model/entity/invoice/Invoice.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,35 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md | ||
*/ | ||
package com.mifospay.core.model.entity.invoice | ||
|
||
import android.os.Parcelable | ||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class Invoice( | ||
val id: Long, | ||
@SerializedName("client_id") | ||
val clientId: Long, | ||
val consumerId: String, | ||
val consumerName: String, | ||
val amount: Double, | ||
@SerializedName("itemsbought") | ||
val itemsBought: String, | ||
val status: Long, | ||
val transactionId: String, | ||
val invoiceId: Long, | ||
val title: String, | ||
val date: String, | ||
@SerializedName("created_at") | ||
val createdAt: List<Long>, | ||
@SerializedName("updated_at") | ||
val updatedAt: List<Long>, | ||
) : Parcelable |
30 changes: 30 additions & 0 deletions
30
core/model/src/main/java/com/mifospay/core/model/entity/invoice/InvoiceEntity.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,30 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md | ||
*/ | ||
package com.mifospay.core.model.entity.invoice | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class InvoiceEntity( | ||
val id: Long, | ||
val invoiceId: Long, | ||
val consumerId: String, | ||
val consumerName: String, | ||
val amount: Double, | ||
@SerialName("itemsbought") | ||
val itemsBought: String, | ||
val status: Long, | ||
val transactionId: String, | ||
val title: String, | ||
val date: String, | ||
val locale: String, | ||
val dateFormat: String, | ||
) |
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
41 changes: 41 additions & 0 deletions
41
core/network/src/main/kotlin/org/mifospay/core/network/TestingApiInterceptor.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,41 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md | ||
*/ | ||
package org.mifospay.core.network | ||
|
||
import okhttp3.Credentials | ||
import okhttp3.Interceptor | ||
import okhttp3.Response | ||
import java.io.IOException | ||
|
||
class TestingApiInterceptor( | ||
private val username: String, | ||
private val password: String, | ||
) : Interceptor { | ||
|
||
@Throws(IOException::class) | ||
override fun intercept(chain: Interceptor.Chain): Response { | ||
val chainRequest = chain.request() | ||
|
||
val basicAuthCredentials = Credentials.basic(username, password) | ||
|
||
val builder = chainRequest.newBuilder() | ||
.header(HEADER_TENANT, DEFAULT) | ||
.header(HEADER_AUTH, basicAuthCredentials) | ||
|
||
val request = builder.build() | ||
return chain.proceed(request) | ||
} | ||
|
||
companion object { | ||
const val HEADER_TENANT = "Fineract-Platform-TenantId" | ||
const val HEADER_AUTH = "Authorization" | ||
const val DEFAULT = "venus" | ||
} | ||
} |
Oops, something went wrong.