Address

@Serializable
data class Address(val addressLine1: String? = null, val addressLine2: String? = null, val addressLine3: String? = null, val locality: String? = null, val region: String? = null, val postalCode: String, val country: String? = "US", val countrySubdivision: String? = null)(source)

A data class representing a postal address.

Constructors

Link copied to clipboard
constructor(addressLine1: String? = null, addressLine2: String? = null, addressLine3: String? = null, locality: String? = null, region: String? = null, postalCode: String, country: String? = "US", countrySubdivision: String? = null)

Properties

Link copied to clipboard

The first line of the address.

Link copied to clipboard

The second line of the address.

Link copied to clipboard

The third line of the address.

Link copied to clipboard

The two-letter country code. Defaults to "US".

Link copied to clipboard

The country subdivision code.

Link copied to clipboard

The city.

Link copied to clipboard

The postal or ZIP code.

Link copied to clipboard

The state or province.

Functions

Link copied to clipboard
fun toJson(): JsonObject

Converts the Address object to a JsonObject.