RAPP.Mercedes.VanCustomerAccount.Api

<back to all web services

InsuranceProducts

The following routes are available for this service:
POST/insuranceproducts/
import 'package:servicestack/servicestack.dart';

class ReturnStatus implements IConvertible
{
    String? ReturnCode;
    String? Message;

    ReturnStatus({this.ReturnCode,this.Message});
    ReturnStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ReturnCode = json['ReturnCode'];
        Message = json['Message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ReturnCode': ReturnCode,
        'Message': Message
    };

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

class InsuranceProduct implements IConvertible
{
    String? CertificateNumber;
    String? ProductType;
    DateTime? StartDate;
    DateTime? EndDate;
    String? Cancelled;

    InsuranceProduct({this.CertificateNumber,this.ProductType,this.StartDate,this.EndDate,this.Cancelled});
    InsuranceProduct.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CertificateNumber = json['CertificateNumber'];
        ProductType = json['ProductType'];
        StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!);
        EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!);
        Cancelled = json['Cancelled'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CertificateNumber': CertificateNumber,
        'ProductType': ProductType,
        'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!),
        'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!),
        'Cancelled': Cancelled
    };

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

class InsuranceProductsResponse implements IConvertible
{
    ReturnStatus? Status;
    int? NumberOfPages;
    List<InsuranceProduct>? InsuranceProducts;

    InsuranceProductsResponse({this.Status,this.NumberOfPages,this.InsuranceProducts});
    InsuranceProductsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Status = JsonConverters.fromJson(json['Status'],'ReturnStatus',context!);
        NumberOfPages = json['NumberOfPages'];
        InsuranceProducts = JsonConverters.fromJson(json['InsuranceProducts'],'List<InsuranceProduct>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Status': JsonConverters.toJson(Status,'ReturnStatus',context!),
        'NumberOfPages': NumberOfPages,
        'InsuranceProducts': JsonConverters.toJson(InsuranceProducts,'List<InsuranceProduct>',context!)
    };

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

class InsuranceProducts implements IConvertible
{
    String? CIAMId;
    String? ChassisNumber;
    int? ItemsPerPage;
    int? PageNumber;

    InsuranceProducts({this.CIAMId,this.ChassisNumber,this.ItemsPerPage,this.PageNumber});
    InsuranceProducts.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CIAMId = json['CIAMId'];
        ChassisNumber = json['ChassisNumber'];
        ItemsPerPage = json['ItemsPerPage'];
        PageNumber = json['PageNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CIAMId': CIAMId,
        'ChassisNumber': ChassisNumber,
        'ItemsPerPage': ItemsPerPage,
        'PageNumber': PageNumber
    };

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

TypeContext _ctx = TypeContext(library: 'webservices.mbukdatabase.co.uk', types: <String, TypeInfo> {
    'ReturnStatus': TypeInfo(TypeOf.Class, create:() => ReturnStatus()),
    'InsuranceProduct': TypeInfo(TypeOf.Class, create:() => InsuranceProduct()),
    'InsuranceProductsResponse': TypeInfo(TypeOf.Class, create:() => InsuranceProductsResponse()),
    'List<InsuranceProduct>': TypeInfo(TypeOf.Class, create:() => <InsuranceProduct>[]),
    'InsuranceProducts': TypeInfo(TypeOf.Class, create:() => InsuranceProducts()),
});

Dart InsuranceProducts 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 /insuranceproducts/ HTTP/1.1 
Host: webservices.mbukdatabase.co.uk 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<InsuranceProducts xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RAPP.Mercedes.VanCustomerAccount.Api.ServiceModel.SitecoreServiceModels">
  <CIAMId>String</CIAMId>
  <ChassisNumber>String</ChassisNumber>
  <ItemsPerPage>0</ItemsPerPage>
  <PageNumber>0</PageNumber>
</InsuranceProducts>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InsuranceProductsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RAPP.Mercedes.VanCustomerAccount.Api.ServiceModel.SitecoreServiceModels">
  <InsuranceProducts>
    <InsuranceProduct>
      <Cancelled>String</Cancelled>
      <CertificateNumber>String</CertificateNumber>
      <EndDate>0001-01-01T00:00:00</EndDate>
      <ProductType>String</ProductType>
      <StartDate>0001-01-01T00:00:00</StartDate>
    </InsuranceProduct>
  </InsuranceProducts>
  <NumberOfPages>0</NumberOfPages>
  <Status>
    <Message>String</Message>
    <ReturnCode>String</ReturnCode>
  </Status>
</InsuranceProductsResponse>