{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/moov/json-schema/moov-update-underwriting-schema.json",
  "title": "UpdateUnderwriting",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/moov-underwriting-api-openapi.yml#/components/schemas/UpdateUnderwriting",
  "type": "object",
  "required": [
    "averageTransactionSize",
    "maxTransactionSize",
    "averageMonthlyTransactionVolume",
    "volumeByCustomerType",
    "cardVolumeDistribution",
    "fulfillment"
  ],
  "properties": {
    "averageTransactionSize": {
      "type": "integer",
      "format": "int64"
    },
    "maxTransactionSize": {
      "type": "integer",
      "format": "int64"
    },
    "averageMonthlyTransactionVolume": {
      "type": "integer",
      "format": "int64"
    },
    "volumeByCustomerType": {
      "$ref": "#/$defs/VolumeByCustomerType"
    },
    "cardVolumeDistribution": {
      "$ref": "#/$defs/CardVolumeDistribution"
    },
    "fulfillment": {
      "$ref": "#/$defs/FulfillmentDetails"
    }
  },
  "$defs": {
    "CardVolumeDistribution": {
      "type": "object",
      "required": [
        "ecommercePercentage",
        "cardPresentPercentage",
        "mailOrPhonePercentage",
        "debtRepaymentPercentage"
      ],
      "properties": {
        "ecommercePercentage": {
          "type": "integer",
          "format": "int32"
        },
        "cardPresentPercentage": {
          "type": "integer",
          "format": "int32"
        },
        "mailOrPhonePercentage": {
          "type": "integer",
          "format": "int32"
        },
        "debtRepaymentPercentage": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "FulfillmentDetails": {
      "type": "object",
      "required": [
        "hasPhysicalGoods",
        "isShippingProduct",
        "shipmentDurationDays",
        "returnPolicy"
      ],
      "properties": {
        "hasPhysicalGoods": {
          "type": "boolean"
        },
        "isShippingProduct": {
          "type": "boolean"
        },
        "shipmentDurationDays": {
          "type": "integer",
          "format": "int64"
        },
        "returnPolicy": {
          "$ref": "#/$defs/ReturnPolicyType"
        }
      }
    },
    "ReturnPolicyType": {
      "type": "string",
      "enum": [
        "none",
        "exchangeOnly",
        "withinThirtyDays",
        "other"
      ]
    },
    "VolumeByCustomerType": {
      "type": "object",
      "required": [
        "businessToBusinessPercentage",
        "consumerToBusinessPercentage"
      ],
      "properties": {
        "businessToBusinessPercentage": {
          "type": "integer",
          "format": "int32"
        },
        "consumerToBusinessPercentage": {
          "type": "integer",
          "format": "int32"
        }
      }
    }
  }
}