Accrue.Connect.Projection (accrue v0.3.0)

Copy Markdown View Source

Decomposes a processor-shaped (Stripe- or Fake-produced) Connected Account payload into a flat attrs map ready for Accrue.Connect.Account.changeset/2 (D5-02).

Handles both the atom-keyed shape produced by Accrue.Processor.Fake and the string-keyed shape produced by Accrue.Processor.Stripe (after Map.from_struct/1), via the same dual-key get/2 helper used by Accrue.Billing.SubscriptionProjection.get/2.

Summary

Functions

decompose(struct)

@spec decompose(map() | struct()) :: {:ok, map()}