CL$WS Host : D5239-staging-cl

<back to all web services

cr_commandeRequest

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

class _cr_commande_ligne implements IConvertible
{
    String? id_controleur;
    String? id_tournee;
    String? num_facture;
    int? line_id;
    int? article_id;
    int? quantite;
    String? date;
    String? qte_uv;
    String? qte_uc;
    String? cdt_uc;
    double? _qte_uv;
    double? _qte_uc;
    double? _cdt_uc;

    _cr_commande_ligne({this.id_controleur,this.id_tournee,this.num_facture,this.line_id,this.article_id,this.quantite,this.date,this.qte_uv,this.qte_uc,this.cdt_uc,this._qte_uv,this._qte_uc,this._cdt_uc});
    _cr_commande_ligne.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_controleur = json['id_controleur'];
        id_tournee = json['id_tournee'];
        num_facture = json['num_facture'];
        line_id = json['line_id'];
        article_id = json['article_id'];
        quantite = json['quantite'];
        date = json['date'];
        qte_uv = json['qte_uv'];
        qte_uc = json['qte_uc'];
        cdt_uc = json['cdt_uc'];
        _qte_uv = JsonConverters.toDouble(json['_qte_uv']);
        _qte_uc = JsonConverters.toDouble(json['_qte_uc']);
        _cdt_uc = JsonConverters.toDouble(json['_cdt_uc']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_controleur': id_controleur,
        'id_tournee': id_tournee,
        'num_facture': num_facture,
        'line_id': line_id,
        'article_id': article_id,
        'quantite': quantite,
        'date': date,
        'qte_uv': qte_uv,
        'qte_uc': qte_uc,
        'cdt_uc': cdt_uc,
        '_qte_uv': _qte_uv,
        '_qte_uc': _qte_uc,
        '_cdt_uc': _cdt_uc
    };

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

class _cr_commande implements IConvertible
{
    String? id_controleur;
    String? id_tournee;
    String? num_facture;
    String? commentaire;
    int? regroupee;
    String? date;
    List<_cr_commande_ligne>? lignes;

    _cr_commande({this.id_controleur,this.id_tournee,this.num_facture,this.commentaire,this.regroupee,this.date,this.lignes});
    _cr_commande.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_controleur = json['id_controleur'];
        id_tournee = json['id_tournee'];
        num_facture = json['num_facture'];
        commentaire = json['commentaire'];
        regroupee = json['regroupee'];
        date = json['date'];
        lignes = JsonConverters.fromJson(json['lignes'],'List<_cr_commande_ligne>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_controleur': id_controleur,
        'id_tournee': id_tournee,
        'num_facture': num_facture,
        'commentaire': commentaire,
        'regroupee': regroupee,
        'date': date,
        'lignes': JsonConverters.toJson(lignes,'List<_cr_commande_ligne>',context!)
    };

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

class cr_commandeResponse implements IConvertible
{
    String? id_controleur;
    String? id_tournee;
    List<_cr_commande>? cr_commandes;

    cr_commandeResponse({this.id_controleur,this.id_tournee,this.cr_commandes});
    cr_commandeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_controleur = json['id_controleur'];
        id_tournee = json['id_tournee'];
        cr_commandes = JsonConverters.fromJson(json['cr_commandes'],'List<_cr_commande>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_controleur': id_controleur,
        'id_tournee': id_tournee,
        'cr_commandes': JsonConverters.toJson(cr_commandes,'List<_cr_commande>',context!)
    };

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

class cr_commandeRequest implements IConvertible
{
    String? id_controleur;
    String? id_tournee;
    List<_cr_commande>? cr_commandes;

    cr_commandeRequest({this.id_controleur,this.id_tournee,this.cr_commandes});
    cr_commandeRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_controleur = json['id_controleur'];
        id_tournee = json['id_tournee'];
        cr_commandes = JsonConverters.fromJson(json['cr_commandes'],'List<_cr_commande>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_controleur': id_controleur,
        'id_tournee': id_tournee,
        'cr_commandes': JsonConverters.toJson(cr_commandes,'List<_cr_commande>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'freemotion_staging.milliet.paris', types: <String, TypeInfo> {
    '_cr_commande_ligne': TypeInfo(TypeOf.Class, create:() => _cr_commande_ligne()),
    '_cr_commande': TypeInfo(TypeOf.Class, create:() => _cr_commande()),
    'List<_cr_commande_ligne>': TypeInfo(TypeOf.Class, create:() => <_cr_commande_ligne>[]),
    'cr_commandeResponse': TypeInfo(TypeOf.Class, create:() => cr_commandeResponse()),
    'List<_cr_commande>': TypeInfo(TypeOf.Class, create:() => <_cr_commande>[]),
    'cr_commandeRequest': TypeInfo(TypeOf.Class, create:() => cr_commandeRequest()),
});

Dart cr_commandeRequest DTOs

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

HTTP + OTHER

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

POST /cr_commande/{id_controleur}/{id_tournee} HTTP/1.1 
Host: freemotion-staging.milliet.paris 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id_controleur":"String","id_tournee":"String","cr_commandes":[{"id_controleur":"String","id_tournee":"String","num_facture":"String","commentaire":"String","regroupee":0,"date":"String","lignes":[{"id_controleur":"String","id_tournee":"String","num_facture":"String","line_id":0,"article_id":0,"quantite":0,"date":"String","qte_uv":"String","qte_uc":"String","cdt_uc":"String"}]}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id_controleur":"String","id_tournee":"String","cr_commandes":[{"id_controleur":"String","id_tournee":"String","num_facture":"String","commentaire":"String","regroupee":0,"date":"String","lignes":[{"id_controleur":"String","id_tournee":"String","num_facture":"String","line_id":0,"article_id":0,"quantite":0,"date":"String","qte_uv":"String","qte_uc":"String","cdt_uc":"String"}]}]}