# `MishkaPay.Subscription.Schedule.Phases`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/nofile#L1)

# `t`

```elixir
@type t() :: %MishkaPay.Subscription.Schedule.Phases{
  end_at: DateTime.t() | nil,
  interval: (:day | :week | :month | :year) | nil,
  items: [MishkaPay.Price.t()] | nil,
  iterations: pos_integer() | nil,
  proration: (:create_prorations | :always_invoice | :none) | nil,
  start_at: DateTime.t() | nil,
  trial: boolean() | nil,
  trial_end_at: DateTime.t() | nil
}
```

The struct that `builder/1` returns.

| Field | Type | Required | Default | Description | Derives |
| --- | --- | --- | --- | --- | --- |
| `:items` | [`[MishkaPay.Price.t()]`](`t:MishkaPay.Price.t/0`) \| `nil` | no |  |  | `validate(list)` |
| `:start_at` | `DateTime.t()` \| `nil` | no |  |  | `validate(struct)` |
| `:end_at` | `DateTime.t()` \| `nil` | no |  |  | `validate(struct)` |
| `:iterations` | `pos_integer()` \| `nil` | no |  |  | `validate(integer, min_len=1)` |
| `:interval` | `:day` \| `:week` \| `:month` \| `:year` \| `nil` | no |  |  | `validate(enum=Atom[day::week::month::year])`<br>validator `{MishkaPay.Price, :interval}` |
| `:trial` | `boolean()` \| `nil` | no |  |  | `validate(boolean)` |
| `:trial_end_at` | `DateTime.t()` \| `nil` | no |  |  | `validate(struct)` |
| `:proration` | `:create_prorations` \| `:always_invoice` \| `:none` \| `nil` | no |  |  | `validate(enum=Atom[create_prorations::always_invoice::none])`<br>validator `{MishkaPay.Subscription, :proration}` |

# `builder`

# `enforce_keys`

# `enforce_keys`

# `example`

A sample %MishkaPay.Subscription.Schedule.Phases{} populated from defaults + type-based fallbacks.

# `keys`

# `keys`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
