FrameAppWS

<back to all web services

GuardarDatosFormaRQ

Requires Authentication
The following routes are available for this service:
All Verbs/Utilidades/Formas/GuardarDatos
import Foundation
import ServiceStack

public class GuardarDatosFormaRQ : Codable
{
    public var idForma:Int
    public var operacion:OperacionDatos
    public var datosMaestro:[String:Object] = [:]
    public var datosDetalle:[GuardarDatosDetalle] = []
    public var formasDep:[GuardarDatosFormaRQ] = []
    public var tokenCargaArchivos:String

    required public init(){}
}

public enum OperacionDatos : String, Codable
{
    case INSERT
    case UPDATE
    case DELETE
}

public class GuardarDatosDetalle : Codable
{
    public var idDetalle:Int
    public var datosInsert:[[String:Object]] = []
    public var datosUpdate:[[String:Object]] = []
    public var datosDelete:[[String:Object]] = []
    public var nombreArchivo:String

    required public init(){}
}

public class GuardarDatosFormaRS : Codable
{
    public var success:Bool
    public var error:String
    public var datosLlaveMaestro:[String:Object] = [:]
    public var novedadesDetalles:[GuardarDatosFormaDetalleRS] = []
    public var respuestaProcAlmacenado:ExecuteDBFunctionRS

    required public init(){}
}

public class GuardarDatosFormaDetalleRS : Codable
{
    public var idDetalle:Double
    public var novedades:[NovedadesCarga] = []

    required public init(){}
}

public class NovedadesCarga : Codable
{
    public var fila:Int
    public var columna:Int
    public var tipoError:String
    public var novedad:String

    required public init(){}
}

public class ExecuteDBFunctionRS : GeneralRS
{
    //respuesta:Object ignored. Type could not be extended in Swift
    public var idEjecucion:Double
    public var urlArchivo:String
    public var tipoRespuesta:String
    public var background:Bool
    public var tiempoRespuestaBD:Int
    public var tiempoRespuestaTotal:Int
    /**
    * Id del código de respuesta 1: Correcto, -1: Error
    */
    // @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
    public var codigo:Int

    /**
    * Mensaje que se envía al ejecutar el servicio
    */
    // @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
    public var mensaje:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case respuesta
        case idEjecucion
        case urlArchivo
        case tipoRespuesta
        case background
        case tiempoRespuestaBD
        case tiempoRespuestaTotal
        case codigo
        case mensaje
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        respuesta = try container.decodeIfPresent(Object.self, forKey: .respuesta)
        idEjecucion = try container.decodeIfPresent(Double.self, forKey: .idEjecucion)
        urlArchivo = try container.decodeIfPresent(String.self, forKey: .urlArchivo)
        tipoRespuesta = try container.decodeIfPresent(String.self, forKey: .tipoRespuesta)
        background = try container.decodeIfPresent(Bool.self, forKey: .background)
        tiempoRespuestaBD = try container.decodeIfPresent(Int.self, forKey: .tiempoRespuestaBD)
        tiempoRespuestaTotal = try container.decodeIfPresent(Int.self, forKey: .tiempoRespuestaTotal)
        codigo = try container.decodeIfPresent(Int.self, forKey: .codigo)
        mensaje = try container.decodeIfPresent(String.self, forKey: .mensaje)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if respuesta != nil { try container.encode(respuesta, forKey: .respuesta) }
        if idEjecucion != nil { try container.encode(idEjecucion, forKey: .idEjecucion) }
        if urlArchivo != nil { try container.encode(urlArchivo, forKey: .urlArchivo) }
        if tipoRespuesta != nil { try container.encode(tipoRespuesta, forKey: .tipoRespuesta) }
        if background != nil { try container.encode(background, forKey: .background) }
        if tiempoRespuestaBD != nil { try container.encode(tiempoRespuestaBD, forKey: .tiempoRespuestaBD) }
        if tiempoRespuestaTotal != nil { try container.encode(tiempoRespuestaTotal, forKey: .tiempoRespuestaTotal) }
        if codigo != nil { try container.encode(codigo, forKey: .codigo) }
        if mensaje != nil { try container.encode(mensaje, forKey: .mensaje) }
    }
}

public class GeneralRS : Codable
{
    /**
    * Id del código de respuesta 1: Correcto, -1: Error
    */
    // @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
    public var codigo:Int

    /**
    * Mensaje que se envía al ejecutar el servicio
    */
    // @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
    public var mensaje:String

