TicketUserServices

<back to all web services

LocationUpdateRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:Tickets.Add
The following routes are available for this service:
PUT/Location
import 'package:servicestack/servicestack.dart';

class Location implements IConvertible
{
    int? id;
    String? name;
    double? latitude;
    double? longitude;
    String? addressName;
    String? addressLine;
    String? zip;
    String? city;
    String? county;
    String? stateCode;
    String? stateName;
    String? countryCode;
    String? countryName;
    String? timeZone;

    Location({this.id,this.name,this.latitude,this.longitude,this.addressName,this.addressLine,this.zip,this.city,this.county,this.stateCode,this.stateName,this.countryCode,this.countryName,this.timeZone});
    Location.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        latitude = JsonConverters.toDouble(json['latitude']);
        longitude = JsonConverters.toDouble(json['longitude']);
        addressName = json['addressName'];
        addressLine = json['addressLine'];
        zip = json['zip'];
        city = json['city'];
        county = json['county'];
        stateCode = json['stateCode'];
        stateName = json['stateName'];
        countryCode = json['countryCode'];
        countryName = json['countryName'];
        timeZone = json['timeZone'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'latitude': latitude,
        'longitude': longitude,
        'addressName': addressName,
        'addressLine': addressLine,
        'zip': zip,
        'city': city,
        'county': county,
        'stateCode': stateCode,
        'stateName': stateName,
        'countryCode': countryCode,
        'countryName': countryName,
        'timeZone': timeZone
    };

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

class LocationResult implements IConvertible
{
    Location? item;
    int? statusCode;
    String? message;

    LocationResult({this.item,this.statusCode,this.message});
    LocationResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        item = JsonConverters.fromJson(json['item'],'Location',context!);
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'item': JsonConverters.toJson(item,'Location',context!),
        'statusCode': statusCode,
        'message': message
    };

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

class LocationUpdateRequest implements IConvertible
{
    Location? item;

    LocationUpdateRequest({this.item});
    LocationUpdateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        item = JsonConverters.fromJson(json['item'],'Location',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'item': JsonConverters.toJson(item,'Location',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
    'Location': TypeInfo(TypeOf.Class, create:() => Location()),
    'LocationResult': TypeInfo(TypeOf.Class, create:() => LocationResult()),
    'LocationUpdateRequest': TypeInfo(TypeOf.Class, create:() => LocationUpdateRequest()),
});

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

PUT /Location HTTP/1.1 
Host: stubbur-autoupdates-live.smartnewapis.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"item":{"id":0,"name":"String","latitude":0,"longitude":0,"addressName":"String","addressLine":"String","zip":"String","city":"String","county":"String","stateCode":"String","stateName":"String","countryCode":"String","countryName":"String","timeZone":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"item":{"id":0,"name":"String","latitude":0,"longitude":0,"addressName":"String","addressLine":"String","zip":"String","city":"String","county":"String","stateCode":"String","stateName":"String","countryCode":"String","countryName":"String","timeZone":"String"},"statusCode":0,"message":"String"}