regis

<back to all web services

ConcentrationsRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Concentrations
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class ConcentrationResponse implements IConvertible
{
    ResponseStatus? responseStatus;
    int? id;
    String? concentration_code;
    String? concentration_name;
    bool? is_active;

    ConcentrationResponse({this.responseStatus,this.id,this.concentration_code,this.concentration_name,this.is_active});
    ConcentrationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        id = json['id'];
        concentration_code = json['concentration_code'];
        concentration_name = json['concentration_name'];
        is_active = json['is_active'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
        'id': id,
        'concentration_code': concentration_code,
        'concentration_name': concentration_name,
        'is_active': is_active
    };

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

class ConcentrationsResponse implements IConvertible
{
    ResponseStatus? responseStatus;
    List<ConcentrationResponse>? concentrations;

    ConcentrationsResponse({this.responseStatus,this.concentrations});
    ConcentrationsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        concentrations = JsonConverters.fromJson(json['concentrations'],'List<ConcentrationResponse>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
        'concentrations': JsonConverters.toJson(concentrations,'List<ConcentrationResponse>',context!)
    };

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

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

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ConcentrationsRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
    'ConcentrationResponse': TypeInfo(TypeOf.Class, create:() => ConcentrationResponse()),
    'ConcentrationsResponse': TypeInfo(TypeOf.Class, create:() => ConcentrationsResponse()),
    'List<ConcentrationResponse>': TypeInfo(TypeOf.Class, create:() => <ConcentrationResponse>[]),
    'ConcentrationsRequest': TypeInfo(TypeOf.Class, create:() => ConcentrationsRequest()),
});

Dart ConcentrationsRequest DTOs

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

HTTP + JSV

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

POST /Concentrations HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	concentrations: 
	[
		{
			responseStatus: 
			{
				errorCode: String,
				message: String,
				stackTrace: String,
				errors: 
				[
					{
						errorCode: String,
						fieldName: String,
						message: String,
						meta: 
						{
							String: String
						}
					}
				],
				meta: 
				{
					String: String
				}
			},
			id: 0,
			concentration_code: String,
			concentration_name: String,
			is_active: False
		}
	]
}