    required public init(){}
}


Swift GuardarDatosFormaRQ DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Utilidades/Formas/GuardarDatos HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GuardarDatosFormaRQ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Administrador.Modelo.Tipos">
  <DatosDetalle>
    <GuardarDatosDetalle>
      <DatosDelete xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:ArrayOfKeyValueOfstringanyType>
          <d4p1:KeyValueOfstringanyType>
            <d4p1:Key>String</d4p1:Key>
            <d4p1:Value />
          </d4p1:KeyValueOfstringanyType>
        </d4p1:ArrayOfKeyValueOfstringanyType>
      </DatosDelete>
      <DatosInsert xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:ArrayOfKeyValueOfstringanyType>
          <d4p1:KeyValueOfstringanyType>
            <d4p1:Key>String</d4p1:Key>
            <d4p1:Value />
          </d4p1:KeyValueOfstringanyType>
        </d4p1:ArrayOfKeyValueOfstringanyType>
      </DatosInsert>
      <DatosUpdate xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:ArrayOfKeyValueOfstringanyType>
          <d4p1:KeyValueOfstringanyType>
            <d4p1:Key>String</d4p1:Key>
            <d4p1:Value />
          </d4p1:KeyValueOfstringanyType>
        </d4p1:ArrayOfKeyValueOfstringanyType>
      </DatosUpdate>
      <IDDetalle>0</IDDetalle>
      <NombreArchivo>String</NombreArchivo>
    </GuardarDatosDetalle>
  </DatosDetalle>
  <DatosMaestro xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
  </DatosMaestro>
  <FormasDep>
    <GuardarDatosFormaRQ>
      <DatosDetalle>
        <GuardarDatosDetalle>
          <DatosDelete xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:ArrayOfKeyValueOfstringanyType>
              <d6p1:KeyValueOfstringanyType>
                <d6p1:Key>String</d6p1:Key>
                <d6p1:Value />
              </d6p1:KeyValueOfstringanyType>
            </d6p1:ArrayOfKeyValueOfstringanyType>
          </DatosDelete>
          <DatosInsert xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:ArrayOfKeyValueOfstringanyType>
              <d6p1:KeyValueOfstringanyType>
                <d6p1:Key>String</d6p1:Key>
                <d6p1:Value />
              </d6p1:KeyValueOfstringanyType>
            </d6p1:ArrayOfKeyValueOfstringanyType>
          </DatosInsert>
          <DatosUpdate xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:ArrayOfKeyValueOfstringanyType>
              <d6p1:KeyValueOfstringanyType>
                <d6p1:Key>String</d6p1:Key>
                <d6p1:Value />
              </d6p1:KeyValueOfstringanyType>
            </d6p1:ArrayOfKeyValueOfstringanyType>
          </DatosUpdate>
          <IDDetalle>0</IDDetalle>
          <NombreArchivo>String</NombreArchivo>
        </GuardarDatosDetalle>
      </DatosDetalle>
      <DatosMaestro xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringanyType>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value />
        </d4p1:KeyValueOfstringanyType>
      </DatosMaestro>
      <FormasDep>
        <GuardarDatosFormaRQ>
          <DatosDetalle>
            <GuardarDatosDetalle>
              <DatosDelete xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d8p1:ArrayOfKeyValueOfstringanyType>
                  <d8p1:KeyValueOfstringanyType>
                    <d8p1:Key>String</d8p1:Key>
                    <d8p1:Value />
                  </d8p1:KeyValueOfstringanyType>
                </d8p1:ArrayOfKeyValueOfstringanyType>
              </DatosDelete>
              <DatosInsert xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d8p1:ArrayOfKeyValueOfstringanyType>
                  <d8p1:KeyValueOfstringanyType>
                    <d8p1:Key>String</d8p1:Key>
                    <d8p1:Value />
                  </d8p1:KeyValueOfstringanyType>
                </d8p1:ArrayOfKeyValueOfstringanyType>
              </DatosInsert>
              <DatosUpdate xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d8p1:ArrayOfKeyValueOfstringanyType>
                  <d8p1:KeyValueOfstringanyType>
                    <d8p1:Key>String</d8p1:Key>
                    <d8p1:Value />
                  </d8p1:KeyValueOfstringanyType>
                </d8p1:ArrayOfKeyValueOfstringanyType>
              </DatosUpdate>
              <IDDetalle>0</IDDetalle>
              <NombreArchivo>String</NombreArchivo>
            </GuardarDatosDetalle>
          </DatosDetalle>
          <DatosMaestro xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:KeyValueOfstringanyType>
              <d6p1:Key>String</d6p1:Key>
              <d6p1:Value />
            </d6p1:KeyValueOfstringanyType>
          </DatosMaestro>
          <FormasDep>
            <GuardarDatosFormaRQ>
              <DatosDetalle>
                <GuardarDatosDetalle>
                  <DatosDelete xmlns:d10p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                    <d10p1:ArrayOfKeyValueOfstringanyType>
                      <d10p1:KeyValueOfstringanyType>
                        <d10p1:Key>String</d10p1:Key>
                        <d10p1:Value />
                      </d10p1:KeyValueOfstringanyType>
                    </d10p1:ArrayOfKeyValueOfstringanyType>
                  </DatosDelete>
                  <DatosInsert xmlns:d10p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                    <d10p1:ArrayOfKeyValueOfstringanyType>
                      <d10p1:KeyValueOfstringanyType>
                        <d10p1:Key>String</d10p1:Key>
                        <d10p1:Value />
                      </d10p1:KeyValueOfstringanyType>
                    </d10p1:ArrayOfKeyValueOfstringanyType>
                  </DatosInsert>
                  <DatosUpdate xmlns:d10p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                    <d10p1:ArrayOfKeyValueOfstringanyType>
                      <d10p1:KeyValueOfstringanyType>
                        <d10p1:Key>String</d10p1:Key>
                        <d10p1:Value />
                      </d10p1:KeyValueOfstringanyType>
                    </d10p1:ArrayOfKeyValueOfstringanyType>
                  </DatosUpdate>
                  <IDDetalle>0</IDDetalle>
                  <NombreArchivo>String</NombreArchivo>
                </GuardarDatosDetalle>
              </DatosDetalle>
              <DatosMaestro xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d8p1:KeyValueOfstringanyType>
                  <d8p1:Key>String</d8p1:Key>
                  <d8p1:Value />
                </d8p1:KeyValueOfstringanyType>
              </DatosMaestro>
              <FormasDep i:nil="true" />
              <IDForma>0</IDForma>
              <Operacion>INSERT</Operacion>
              <TokenCargaArchivos>String</TokenCargaArchivos>
            </GuardarDatosFormaRQ>
          </FormasDep>
          <IDForma>0</IDForma>
          <Operacion>INSERT</Operacion>
          <TokenCargaArchivos>String</TokenCargaArchivos>
        </GuardarDatosFormaRQ>
      </FormasDep>
      <IDForma>0</IDForma>
      <Operacion>INSERT</Operacion>
      <TokenCargaArchivos>String</TokenCargaArchivos>
    </GuardarDatosFormaRQ>
  </FormasDep>
  <IDForma>0</IDForma>
  <Operacion>INSERT</Operacion>
  <TokenCargaArchivos>String</TokenCargaArchivos>
