LpmRepository

class LpmRepository(arguments: LpmRepository.LpmRepositoryArguments, lpmInitialFormData: LpmRepository.LpmInitialFormData = LpmInitialFormData.Instance, lpmPostConfirmData: LuxePostConfirmActionRepository = LuxePostConfirmActionRepository.Instance)

This class is responsible for loading the LPM UI Specification for all LPMs, and returning a particular requested LPM.

This is not injected as a singleton because when the activity is killed the FormViewModel and SheetViewModel don't share the Dagger graph and the repository is not a singleton. Additionally every time you create a new form view model a new repository is created and thus needs to be initialized.

Constructors

Link copied to clipboard
fun LpmRepository(arguments: LpmRepository.LpmRepositoryArguments, lpmInitialFormData: LpmRepository.LpmInitialFormData = LpmInitialFormData.Instance, lpmPostConfirmData: LuxePostConfirmActionRepository = LuxePostConfirmActionRepository.Instance)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
Link copied to clipboard
data class LpmRepositoryArguments(val resources: Resources?, val isFinancialConnectionsAvailable: IsFinancialConnectionsAvailable = DefaultIsFinancialConnectionsAvailable())
Link copied to clipboard
Link copied to clipboard
data class SupportedPaymentMethod(val code: PaymentMethodCode, val requiresMandate: Boolean, @StringRes val displayNameResource: Int, @DrawableRes val iconResource: Int, val tintIconOnSelection: Boolean, val requirement: PaymentMethodRequirements, val formSpec: LayoutSpec)

Enum defining all payment method types for which Payment Sheet can collect payment data.

Functions

Link copied to clipboard
fun forceUpdate(expectedLpms: List<String>, serverLpmSpecs: String?)
Link copied to clipboard
Link copied to clipboard
fun update(expectedLpms: List<String>, serverLpmSpecs: String?)

This method will read the expected LPMs and their specs as two separate parameters. Any spec now found from the server will be read from disk json file.

Link copied to clipboard
Link copied to clipboard

Properties