Package-level declarations

Types

Link copied to clipboard
data class AddressSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("billing_details[address]"), val allowedCountryCodes: Set<String> = CountryUtils.supportedBillingCountries, val displayFields: Set<DisplayField> = emptySet(), val showLabel: Boolean = true, val type: AddressType = AddressType.Normal(), val hideCountry: Boolean = false) : FormItemSpec, Parcelable
Link copied to clipboard
data class AffirmHeaderElement(val identifier: IdentifierSpec, val controller: Controller? = null) : FormElement
Link copied to clipboard
data class AfterpayClearpayHeaderElement(val identifier: IdentifierSpec, amount: Amount, val controller: Controller? = null) : FormElement
Link copied to clipboard

A text field configuration for an AU bank account number

Link copied to clipboard
data class AuBankAccountNumberSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic( "au_becs_debit[account_number]" )) : FormItemSpec
Link copied to clipboard
data class AuBecsDebitMandateTextElement(val identifier: IdentifierSpec, val merchantName: String?, val controller: InputController? = null) : FormElement

This is an element that has static text because it takes no user input, it is not outputted from the list of form field values. If the stringResId contains a %s, the first one will be populated in the form with the merchantName parameter.

Link copied to clipboard
Link copied to clipboard
class BlikElement(val identifier: IdentifierSpec = IdentifierSpec.BlikCode, val controller: InputController = SimpleTextFieldController( textFieldConfig = BlikConfig() )) : SectionSingleFieldElement
Link copied to clipboard
data class BlikSpec(val apiPath: IdentifierSpec = IdentifierSpec.Blik) : FormItemSpec
Link copied to clipboard
data class BoletoTaxIdSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("boleto[tax_id]")) : FormItemSpec
Link copied to clipboard

A text field configuration for a BSB number, or Bank State Branch Number, a six-digit number used to identify the individual branch of an Australian financial institution

Link copied to clipboard
Link copied to clipboard
data class BsbSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic( "au_becs_debit[bsb_number]" )) : FormItemSpec
Link copied to clipboard
@Serializable
enum Capitalization : Enum<Capitalization>
Link copied to clipboard
class CardBillingAddressElement(identifier: IdentifierSpec, rawValuesMap: Map<IdentifierSpec, String?> = emptyMap(), addressRepository: AddressRepository, countryCodes: Set<String> = emptySet(), countryDropdownFieldController: DropdownFieldController = DropdownFieldController( CountryConfig(countryCodes), rawValuesMap[IdentifierSpec.Country] ), sameAsShippingElement: SameAsShippingElement?, shippingValuesMap: Map<IdentifierSpec, String?>?, collectionMode: BillingDetailsCollectionConfiguration.AddressCollectionMode = BillingDetailsCollectionConfiguration.AddressCollectionMode.Automatic) : AddressElement

This is a special type of AddressElement that removes fields from the address based on the country. It is only intended to be used with the card payment method.

Link copied to clipboard
data class CardBillingSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("card_billing"), val allowedCountryCodes: Set<String> = CountryUtils.supportedBillingCountries, val collectionMode: BillingDetailsCollectionConfiguration.AddressCollectionMode = BillingDetailsCollectionConfiguration.AddressCollectionMode.Automatic) : FormItemSpec
Link copied to clipboard
class CardDetailsSectionController(context: Context, initialValues: Map<IdentifierSpec, String?>, collectName: Boolean = false, cbcEligibility: CardBrandChoiceEligibility = CardBrandChoiceEligibility.Ineligible) : SectionFieldErrorController
Link copied to clipboard
class CardDetailsSectionElement(val context: Context, initialValues: Map<IdentifierSpec, String?>, collectName: Boolean = false, cbcEligibility: CardBrandChoiceEligibility = CardBrandChoiceEligibility.Ineligible, val identifier: IdentifierSpec, val controller: CardDetailsSectionController = CardDetailsSectionController( context = context, initialValues = initialValues, collectName = collectName, cbcEligibility = cbcEligibility, )) : FormElement
Link copied to clipboard
data class CardDetailsSectionSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("card_details"), val collectName: Boolean = false) : FormItemSpec

Section containing card details form

