Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ sealed class PONativeAlternativePaymentElement {
/**
* Available parameter value.
*
* @param[key] Parameter value.
* @param[value] Parameter value.
* @param[label] Value display label.
* @param[preselected] Indicates whether the value should be preselected by default.
*/
@JsonClass(generateAdapter = true)
data class AvailableValue(
val key: String,
val value: String,
val label: String,
val preselected: Boolean
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class PONativeAlternativePaymentRedirect(
val url: String,
val hint: String?
val hint: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ internal class NativeAlternativePaymentInteractor(
map { parameter ->
val defaultValue = when (parameter) {
is Parameter.SingleSelect -> FieldValue.Text(
TextFieldValue(text = parameter.preselectedValue?.key ?: String())
TextFieldValue(text = parameter.preselectedValue?.value ?: String())
)
is Parameter.Bool -> FieldValue.Text(TextFieldValue(text = "false"))
is Parameter.PhoneNumber -> FieldValue.PhoneNumber()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ internal class NativeAlternativePaymentViewModel private constructor(
is SingleSelect -> POImmutableList(
availableValues.map {
POAvailableValue(
value = it.key,
value = it.value,
text = it.label
)
}
Expand Down