Required role: | REGISUserRole |
POST | /Academic/Institution/Create/FromOrganization/{organization_id} |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class InstitutionResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? institution_id;
String? institution_name;
String? institution_previous_names;
String? institution_other_names;
String? institution_type;
String? accreditation_status;
String? accreditation_status_notes;
List<String>? related_institutions;
DateTime? accreditation_status_changed_date;
String? gpa_conversion;
String? credit_hour_conversion;
String? addr1;
String? addr2;
String? city;
String? state;
String? country;
String? zip;
InstitutionResponse({this.responseStatus,this.institution_id,this.institution_name,this.institution_previous_names,this.institution_other_names,this.institution_type,this.accreditation_status,this.accreditation_status_notes,this.related_institutions,this.accreditation_status_changed_date,this.gpa_conversion,this.credit_hour_conversion,this.addr1,this.addr2,this.city,this.state,this.country,this.zip});
InstitutionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
institution_id = json['institution_id'];
institution_name = json['institution_name'];
institution_previous_names = json['institution_previous_names'];
institution_other_names = json['institution_other_names'];
institution_type = json['institution_type'];
accreditation_status = json['accreditation_status'];
accreditation_status_notes = json['accreditation_status_notes'];
related_institutions = JsonConverters.fromJson(json['related_institutions'],'List<String>',context!);
accreditation_status_changed_date = JsonConverters.fromJson(json['accreditation_status_changed_date'],'DateTime',context!);
gpa_conversion = json['gpa_conversion'];
credit_hour_conversion = json['credit_hour_conversion'];
addr1 = json['addr1'];
addr2 = json['addr2'];
city = json['city'];
state = json['state'];
country = json['country'];
zip = json['zip'];
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'institution_id': institution_id,
'institution_name': institution_name,
'institution_previous_names': institution_previous_names,
'institution_other_names': institution_other_names,
'institution_type': institution_type,
'accreditation_status': accreditation_status,
'accreditation_status_notes': accreditation_status_notes,
'related_institutions': JsonConverters.toJson(related_institutions,'List<String>',context!),
'accreditation_status_changed_date': JsonConverters.toJson(accreditation_status_changed_date,'DateTime',context!),
'gpa_conversion': gpa_conversion,
'credit_hour_conversion': credit_hour_conversion,
'addr1': addr1,
'addr2': addr2,
'city': city,
'state': state,
'country': country,
'zip': zip
};
getTypeName() => "InstitutionResponse";
TypeContext? context = _ctx;
}
class InstitutionCreateFromOrganizationRequest implements IConvertible
{
int? organization_id;
InstitutionCreateFromOrganizationRequest({this.organization_id});
InstitutionCreateFromOrganizationRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
organization_id = json['organization_id'];
return this;
}
Map<String, dynamic> toJson() => {
'organization_id': organization_id
};
getTypeName() => "InstitutionCreateFromOrganizationRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'InstitutionResponse': TypeInfo(TypeOf.Class, create:() => InstitutionResponse()),
'InstitutionCreateFromOrganizationRequest': TypeInfo(TypeOf.Class, create:() => InstitutionCreateFromOrganizationRequest()),
});
Dart InstitutionCreateFromOrganizationRequest 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 /Academic/Institution/Create/FromOrganization/{organization_id} HTTP/1.1
Host: data.regent-college.edu
Accept: application/json
Content-Type: application/json
Content-Length: length
{"organization_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"}},"institution_id":0,"institution_name":"String","institution_previous_names":"String","institution_other_names":"String","institution_type":"String","accreditation_status":"String","accreditation_status_notes":"String","related_institutions":["String"],"accreditation_status_changed_date":"0001-01-01T00:00:00.0000000","gpa_conversion":"String","credit_hour_conversion":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","zip":"String"}