Link copied to clipboard
data class CashAppPayMandateTextSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("cashapp_mandate"), @StringRes val stringResId: Int = R.string.stripe_cash_app_pay_mandate) : FormItemSpec
Link copied to clipboard
object ConfirmResponseStatusSpecsSerializer : JsonContentPolymorphicSerializer<ConfirmResponseStatusSpecs>
Link copied to clipboard
@Serializable
data class ConfirmStatusSpecAssociation(val requiresPaymentMethod: ConfirmResponseStatusSpecs? = null, val requiresConfirmation: ConfirmResponseStatusSpecs? = null, val requiresAction: ConfirmResponseStatusSpecs? = null, val processing: ConfirmResponseStatusSpecs? = null, val succeeded: ConfirmResponseStatusSpecs? = ConfirmResponseStatusSpecs.FinishedSpec, val canceled: ConfirmResponseStatusSpecs? = null) : Parcelable
Link copied to clipboard
data class ContactInformationSpec(val collectName: Boolean = true, val collectEmail: Boolean = true, val collectPhone: Boolean = true) : FormItemSpec
Link copied to clipboard
data class CountrySpec(val apiPath: IdentifierSpec = IdentifierSpec.Country, val allowedCountryCodes: Set<String> = CountryUtils.supportedBillingCountries) : FormItemSpec

This is the specification for a country field.

Link copied to clipboard
class CvcController(cvcTextFieldConfig: CvcConfig = CvcConfig(), cardBrandFlow: Flow<CardBrand>, val initialValue: String? = null, val showOptionalLabel: Boolean = false) : TextFieldController, SectionFieldErrorController
Link copied to clipboard
Link copied to clipboard
@Serializable
enum DisplayField : Enum<DisplayField>
Link copied to clipboard
data class DropdownItemSpec(val apiValue: String? = null, val displayText: String = "Other") : Parcelable
Link copied to clipboard
data class DropdownSpec(val apiPath: IdentifierSpec, val labelTranslationId: TranslationId, val items: List<DropdownItemSpec>) : FormItemSpec
Link copied to clipboard
data class EmailElement(val identifier: IdentifierSpec = IdentifierSpec.Email, val initialValue: String? = "", val controller: TextFieldController = SimpleTextFieldController( EmailConfig(), initialValue = initialValue )) : SectionSingleFieldElement
Link copied to clipboard
data class EmailSpec(val apiPath: IdentifierSpec = IdentifierSpec.Email) : FormItemSpec
Link copied to clipboard
data class EmptyFormElement(val identifier: IdentifierSpec = IdentifierSpec.Generic("empty_form"), val controller: Controller? = null) : FormElement
Link copied to clipboard

This is used to define each section in the visual form layout specification

Link copied to clipboard
object FormItemSpecSerializer : JsonContentPolymorphicSerializer<FormItemSpec>
Link copied to clipboard

A text field configuration for an IBAN, or International Bank Account Number, as defined in ISO 13616-1.

Link copied to clipboard
data class IbanSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("sepa_debit[iban]")) : FormItemSpec
Link copied to clipboard
@Serializable
enum KeyboardType : Enum<KeyboardType>
Link copied to clipboard
data class KlarnaCountrySpec(val apiPath: IdentifierSpec = IdentifierSpec.Country) : FormItemSpec

This is the specification for a klarna country field

Link copied to clipboard
Link copied to clipboard
data class LayoutFormDescriptor(val layoutSpec: LayoutSpec?, val showCheckbox: Boolean, val showCheckboxControlledFields: Boolean)
Link copied to clipboard

This is a data representation of the layout of UI fields on the screen.

Link copied to clipboard
Link copied to clipboard
data class MandateTextElement(val identifier: IdentifierSpec, val stringResId: Int, val args: List<String>, val controller: InputController? = null) : FormElement
Link copied to clipboard
data class MandateTextSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("mandate"), @StringRes val stringResId: Int) : FormItemSpec

Mandate text element spec.

