Siftsciex v0.5.0 Siftsciex.Event.Payload.Address View Source
Internal representation and “constructor” for a Sift Science address
Link to this section Summary
Functions
Creates a new Siftsciex.Event.Payload.Address.t/0 struct from Siftsciex.Event.Payload.Address.data/0
Link to this section Types
Link to this type
attributes()
View Source
attributes() :: :name | :address_1 | :address_2 | :phone | :city | :region | :country | :zipcode
Link to this type
t()
View Source
t() :: %Siftsciex.Event.Payload.Address{
"$address_1": Siftsciex.Event.Payload.payload_string(),
"$address_2": Siftsciex.Event.Payload.payload_string(),
"$city": Siftsciex.Event.Payload.payload_string(),
"$country": Siftsciex.Event.Payload.payload_string(),
"$name": Siftsciex.Event.Payload.payload_string(),
"$phone": Siftsciex.Event.Payload.payload_string(),
"$region": Siftsciex.Event.Payload.payload_string(),
"$zipcode": Siftsciex.Event.Payload.payload_string()
}
Link to this section Functions
Creates a new Siftsciex.Event.Payload.Address.t/0 struct from Siftsciex.Event.Payload.Address.data/0
Parameters
data: The data for the address (Siftsciex.Event.Payload.Address.data/0)
Examples
iex> Address.new(%{name: "Bob", city: nil, country: "US"})
%Address{"$name": "Bob", "$phone": :empty, "$city": nil, "$region": :empty, "$country": "US", "$zipcode": :empty}
iex> Address.new([%{name: "Walt", city: "Albuquerque"}, %{name: "Bob", region: "FL"}])
[%Address{"$name": "Walt", "$city": "Albuquerque"}, %Address{"$name": "Bob", "$region": "FL"}]