Stancer.API.Customers (stancer v0.1.0)

Copy Markdown

Summary

Functions

POST /v2/customers/

DELETE /v2/customers/{id}

GET /v2/customers/{id}

GET /v2/customers/

PATCH /v2/customers/{id}

Functions

create(data)

@spec create(map()) :: {:ok, map()} | {:error, term()}

POST /v2/customers/

Parameters

  • billing_address (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Billing address ID
    • Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  • country (string (2-2 chars), optional) - Country of the card issuer
    • Example: "FR"
  • date_birth (string (format: date), optional) - Date of birth
    • Example: "1953-01-19"
  • email (string (format: email), optional) - Customer email
    • Example: "arthur.martin@example.com"
  • external_id (string (1-36 chars), optional) - Unique id with unicity check
    • Example: "UniqueId123"
  • legal_id (string (max 16 chars), optional) - Any legal identifier like SIREN, CBE, KVK, etc
    • Example: "AA732A82C93V20"
  • mobile (string (max 16 chars), optional) - Customer mobile number
    • Example: "+33100000000"
  • name (string (3-64 chars), optional) - Customer name
    • Example: "Arthur Martin"
  • shipping_address (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Shipping address ID
    • Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"

delete(id)

@spec delete(String.t()) :: {:ok, map()} | {:error, term()}

DELETE /v2/customers/{id}

get(id)

@spec get(String.t()) :: {:ok, map()} | {:error, term()}

GET /v2/customers/{id}

list()

@spec list() :: {:ok, map()} | {:error, term()}

GET /v2/customers/

update(id, data)

@spec update(String.t(), map()) :: {:ok, map()} | {:error, term()}

PATCH /v2/customers/{id}

Parameters

  • billing_address (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Billing address ID
    • Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  • country (string (2-2 chars), optional) - Country of the card issuer
    • Example: "FR"
  • date_birth (string (format: date), optional) - Date of birth
    • Example: "1953-01-19"
  • email (string (format: email), optional) - Customer email
    • Example: "arthur.martin@example.com"
  • external_id (string (1-36 chars), optional) - Unique id with unicity check
    • Example: "UniqueId123"
  • legal_id (string (max 16 chars), optional) - Any legal identifier like SIREN, CBE, KVK, etc
    • Example: "AA732A82C93V20"
  • mobile (string (max 16 chars), optional) - Customer mobile number
    • Example: "+33100000000"
  • name (string (3-64 chars), optional) - Customer name
    • Example: "Arthur Martin"
  • shipping_address (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Shipping address ID
    • Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"