Link copied to clipboard
data class NameSpec(val apiPath: IdentifierSpec = IdentifierSpec.Name, val labelTranslationId: TranslationId = TranslationId.AddressName) : FormItemSpec
Link copied to clipboard
@Serializable
@SerialName(value = "next_action_spec")
data class NextActionSpec(val confirmResponseStatusSpecs: ConfirmStatusSpecAssociation? = null, val postConfirmHandlingPiStatusSpecs: PostConfirmStatusSpecAssociation? = null) : Parcelable
Link copied to clipboard
data object OTPSpec : FormItemSpec
Link copied to clipboard
data class PhoneSpec(val apiPath: IdentifierSpec = IdentifierSpec.Phone) : FormItemSpec
Link copied to clipboard
data class PlaceholderSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("placeholder"), val field: PlaceholderSpec.PlaceholderField = PlaceholderField.Unknown) : FormItemSpec
Link copied to clipboard
@Serializable
data class PostConfirmStatusSpecAssociation(val requiresPaymentMethod: PostConfirmHandlingPiStatusSpecs? = null, val requiresConfirmation: PostConfirmHandlingPiStatusSpecs? = null, val requiresAction: PostConfirmHandlingPiStatusSpecs? = null, val processing: PostConfirmHandlingPiStatusSpecs? = null, val succeeded: PostConfirmHandlingPiStatusSpecs? = null, val canceled: PostConfirmHandlingPiStatusSpecs? = null) : Parcelable
Link copied to clipboard
Link copied to clipboard
data class SaveForFutureUseElement(val identifier: IdentifierSpec, val controller: SaveForFutureUseController, val merchantName: String?) : FormElement

This is an element that will make elements (as specified by identifier) hidden when "save for future" use is unchecked

Link copied to clipboard
data class SaveForFutureUseSpec(val apiPath: IdentifierSpec = IdentifierSpec.SaveForFutureUse) : FormItemSpec

This is an element that will make elements (as specified by identifier) hidden when save for future use is unchecked

Link copied to clipboard
@Serializable
@SerialName(value = "next_action_spec")
data class SelectorIcon : Parcelable
Link copied to clipboard
data class SepaMandateTextSpec(val apiPath: IdentifierSpec = IdentifierSpec.Generic("sepa_mandate"), @StringRes val stringResId: Int = R.string.stripe_sepa_mandate) : FormItemSpec

Mandate text element spec.

Link copied to clipboard
data class SharedDataSpec(val type: String, val async: Boolean = false, val fields: ArrayList<FormItemSpec> = arrayListOf(EmptyFormSpec), val nextActionSpec: NextActionSpec? = null, val selectorIcon: SelectorIcon? = null) : Parcelable
Link copied to clipboard
data class SimpleTextSpec(val apiPath: IdentifierSpec, @StringRes val label: Int, val capitalization: Capitalization = Capitalization.None, val keyboardType: KeyboardType = KeyboardType.Ascii, val showOptionalLabel: Boolean = false) : FormItemSpec
Link copied to clipboard
data class StaticTextElement(val identifier: IdentifierSpec, val stringResId: Int, val controller: InputController? = null) : FormElement

This is an element that has static text because it takes no user input, it is not outputted from the list of form field values. If the stringResId contains a %s, the first one will be populated in the form with the merchantName parameter.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class UpiElement(val identifier: IdentifierSpec, val controller: InputController = SimpleTextFieldController( textFieldConfig = UpiConfig() )) : SectionSingleFieldElement
Link copied to clipboard
data class UpiSpec(val apiPath: IdentifierSpec = IdentifierSpec.Upi) : FormItemSpec

Properties

Functions

Link copied to clipboard
fun BsbElementUI(enabled: Boolean, element: BsbElement, lastTextFieldIdentifier: IdentifierSpec?)
Link copied to clipboard
Link copied to clipboard
fun <K, V> Map<K, V?>.filterNotNullValues(): Map<K, V>
Link copied to clipboard
Link copied to clipboard
fun H4Text(text: String, modifier: Modifier = Modifier)
Link copied to clipboard
fun HyperlinkedText(text: String, modifier: Modifier = Modifier, color: Color = Color.Unspecified, style: TextStyle = LocalTextStyle.current)
Link copied to clipboard
fun SimpleDialogElementUI(titleText: String, messageText: String?, confirmText: String, dismissText: String, destructive: Boolean = false, onConfirmListener: () -> Unit, onDismissListener: () -> Unit)