AddressSpec

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

Constructors

Link copied to clipboard
constructor(apiPath: IdentifierSpec = IdentifierSpec.Generic("billing_details[address]"), allowedCountryCodes: Set<String> = CountryUtils.supportedBillingCountries, displayFields: Set<DisplayField> = emptySet(), showLabel: Boolean = true, type: AddressType = AddressType.Normal(), hideCountry: Boolean = false)

Properties

Link copied to clipboard
@SerialName(value = "allowed_country_codes")
val allowedCountryCodes: Set<String>
Link copied to clipboard
@SerialName(value = "api_path")
open override val apiPath: IdentifierSpec
Link copied to clipboard
@SerialName(value = "display_fields")
val displayFields: Set<DisplayField>
Link copied to clipboard
@Transient
val hideCountry: Boolean = false

This field is not deserialized, it is used for the special case where the address element shouldn't show country.

Link copied to clipboard
@SerialName(value = "show_label")
val showLabel: Boolean = true
Link copied to clipboard
@Transient
val type: AddressType

This field is not deserialized, this field is used for the Address Element

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
fun transform(initialValues: Map<IdentifierSpec, String?>, addressRepository: AddressRepository, shippingValues: Map<IdentifierSpec, String?>?): SectionElement?
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)