MishkaPay.Subscription.Schedule.Phases (Mishka Pay v0.0.1)

Copy Markdown View Source

Summary

Types

t()

The struct that builder/1 returns.

Functions

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

Types

t()

@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.

FieldTypeRequiredDefaultDescriptionDerives
:items[MishkaPay.Price.t()] | nilnovalidate(list)
:start_atDateTime.t() | nilnovalidate(struct)
:end_atDateTime.t() | nilnovalidate(struct)
:iterationspos_integer() | nilnovalidate(integer, min_len=1)
:interval:day | :week | :month | :year | nilnovalidate(enum=Atom[day::week::month::year])<br>validator {MishkaPay.Price, :interval}
:trialboolean() | nilnovalidate(boolean)
:trial_end_atDateTime.t() | nilnovalidate(struct)
:proration:create_prorations | :always_invoice | :none | nilnovalidate(enum=Atom[create_prorations::always_invoice::none])<br>validator {MishkaPay.Subscription, :proration}

Functions

builder(attrs_or_input, error \\ false)

enforce_keys()

enforce_keys(field)

example()

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

keys()

keys(field)