Inttegro.Customers.Customer (inttegro v0.2.0)

Copy Markdown View Source

A customer owned by the authenticated application.

Customer records hold contact and address information used by orders and saved payment methods. The customer ID is stable and should be stored alongside the corresponding user in your system.

Summary

Types

t()

The decoded customer value.

Functions

Builds a Inttegro.Customers.Customer and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Customers.Customer{
  balance: %{optional(String.t()) => Inttegro.Customers.BalanceValue.t()},
  billing_address: Inttegro.Customers.Address.t() | nil,
  created_at: String.t(),
  custom_data: %{optional(String.t()) => String.t()} | nil,
  email_address: String.t() | nil,
  guest: boolean(),
  id: String.t(),
  name: String.t(),
  phone_number: String.t() | nil,
  reference: String.t() | nil,
  shipping_address: Inttegro.Customers.Address.t() | nil,
  suffix: String.t() | nil,
  title: String.t() | nil,
  updated_at: String.t() | nil
}

The decoded customer value.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.Customers.Customer and raises KeyError when a required field is missing.