MishkaPay.Dispute.Evidence (Mishka Pay v0.0.1)

Copy Markdown View Source

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.

Summary

Types

t()

The struct that builder/1 returns.

Functions

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

Types

t()

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

FieldTypeRequiredDefaultDescriptionDerives
:providerString.t()yessanitize(trim) validate(not_nil_value, string, not_empty)
:tenantterm() | nilno
:dispute_idString.t()yessanitize(trim) validate(not_nil_value, string, not_empty)
:submitboolean() | nilnovalidate(boolean)
:evidencemap() | nilno%{}validate(map)<br>validator {MishkaPay.Checkout, :metadata}
:metadatamap() | nilno%{}validate(map)<br>validator {MishkaPay.Checkout, :metadata}

Functions

builder(attrs_or_input, error \\ false)

enforce_keys()

enforce_keys(field)

example()

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

keys()

keys(field)