Required permission: | ReadRegistrationAvailability |
POST | /Registration/{reporting_term}/Available |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class RegistrationAvailableResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? regent_id;
bool? birthdate_exists;
bool? birthdate_matches;
bool? has_regent_login;
bool? is_a_regis_person;
bool? is_a_sugar_person;
bool? term_is_available;
bool? blocked_in_regis;
bool? email_matches;
RegistrationAvailableResponse({this.responseStatus,this.regent_id,this.birthdate_exists,this.birthdate_matches,this.has_regent_login,this.is_a_regis_person,this.is_a_sugar_person,this.term_is_available,this.blocked_in_regis,this.email_matches});
RegistrationAvailableResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
regent_id = json['regent_id'];
birthdate_exists = json['birthdate_exists'];
birthdate_matches = json['birthdate_matches'];
has_regent_login = json['has_regent_login'];
is_a_regis_person = json['is_a_regis_person'];
is_a_sugar_person = json['is_a_sugar_person'];
term_is_available = json['term_is_available'];
blocked_in_regis = json['blocked_in_regis'];
email_matches = json['email_matches'];
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'regent_id': regent_id,
'birthdate_exists': birthdate_exists,
'birthdate_matches': birthdate_matches,
'has_regent_login': has_regent_login,
'is_a_regis_person': is_a_regis_person,
'is_a_sugar_person': is_a_sugar_person,
'term_is_available': term_is_available,
'blocked_in_regis': blocked_in_regis,
'email_matches': email_matches
};
getTypeName() => "RegistrationAvailableResponse";
TypeContext? context = _ctx;
}
class RegistrationAvailableRequest implements IConvertible
{
String? reporting_term;
String? first_name;
String? last_name;
String? email;
DateTime? dob;
int? regent_id;
RegistrationAvailableRequest({this.reporting_term,this.first_name,this.last_name,this.email,this.dob,this.regent_id});
RegistrationAvailableRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
reporting_term = json['reporting_term'];
first_name = json['first_name'];
last_name = json['last_name'];
email = json['email'];
dob = JsonConverters.fromJson(json['dob'],'DateTime',context!);
regent_id = json['regent_id'];
return this;
}
Map<String, dynamic> toJson() => {
'reporting_term': reporting_term,
'first_name': first_name,
'last_name': last_name,
'email': email,
'dob': JsonConverters.toJson(dob,'DateTime',context!),
'regent_id': regent_id
};
getTypeName() => "RegistrationAvailableRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'RegistrationAvailableResponse': TypeInfo(TypeOf.Class, create:() => RegistrationAvailableResponse()),
'RegistrationAvailableRequest': TypeInfo(TypeOf.Class, create:() => RegistrationAvailableRequest()),
});
Dart RegistrationAvailableRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Registration/{reporting_term}/Available HTTP/1.1
Host: data.regent-college.edu
Accept: application/json
Content-Type: application/json
Content-Length: length
{"reporting_term":"String","first_name":"String","last_name":"String","email":"String","dob":"0001-01-01T00:00:00.0000000","regent_id":0}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"regent_id":0,"birthdate_exists":false,"birthdate_matches":false,"has_regent_login":false,"is_a_regis_person":false,"is_a_sugar_person":false,"term_is_available":false,"blocked_in_regis":false,"email_matches":false}