       try container.encode(id, forKey: .id)
       try container.encode(required, forKey: .required)
       try container.encode(title, forKey: .title)
+      try container.encodeIfPresent(options, forKey: .options)
+      
       try container.encode(type, forKey: .type)
-      try container.encodeIfPresent(options, forKey: .options)
-      
       switch value {
       case .singleSelection(let optionId):
         try container.encode(optionId, forKey: .value)

      required = try container.decode(Bool.self, forKey: .required)
      options = try container.decodeIfPresent([InputOption].self, forKey: .options)
      title = try container.decode(String.self, forKey: .title)
      type = try container.decode(InputType.self, forKey: .type)
      
      switch type {
      case .longText:

      case multipleSelections([InputOptionId])
      case longText(String)
      case returnTripDate(ReturnTripDateValue)
      case number(Int, min: Int?, max: Int?)
    }
    
    public let required: Bool
    public let id: String
    public let options: [InputOption]?
    public let title: String
    public var value: InputValue
    
    public var type: InputType {
      switch value {
      case .longText: return .longText
      case .singleSelection: return .singleSelection
      case .multipleSelections: return .multipleSelections
      case .returnTripDate: return .requestReturnTrip
      case .number: return .number
      }
    }
    
    private enum CodingKeys: String, CodingKey {
      case id
