-
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.
feature(bank-sdk): Transaction Docs. Code refactor
PP-747
- Loading branch information
1 parent
8384f0c
commit 261913a
Showing
12 changed files
with
47 additions
and
59 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
5 changes: 0 additions & 5 deletions
5
...k/src/main/java/net/gini/android/bank/sdk/transactiondocs/TransactionDocsConfiguration.kt
This file was deleted.
Oops, something went wrong.
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
3 changes: 1 addition & 2 deletions
3
...c/main/java/net/gini/android/bank/sdk/transactiondocs/internal/GiniBankTransactionDocs.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
17 changes: 0 additions & 17 deletions
17
...android/bank/sdk/transactiondocs/internal/TransactionDocInvoicePreviewInfoLinesFactory.kt
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...bank/sdk/transactiondocs/internal/factory/TransactionDocInvoicePreviewInfoLinesFactory.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,28 @@ | ||
package net.gini.android.bank.sdk.transactiondocs.internal.factory | ||
|
||
import android.content.res.Resources | ||
import net.gini.android.bank.sdk.R | ||
import net.gini.android.bank.sdk.capture.skonto.formatter.AmountFormatter | ||
import net.gini.android.capture.Amount | ||
import net.gini.android.capture.provider.LastExtractionsProvider | ||
|
||
internal class TransactionDocInvoicePreviewInfoLinesFactory( | ||
private val resources: Resources, | ||
private val lastExtractionsProvider: LastExtractionsProvider, | ||
private val amountFormatter: AmountFormatter, | ||
) { | ||
|
||
fun create( | ||
) = listOfNotNull( | ||
lastExtractionsProvider.provide()["iban"]?.value?.let { | ||
resources.getString( | ||
R.string.gbs_td_invoice_preview_info_text_iban, | ||
it | ||
) | ||
}, | ||
lastExtractionsProvider.provide()["amountToPay"]?.value?.let { Amount.parse(it) }?.let { | ||
resources.getString( | ||
R.string.gbs_td_invoice_preview_info_text_amount, amountFormatter.format(it) | ||
) | ||
}) | ||
} |
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