Accrue.Billing.MeteredRenewal (accrue v1.1.2)

Copy Markdown View Source

Immutable local renewal-window anchor for one metered billing period.

Summary

Types

t()

@type t() :: %Accrue.Billing.MeteredRenewal{
  __meta__: term(),
  customer: term(),
  customer_id: term(),
  data: term(),
  id: term(),
  inserted_at: term(),
  invoice: term(),
  invoice_authored_at: term(),
  invoice_id: term(),
  invoice_status: term(),
  last_processor_event_id: term(),
  last_processor_event_ts: term(),
  lock_version: term(),
  paid_at: term(),
  period_end: term(),
  period_start: term(),
  processor: term(),
  snapshot: term(),
  state: term(),
  subscription: term(),
  subscription_id: term(),
  trigger_source: term(),
  updated_at: term()
}

Functions

changeset(renewal_or_changeset, attrs \\ %{})

@spec changeset(
  %Accrue.Billing.MeteredRenewal{
    __meta__: term(),
    customer: term(),
    customer_id: term(),
    data: term(),
    id: term(),
    inserted_at: term(),
    invoice: term(),
    invoice_authored_at: term(),
    invoice_id: term(),
    invoice_status: term(),
    last_processor_event_id: term(),
    last_processor_event_ts: term(),
    lock_version: term(),
    paid_at: term(),
    period_end: term(),
    period_start: term(),
    processor: term(),
    snapshot: term(),
    state: term(),
    subscription: term(),
    subscription_id: term(),
    trigger_source: term(),
    updated_at: term()
  }
  | Ecto.Changeset.t(),
  map()
) :: Ecto.Changeset.t()