AddressLauncher

A drop-in class that presents a bottom sheet to collect a customer's address.

Constructors

Link copied to clipboard
constructor(activity: ComponentActivity, callback: AddressLauncherResultCallback)

Constructor to be used when launching the address element from an Activity.

constructor(fragment: Fragment, callback: AddressLauncherResultCallback)

Constructor to be used when launching the address element from a Fragment.

Types

Link copied to clipboard
data class AdditionalFieldsConfiguration @JvmOverloads constructor(    val phone: AddressLauncher.AdditionalFieldsConfiguration.FieldConfiguration = FieldConfiguration.HIDDEN,     val checkboxLabel: String? = null) : Parcelable
Link copied to clipboard
data class Configuration @JvmOverloads constructor(    val appearance: PaymentSheet.Appearance = PaymentSheet.Appearance(),     val address: AddressDetails? = null,     val allowedCountries: Set<String> = emptySet(),     val buttonTitle: String? = null,     val additionalFields: AddressLauncher.AdditionalFieldsConfiguration? = null,     val title: String? = null,     val googlePlacesApiKey: String? = null,     val autocompleteCountries: Set<String> = setOf( "AU", "BE", "BR", "CA", "CH", "DE", "ES", "FR", "GB", "IE", "IT", "MX", "NO", "NL", "PL", "RU", "SE", "TR", "US", "ZA" )) : Parcelable

Configuration for AddressLauncher

Functions

Link copied to clipboard
fun present(publishableKey: String, configuration: AddressLauncher.Configuration = Configuration())