Member Address
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:
MemberProfile for profile data.
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
)Content copied to clipboard
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)")
}
}Content copied to clipboard