Unico3.Link.API

<back to all web services

QueryContratti

Assistenza
The following routes are available for this service:
GET/assistenza/query/contratti
namespace Unico3.Core.Database.Types.Enums.Assistenza

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type StatoContratto =
        | Attivo = 0
        | Storico = 1

    [<AllowNullLiteral>]
    type FK() = 
        member val Id:Nullable<Int32> = new Nullable<Int32>() with get,set

    [<AllowNullLiteral>]
    type FK_TipologiaContratto() = 
        inherit FK()
        member val Codice:String = null with get,set
        member val Descrizione:String = null with get,set
        member val CodiceExport:String = null with get,set

    [<AllowNullLiteral>]
    type FK_Anagrafica() = 
        inherit FK()
        member val Codice:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val CodiceExport:String = null with get,set

    [<AllowNullLiteral>]
    type FK_Impianto() = 
        inherit FK()
        member val Codice:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val CodiceExport:String = null with get,set

    type TipoMacchinaCopertura =
        | Componente = 0
        | Bruciatore = 1
        | GruppoTermico = 2
        | GruppoFrigo = 3
        | Scambiatore = 4
        | UIR = 5

    [<AllowNullLiteral>]
    type MacchinaCopertura() = 
        member val Id:Int32 = new Int32() with get,set
        member val Tipo:TipoMacchinaCopertura = new TipoMacchinaCopertura() with get,set
        member val Codice:String = null with get,set
        member val Descrizione:String = null with get,set
        member val Matricola:String = null with get,set

    [<AllowNullLiteral>]
    type CoperturaContrattoElenco() = 
        member val Id:Int32 = new Int32() with get,set
        member val CodiceExport:String = null with get,set
        member val DataUltimaModifica:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Anagrafica:FK_Anagrafica = null with get,set
        member val Impianto:FK_Impianto = null with get,set
        member val Macchina:MacchinaCopertura = null with get,set

    [<AllowNullLiteral>]
    type ContrattoElenco() = 
        member val Id:Int32 = new Int32() with get,set
        member val Numero:Int32 = new Int32() with get,set
        member val Suffisso:String = null with get,set
        member val CodiceExport:String = null with get,set
        member val Importo:Double = new Double() with get,set
        member val ImportoNetto:Nullable<Double> = new Nullable<Double>() with get,set
        member val DataStipula:DateTime = new DateTime() with get,set
        member val DataInizioCopertura:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val DataFineCopertura:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val DataFineTacitoRinnovo:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val DataUltimaModifica:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val IsTacitoRinnovo:Boolean = new Boolean() with get,set
        member val TacitoRinnovoDiMesi:Int32 = new Int32() with get,set
        member val Stato:StatoContratto = new StatoContratto() with get,set
        member val Tipologia:FK_TipologiaContratto = null with get,set
        member val Anagrafica:FK_Anagrafica = null with get,set
        member val Impianto:FK_Impianto = null with get,set
        member val Coperture:ResizeArray<CoperturaContrattoElenco> = new ResizeArray<CoperturaContrattoElenco>() with get,set

    [<AllowNullLiteral>]
    type QueryContrattiResponse() = 
        member val Totale:Int32 = new Int32() with get,set
        member val Skip:Int32 = new Int32() with get,set
        member val Take:Int32 = new Int32() with get,set
        member val Risultati:ResizeArray<ContrattoElenco> = new ResizeArray<ContrattoElenco>() with get,set

    [<AllowNullLiteral>]
    type QueryContratti() = 
        member val ModificatiDal:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val CodiceImpianto:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Skip:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Take:Nullable<Int32> = new Nullable<Int32>() with get,set

F# QueryContratti DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /assistenza/query/contratti HTTP/1.1 
Host: unico3.link.api 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Totale":0,"Skip":0,"Take":0,"Risultati":[{"Id":0,"Numero":0,"Suffisso":"String","CodiceExport":"String","Importo":0,"ImportoNetto":0,"DataStipula":"0001-01-01T00:00:00.0000000","DataInizioCopertura":"0001-01-01T00:00:00.0000000","DataFineCopertura":"0001-01-01T00:00:00.0000000","DataFineTacitoRinnovo":"0001-01-01T00:00:00.0000000","DataUltimaModifica":"0001-01-01T00:00:00.0000000","IsTacitoRinnovo":false,"TacitoRinnovoDiMesi":0,"Stato":"Attivo","Tipologia":{"Codice":"String","Descrizione":"String","CodiceExport":"String","Id":0},"Anagrafica":{"Codice":0,"CodiceExport":"String","Id":0},"Impianto":{"Codice":0,"CodiceExport":"String","Id":0},"Coperture":[{"Id":0,"CodiceExport":"String","DataUltimaModifica":"0001-01-01T00:00:00.0000000","Anagrafica":{"Codice":0,"CodiceExport":"String","Id":0},"Impianto":{"Codice":0,"CodiceExport":"String","Id":0},"Macchina":{"Id":0,"Tipo":"Componente","Codice":"String","Descrizione":"String","Matricola":"String"}}]}]}