AppleBusinessRegistry.Location (apple_business_registry v0.3.0)

Copy Markdown View Source

Location struct representing a business location in Apple Business Registry.

Fields

  • id: Unique identifier for the location
  • business_id: ID of the parent business
  • name: Location name (e.g., "Main Store", "Downtown Branch")
  • address: Street address
  • locality: City/locality
  • administrative_area: State/province
  • postal_code: Postal/ZIP code
  • country: ISO 3166-1 alpha-2 country code
  • phone: Location-specific phone number
  • latitude: Latitude coordinate
  • longitude: Longitude coordinate
  • status: Location status ("active", "pending", "closed")
  • created_at: ISO 8601 timestamp when the location was created
  • updated_at: ISO 8601 timestamp when the location was last updated

Summary

Functions

Decode a location map into a %Location{} struct.

Encode a %Location{} struct into a map for API requests.

Types

t()

@type t() :: %AppleBusinessRegistry.Location{
  address: String.t() | nil,
  administrative_area: String.t() | nil,
  business_id: String.t() | nil,
  country: String.t() | nil,
  created_at: String.t() | nil,
  id: String.t() | nil,
  latitude: float() | nil,
  locality: String.t() | nil,
  longitude: float() | nil,
  name: String.t() | nil,
  phone: String.t() | nil,
  postal_code: String.t() | nil,
  status: String.t() | nil,
  updated_at: String.t() | nil
}

Functions

from_map(attrs)

@spec from_map(map()) :: t()

Decode a location map into a %Location{} struct.

to_map(location)

@spec to_map(t()) :: map()

Encode a %Location{} struct into a map for API requests.