regis

<back to all web services

InstitutionRelationshipsUpdateRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Academic/Institution/{institution_id}/UpdateRelationships
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class InstitutionRelationshipRequest implements IConvertible
{
    int? related_institution_id;
    String? relationship_type;
    String? notes;

    InstitutionRelationshipRequest({this.related_institution_id,this.relationship_type,this.notes});
    InstitutionRelationshipRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        related_institution_id = json['related_institution_id'];
        relationship_type = json['relationship_type'];
        notes = json['notes'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'related_institution_id': related_institution_id,
        'relationship_type': relationship_type,
        'notes': notes
    };

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

class InstitutionRelationshipsUpdateRequest implements IConvertible
{
    int? institution_id;
    List<InstitutionRelationshipRequest>? related_institutions;
    String? authorizing_uuid;

    InstitutionRelationshipsUpdateRequest({this.institution_id,this.related_institutions,this.authorizing_uuid});
    InstitutionRelationshipsUpdateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        institution_id = json['institution_id'];
        related_institutions = JsonConverters.fromJson(json['related_institutions'],'List<InstitutionRelationshipRequest>',context!);
        authorizing_uuid = json['authorizing_uuid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'institution_id': institution_id,
        'related_institutions': JsonConverters.toJson(related_institutions,'List<InstitutionRelationshipRequest>',context!),
        'authorizing_uuid': authorizing_uuid
    };

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

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

Dart InstitutionRelationshipsUpdateRequest 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 /Academic/Institution/{institution_id}/UpdateRelationships HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	institution_id: 0,
	related_institutions: 
	[
		{
			related_institution_id: 0,
			relationship_type: String,
			notes: String
		}
	],
	authorizing_uuid: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	errorCode: String,
	message: String,
	stackTrace: String,
	errors: 
	[
		{
			errorCode: String,
			fieldName: String,
			message: String,
			meta: 
			{
				String: String
			}
		}
	],
	meta: 
	{
		String: String
	}
}