DodoPayments.ResponseTypes (dodo_payments v0.1.0)

Copy Markdown View Source

Wire-shape aliases shared by typed response structs.

Nested JSON objects deliberately remain string-keyed maps for compatibility. Elixir typespecs cannot enumerate individual binary keys, so these aliases describe the authoritative upstream value domains without claiming atom keys or converting child objects into structs.

Summary

Types

billing_address()

@type billing_address() :: %{optional(String.t()) => String.t() | nil}

brand()

@type brand() :: %{optional(String.t()) => String.t() | boolean() | nil}

custom_field_response()

@type custom_field_response() :: %{optional(String.t()) => String.t()}

customer_credit_entitlement()

@type customer_credit_entitlement() :: %{
  optional(String.t()) => String.t() | number() | nil
}

customer_entitlement()

@type customer_entitlement() :: %{optional(String.t()) => String.t() | nil}

customer_limited_details()

@type customer_limited_details() :: %{
  optional(String.t()) => String.t() | metadata() | nil
}

customer_payment_method()

@type customer_payment_method() :: %{
  optional(String.t()) => String.t() | boolean() | object() | nil
}

customer_wallet()

@type customer_wallet() :: %{optional(String.t()) => String.t() | number()}

discount_currency_option()

@type discount_currency_option() :: %{
  optional(String.t()) => String.t() | number() | boolean() | nil
}

discount_customer()

@type discount_customer() :: %{optional(String.t()) => String.t()}

dispute()

@type dispute() :: %{optional(String.t()) => String.t() | boolean() | nil}

json()

@type json() ::
  nil
  | boolean()
  | number()
  | String.t()
  | [json()]
  | %{optional(String.t()) => json()}

localized_price()

@type localized_price() :: %{optional(String.t()) => String.t() | number() | nil}

metadata()

@type metadata() :: %{optional(String.t()) => String.t() | number() | boolean()}

object()

@type object() :: %{optional(String.t()) => json()}

payment_line_item()

@type payment_line_item() :: %{optional(String.t()) => String.t() | number() | nil}

product_cart_item()

@type product_cart_item() :: %{optional(String.t()) => String.t() | number() | nil}

product_collection_group()

@type product_collection_group() :: %{
  optional(String.t()) =>
    String.t() | boolean() | [product_collection_product()] | nil
}

product_collection_product()

@type product_collection_product() :: %{
  optional(String.t()) => String.t() | number() | boolean() | object() | nil
}

refund_list_item()

@type refund_list_item() :: %{
  optional(String.t()) => String.t() | number() | boolean() | nil
}

subscription_credit_usage()

@type subscription_credit_usage() :: %{
  optional(String.t()) => String.t() | number() | boolean() | nil
}

subscription_immediate_charge()

@type subscription_immediate_charge() :: %{
  optional(String.t()) => String.t() | object() | [object()]
}

subscription_usage_meter()

@type subscription_usage_meter() :: %{optional(String.t()) => String.t() | number()}