sfgboxapi

<back to all web services

PestsLookup

Requires Authentication
The following routes are available for this service:
GET/pests
import 'package:servicestack/servicestack.dart';

// @DataContract
class PestsLookup implements IConvertible
{
    // @DataMember(Order=2)
    int? tenantsId;

    // @DataMember(Order=3)
    int? zonesId;

    // @DataMember(Order=4)
    int? varietiesId;

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

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

    // @DataMember(Order=7)
    String? solutions;

    // @DataMember(Order=8)
    String? additionalInfo;

    PestsLookup({this.tenantsId,this.zonesId,this.varietiesId,this.description,this.diseases,this.solutions,this.additionalInfo});
    PestsLookup.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        tenantsId = json['tenantsId'];
        zonesId = json['zonesId'];
        varietiesId = json['varietiesId'];
        description = json['description'];
        diseases = json['diseases'];
        solutions = json['solutions'];
        additionalInfo = json['additionalInfo'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'tenantsId': tenantsId,
        'zonesId': zonesId,
        'varietiesId': varietiesId,
        'description': description,
        'diseases': diseases,
        'solutions': solutions,
        'additionalInfo': additionalInfo
    };

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

TypeContext _ctx = TypeContext(library: 'sfgboxapi.dev.scadsoftware.com', types: <String, TypeInfo> {
    'PestsLookup': TypeInfo(TypeOf.Class, create:() => PestsLookup()),
});

Dart PestsLookup DTOs

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

HTTP + CSV

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

GET /pests HTTP/1.1 
Host: sfgboxapi.dev.scadsoftware.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'IEnumerable`1' using the custom 'csv' filter}Cannot dynamically create an instance of type 'System.Collections.Generic.IEnumerable`1[sfgboxapi.ServiceModel.PestsLookupResponse]'. Reason: Cannot create an instance of an interface.