{
  "id": "R-517",
  "name": "Quote numeric field should return 400 when string is sent",
  "description": "Quote numeric fields (e.g. Amount) receiving string type should return 400. Bug #517: type validation not enforced.",
  "object": "Quote",
  "method": "POST",
  "endpoint": "/services/data/v63.0/sobjects/Quote",
  "setup": [
    {
      "type": "sql",
      "name": "Create isolated Account for R-517",
      "sql": "INSERT INTO Account (Id, Name, BillingCountryCode, IsDeleted, CreatedDate, LastModifiedDate, SystemModstamp) VALUES (%s, %s, %s, %s, %s, %s, %s)",
      "params": [
        "r517-acc-01",
        "R-517 Account",
        "{billing_country_code}",
        0,
        "{db_timestamp}",
        "{db_timestamp}",
        "{db_timestamp}"
      ]
    },
    {
      "type": "sql",
      "name": "Create isolated Opportunity for R-517",
      "sql": "INSERT INTO Opportunity (Id, Name, StageName, Amount, CloseDate, AccountId, IsDeleted, CreatedDate, LastModifiedDate, SystemModstamp) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      "params": [
        "r517-opp-01",
        "R-517 Opportunity",
        "Prospecting",
        50000,
        "2026-12-31",
        "r517-acc-01",
        0,
        "{db_timestamp}",
        "{db_timestamp}",
        "{db_timestamp}"
      ]
    }
  ],
  "payload": {
    "Name": "Quote Type Validation Test",
    "OpportunityId": "r517-opp-01",
    "Status": "Draft",
    "Amount": "50000"
  },
  "expects": {
    "status_code": 400
  },
  "teardown": [
    {
      "type": "sql",
      "sql": "DELETE FROM Opportunity WHERE Id = %s",
      "params": [
        "r517-opp-01"
      ]
    },
    {
      "type": "sql",
      "sql": "DELETE FROM Account WHERE Id = %s",
      "params": [
        "r517-acc-01"
      ]
    }
  ],
  "priority": "P0",
  "bug_ref": "#517",
  "scene": "quote"
}
