CL$WS Host : D5239-staging-cl

<back to all web services

cl_tournee_dechargementRequest

The following routes are available for this service:
GET, DELETE/cl_tournee_dechargement
GET, DELETE/cl_tournee_dechargement/{id_operateur}
POST, DELETE/cl_tournee_dechargement/{id_operateur}/{id_tournee}
import 'package:servicestack/servicestack.dart';

class _deconsigne implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    String? num_facture;
    String? id_deconsigne;
    String? id_client;
    int? quantite;
    double? pu_euro;
    double? montant;
    String? date;

    _deconsigne({this.id_operateur,this.id_tournee,this.num_facture,this.id_deconsigne,this.id_client,this.quantite,this.pu_euro,this.montant,this.date});
    _deconsigne.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        num_facture = json['num_facture'];
        id_deconsigne = json['id_deconsigne'];
        id_client = json['id_client'];
        quantite = json['quantite'];
        pu_euro = JsonConverters.toDouble(json['pu_euro']);
        montant = JsonConverters.toDouble(json['montant']);
        date = json['date'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'num_facture': num_facture,
        'id_deconsigne': id_deconsigne,
        'id_client': id_client,
        'quantite': quantite,
        'pu_euro': pu_euro,
        'montant': montant,
        'date': date
    };

    getTypeName() => "_deconsigne";
    TypeContext? context = _ctx;
}

class _encaissement implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    String? id_client;
    String? id_reglement;
    double? montant;
    String? code_devise;
    String? date;

    _encaissement({this.id_operateur,this.id_tournee,this.id_client,this.id_reglement,this.montant,this.code_devise,this.date});
    _encaissement.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        id_client = json['id_client'];
        id_reglement = json['id_reglement'];
        montant = JsonConverters.toDouble(json['montant']);
        code_devise = json['code_devise'];
        date = json['date'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'id_client': id_client,
        'id_reglement': id_reglement,
        'montant': montant,
        'code_devise': code_devise,
        'date': date
    };

    getTypeName() => "_encaissement";
    TypeContext? context = _ctx;
}

class _incident implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    String? num_facture;
    String? id_motif;
    String? date;
    String? photo;
    int? attente;

    _incident({this.id_operateur,this.id_tournee,this.num_facture,this.id_motif,this.date,this.photo,this.attente});
    _incident.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        num_facture = json['num_facture'];
        id_motif = json['id_motif'];
        date = json['date'];
        photo = json['photo'];
        attente = json['attente'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'num_facture': num_facture,
        'id_motif': id_motif,
        'date': date,
        'photo': photo,
        'attente': attente
    };

    getTypeName() => "_incident";
    TypeContext? context = _ctx;
}

class cl_tournee_dechargementResponse implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    List<_deconsigne>? deconsignes;
    List<_encaissement>? encaissements;
    List<_incident>? incidents;

    cl_tournee_dechargementResponse({this.id_operateur,this.id_tournee,this.deconsignes,this.encaissements,this.incidents});
    cl_tournee_dechargementResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        deconsignes = JsonConverters.fromJson(json['deconsignes'],'List<_deconsigne>',context!);
        encaissements = JsonConverters.fromJson(json['encaissements'],'List<_encaissement>',context!);
        incidents = JsonConverters.fromJson(json['incidents'],'List<_incident>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'deconsignes': JsonConverters.toJson(deconsignes,'List<_deconsigne>',context!),
        'encaissements': JsonConverters.toJson(encaissements,'List<_encaissement>',context!),
        'incidents': JsonConverters.toJson(incidents,'List<_incident>',context!)
    };

    getTypeName() => "cl_tournee_dechargementResponse";
    TypeContext? context = _ctx;
}

class cl_tournee_dechargementRequest implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    List<_deconsigne>? deconsignes;
    List<_encaissement>? encaissements;
    List<_incident>? incidents;

    cl_tournee_dechargementRequest({this.id_operateur,this.id_tournee,this.deconsignes,this.encaissements,this.incidents});
    cl_tournee_dechargementRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        deconsignes = JsonConverters.fromJson(json['deconsignes'],'List<_deconsigne>',context!);
        encaissements = JsonConverters.fromJson(json['encaissements'],'List<_encaissement>',context!);
        incidents = JsonConverters.fromJson(json['incidents'],'List<_incident>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'deconsignes': JsonConverters.toJson(deconsignes,'List<_deconsigne>',context!),
        'encaissements': JsonConverters.toJson(encaissements,'List<_encaissement>',context!),
        'incidents': JsonConverters.toJson(incidents,'List<_incident>',context!)
    };

    getTypeName() => "cl_tournee_dechargementRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'freemotion_staging.milliet.paris', types: <String, TypeInfo> {
    '_deconsigne': TypeInfo(TypeOf.Class, create:() => _deconsigne()),
    '_encaissement': TypeInfo(TypeOf.Class, create:() => _encaissement()),
    '_incident': TypeInfo(TypeOf.Class, create:() => _incident()),
    'cl_tournee_dechargementResponse': TypeInfo(TypeOf.Class, create:() => cl_tournee_dechargementResponse()),
    'List<_deconsigne>': TypeInfo(TypeOf.Class, create:() => <_deconsigne>[]),
    'List<_encaissement>': TypeInfo(TypeOf.Class, create:() => <_encaissement>[]),
    'List<_incident>': TypeInfo(TypeOf.Class, create:() => <_incident>[]),
    'cl_tournee_dechargementRequest': TypeInfo(TypeOf.Class, create:() => cl_tournee_dechargementRequest()),
});

Dart cl_tournee_dechargementRequest 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.

POST /cl_tournee_dechargement/{id_operateur}/{id_tournee} HTTP/1.1 
Host: freemotion-staging.milliet.paris 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id_operateur":"String","id_tournee":"String","deconsignes":[{"id_operateur":"String","id_tournee":"String","num_facture":"String","id_deconsigne":"String","id_client":"String","quantite":0,"pu_euro":0,"montant":0,"date":"String"}],"encaissements":[{"id_operateur":"String","id_tournee":"String","id_client":"String","id_reglement":"String","montant":0,"code_devise":"String","date":"String"}],"incidents":[{"id_operateur":"String","id_tournee":"String","num_facture":"String","id_motif":"String","date":"String","photo":"String","attente":0}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id_operateur":"String","id_tournee":"String","deconsignes":[{"id_operateur":"String","id_tournee":"String","num_facture":"String","id_deconsigne":"String","id_client":"String","quantite":0,"pu_euro":0,"montant":0,"date":"String"}],"encaissements":[{"id_operateur":"String","id_tournee":"String","id_client":"String","id_reglement":"String","montant":0,"code_devise":"String","date":"String"}],"incidents":[{"id_operateur":"String","id_tournee":"String","num_facture":"String","id_motif":"String","date":"String","photo":"String","attente":0}]}