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

# `t`

```elixir
@type t() :: %MishkaPay.CreditNote.Lines{
  amount: Money.t() | nil,
  id: String.t() | nil,
  invoice_line_id: String.t() | nil,
  name: String.t() | nil,
  quantity: pos_integer() | nil,
  type: (:invoice_line | :custom) | nil,
  unit_amount: Money.t() | nil
}
```

The struct that `builder/1` returns.

| Field | Type | Required | Default | Description | Derives |
| --- | --- | --- | --- | --- | --- |
| `:id` | `String.t()` \| `nil` | no |  |  | `validate(string)` |
| `:type` | `:invoice_line` \| `:custom` \| `nil` | no |  |  | `validate(enum=Atom[invoice_line::custom])` |
| `:invoice_line_id` | `String.t()` \| `nil` | no |  |  | `sanitize(trim) validate(string, not_empty)` |
| `:name` | `String.t()` \| `nil` | no |  |  | `sanitize(trim) validate(string, not_empty, max_len=500)` |
| `:quantity` | `pos_integer()` \| `nil` | no |  |  | `validate(integer, min_len=1)` |
| `:unit_amount` | `Money.t()` \| `nil` | no |  |  | validator `{MishkaPay.Money, :field}` |
| `:amount` | `Money.t()` \| `nil` | no |  |  | validator `{MishkaPay.Money, :field}` |

# `builder`

# `enforce_keys`

# `enforce_keys`

# `example`

A sample %MishkaPay.CreditNote.Lines{} populated from defaults + type-based fallbacks.

# `keys`

# `keys`

---

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