LatticeStripe.SubscriptionSchedule.CurrentPhase (LatticeStripe v1.7.8)

Copy Markdown View Source

The current phase of a Subscription Schedule, or nil if the schedule has not yet started or has completed.

Contains two Unix timestamps bounding the currently-active phase. This is a small read-only summary view — for the full phase configuration, look up the matching element of schedule.phases by date range.

Summary

Types

t()

The current phase summary on a Stripe Subscription Schedule.

Functions

Converts a decoded Stripe API map to a %CurrentPhase{} struct.

Types

t()

@type t() :: %LatticeStripe.SubscriptionSchedule.CurrentPhase{
  end_date: integer() | nil,
  extra: map(),
  start_date: integer() | nil
}

The current phase summary on a Stripe Subscription Schedule.

Functions

from_map(map)

@spec from_map(map() | nil) :: t() | nil

Converts a decoded Stripe API map to a %CurrentPhase{} struct.

Returns nil when given nil (schedule has no current phase).