</GuardarDatosFormaRQ>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GuardarDatosFormaRS xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Administrador.Modelo.Tipos">
  <DatosLlaveMaestro xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringanyType>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value />
    </d2p1:KeyValueOfstringanyType>
  </DatosLlaveMaestro>
  <Error>String</Error>
  <NovedadesDetalles>
    <GuardarDatosFormaDetalleRS>
      <IDDetalle>0</IDDetalle>
      <Novedades xmlns:d4p1="http://schemas.datacontract.org/2004/07/Administrador.Modelo">
        <d4p1:NovedadesCarga>
          <d4p1:Columna>0</d4p1:Columna>
          <d4p1:Fila>0</d4p1:Fila>
          <d4p1:Novedad>String</d4p1:Novedad>
          <d4p1:TipoError>String</d4p1:TipoError>
        </d4p1:NovedadesCarga>
      </Novedades>
    </GuardarDatosFormaDetalleRS>
  </NovedadesDetalles>
  <RespuestaProcAlmacenado>
    <Codigo>0</Codigo>
    <Mensaje>String</Mensaje>
    <Background>false</Background>
    <IDEjecucion>0</IDEjecucion>
    <Respuesta />
    <TiempoRespuestaBD>0</TiempoRespuestaBD>
    <TiempoRespuestaTotal>0</TiempoRespuestaTotal>
    <TipoRespuesta>String</TipoRespuesta>
    <URLArchivo>String</URLArchivo>
  </RespuestaProcAlmacenado>
  <Success>false</Success>
</GuardarDatosFormaRS>