sfgboxapi

<back to all web services

UsersDetailsAutoQueryEdit

import 'package:servicestack/servicestack.dart';

class UsersDetails implements IConvertible
{
    // @DataMember(Order=1)
    // @required()
    int? id;

    // @DataMember(Order=2)
    // @required()
    // @References(typeof(AppUser))
    int? appUserId;

    // @DataMember(Order=3)
    bool? approved;

    // @DataMember(Order=4)
    String? identificationNumber;

    // @DataMember(Order=5)
    String? passportNumber;

    // @DataMember(Order=6)
    String? address;

    // @DataMember(Order=7)
    double? latitude;

    // @DataMember(Order=8)
    double? longitude;

    // @DataMember(Order=9)
    int? age;

    // @DataMember(Order=10)
    String? ethnicGroup;

    // @DataMember(Order=11)
    String? gender;

    // @DataMember(Order=12)
    bool? isDisabled;

    // @DataMember(Order=13)
    String? documentUrl;

    // @DataMember(Order=14)
    DateTime? applicationDate;

    // @DataMember(Order=15)
    DateTime? approvalDate;

    // @DataMember(Order=16)
    bool? isZoneMain;

    // @DataMember(Order=16)
    String? publicAccessGuid;

    UsersDetails({this.id,this.appUserId,this.approved,this.identificationNumber,this.passportNumber,this.address,this.latitude,this.longitude,this.age,this.ethnicGroup,this.gender,this.isDisabled,this.documentUrl,this.applicationDate,this.approvalDate,this.isZoneMain,this.publicAccessGuid});
    UsersDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        appUserId = json['appUserId'];
        approved = json['approved'];
        identificationNumber = json['identificationNumber'];
        passportNumber = json['passportNumber'];
        address = json['address'];
        latitude = JsonConverters.toDouble(json['latitude']);
        longitude = JsonConverters.toDouble(json['longitude']);
        age = json['age'];
        ethnicGroup = json['ethnicGroup'];
        gender = json['gender'];
        isDisabled = json['isDisabled'];
        documentUrl = json['documentUrl'];
        applicationDate = JsonConverters.fromJson(json['applicationDate'],'DateTime',context!);
        approvalDate = JsonConverters.fromJson(json['approvalDate'],'DateTime',context!);
        isZoneMain = json['isZoneMain'];
        publicAccessGuid = json['publicAccessGuid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'appUserId': appUserId,
        'approved': approved,
        'identificationNumber': identificationNumber,
        'passportNumber': passportNumber,
        'address': address,
        'latitude': latitude,
        'longitude': longitude,
        'age': age,
        'ethnicGroup': ethnicGroup,
        'gender': gender,
        'isDisabled': isDisabled,
        'documentUrl': documentUrl,
        'applicationDate': JsonConverters.toJson(applicationDate,'DateTime',context!),
        'approvalDate': JsonConverters.toJson(approvalDate,'DateTime',context!),
        'isZoneMain': isZoneMain,
        'publicAccessGuid': publicAccessGuid
    };

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

class UsersDetailsAutoQueryEdit extends UsersDetails implements IUpdateDb<UsersDetails>, IConvertible
{
    UsersDetailsAutoQueryEdit();
    UsersDetailsAutoQueryEdit.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "UsersDetailsAutoQueryEdit";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api_stage.smartfarmertech.com', types: <String, TypeInfo> {
    'UsersDetails': TypeInfo(TypeOf.Class, create:() => UsersDetails()),
    'UsersDetailsAutoQueryEdit': TypeInfo(TypeOf.Class, create:() => UsersDetailsAutoQueryEdit()),
});

Dart UsersDetailsAutoQueryEdit 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 /xml/reply/UsersDetailsAutoQueryEdit HTTP/1.1 
Host: api-stage.smartfarmertech.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UsersDetailsAutoQueryEdit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel">
  <Address xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">String</Address>
  <Age xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">0</Age>
  <AppUserId xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">0</AppUserId>
  <ApplicationDate xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">0001-01-01T00:00:00</ApplicationDate>
  <ApprovalDate xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">0001-01-01T00:00:00</ApprovalDate>
  <Approved xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">false</Approved>
  <DocumentUrl xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">String</DocumentUrl>
  <EthnicGroup xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">String</EthnicGroup>
  <Gender xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">String</Gender>
  <Id xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">0</Id>
  <IdentificationNumber xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">String</IdentificationNumber>
  <IsDisabled xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">false</IsDisabled>
  <IsZoneMain xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">false</IsZoneMain>
  <Latitude xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">0</Latitude>
  <Longitude xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">0</Longitude>
  <PassportNumber xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">String</PassportNumber>
  <PublicAccessGuid xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">00000000-0000-0000-0000-000000000000</PublicAccessGuid>
</UsersDetailsAutoQueryEdit>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UsersDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/sfgboxapi.ServiceModel.Types">
  <Address>String</Address>
  <Age>0</Age>
  <AppUserId>0</AppUserId>
  <ApplicationDate>0001-01-01T00:00:00</ApplicationDate>
  <ApprovalDate>0001-01-01T00:00:00</ApprovalDate>
  <Approved>false</Approved>
  <DocumentUrl>String</DocumentUrl>
  <EthnicGroup>String</EthnicGroup>
  <Gender>String</Gender>
  <Id>0</Id>
  <IdentificationNumber>String</IdentificationNumber>
  <IsDisabled>false</IsDisabled>
  <IsZoneMain>false</IsZoneMain>
  <Latitude>0</Latitude>
  <Longitude>0</Longitude>
  <PassportNumber>String</PassportNumber>
  <PublicAccessGuid>00000000-0000-0000-0000-000000000000</PublicAccessGuid>
</UsersDetails>