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

The answer to a `MishkaPay.Dispute`, given to `MishkaPay.update_dispute/1`. A guarded_struct.

  * `:provider`, `:tenant`, `:dispute_id`: which dispute, with whose keys.
  * `:evidence`: what the seller shows, under the provider's own field names, string keys to
    string values: at Stripe `"product_description"`, `"customer_email_address"`,
    `"service_date"`, `"uncategorized_text"` and the rest of its dispute evidence. A field that
    holds a document takes the `:id` of a file uploaded with `MishkaPay.upload_file/1`: at
    Stripe `"receipt"`, `"customer_communication"`, `"service_documentation"`,
    `"shipping_documentation"`, `"uncategorized_file"` and the other file fields take a
    `file_...` id, and anything else there is refused before any request.
  * `:submit`: `true` sends it to the bank now; left out or `false`, the provider keeps it to
    add more before the due date.
  * `:metadata`: extra pairs kept on the dispute.

# `t`

```elixir
@type t() :: %MishkaPay.Dispute.Evidence{
  dispute_id: String.t(),
  evidence: map() | nil,
  metadata: map() | nil,
  provider: String.t(),
  submit: boolean() | nil,
  tenant: term() | nil
}
```

The struct that `builder/1` returns.

| Field | Type | Required | Default | Description | Derives |
| --- | --- | --- | --- | --- | --- |
| `:provider` | `String.t()` | yes |  |  | `sanitize(trim) validate(not_nil_value, string, not_empty)` |
| `:tenant` | `term()` \| `nil` | no |  |  |  |
| `:dispute_id` | `String.t()` | yes |  |  | `sanitize(trim) validate(not_nil_value, string, not_empty)` |
| `:submit` | `boolean()` \| `nil` | no |  |  | `validate(boolean)` |
| `:evidence` | `map()` \| `nil` | no | `%{}` |  | `validate(map)`<br>validator `{MishkaPay.Checkout, :metadata}` |
| `:metadata` | `map()` \| `nil` | no | `%{}` |  | `validate(map)`<br>validator `{MishkaPay.Checkout, :metadata}` |

# `builder`

# `enforce_keys`

# `enforce_keys`

# `example`

A sample %MishkaPay.Dispute.Evidence{} populated from defaults + type-based fallbacks.

# `keys`

# `keys`

---

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