MemberAddress

class MemberAddress(var line1: String? = null, var line2: String? = null, var city: String? = null, var state: String? = null, var zipCode: String? = null)

MemberAddress — normalized physical address for a member.

Used by:

Fields

  • line1 First address line (e.g., street number and name).

  • line2 Second line (apt/suite/building), optional.

  • city City name.

  • state State or province (e.g., "CA").

  • zipCode Postal/ZIP code (e.g., "92101").

Notes

  • Validate formats according to tenant/locale (e.g., 2-letter state codes, 5-digit ZIP in US).

  • Keep casing consistent for display (e.g., Title Case) and store raw values for fidelity.

Android (Kotlin) — constructing for registration

val address = MemberAddress(
line1 = "123 Main St",
line2 = "Suite 100",
city = "San Diego",
state = "CA",
zipCode = "92101"
)
val request = MemberRequest(
email = "user@example.com",
uniqueId = "EMP001",
firstName = "John",
lastName = "Doe",
// ...
address1 = address.line1,
address2 = address.line2,
city = address.city,
state = address.state,
zipCode = address.zipCode
)

iOS (Swift) — updating profile address

Task {
do {
var profile = try await AFCore.shared.profile().get()
profile.address = MemberAddress(
line1: "123 Main St",
line2: "Suite 100",
city: "San Diego",
state: "CA",
zipCode: "92101"
)
let updated = try await AFCore.shared.profile().update(profile)
print("Address updated: \\(updated.address?.line1 ?? "")")
} catch {
print("Failed to update address: \\(error.localizedDescription)")
}
}

Constructors

Link copied to clipboard
constructor(line1: String? = null, line2: String? = null, city: String? = null, state: String? = null, zipCode: String? = null)

Properties

Link copied to clipboard
var city: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String