Required role: | REGISUserRole |
POST | /TermStatements/{uuid}/{reporting_term} |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class TermStatementRegistrationResponse implements IConvertible
{
String? course_name;
String? title;
String? section_code;
double? amount;
bool? is_audit;
String? meeting_days;
String? times;
String? room;
String? instructor;
String? status;
double? cost;
DateTime? start_date;
DateTime? end_date;
TermStatementRegistrationResponse({this.course_name,this.title,this.section_code,this.amount,this.is_audit,this.meeting_days,this.times,this.room,this.instructor,this.status,this.cost,this.start_date,this.end_date});
TermStatementRegistrationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
course_name = json['course_name'];
title = json['title'];
section_code = json['section_code'];
amount = JsonConverters.toDouble(json['amount']);
is_audit = json['is_audit'];
meeting_days = json['meeting_days'];
times = json['times'];
room = json['room'];
instructor = json['instructor'];
status = json['status'];
cost = JsonConverters.toDouble(json['cost']);
start_date = JsonConverters.fromJson(json['start_date'],'DateTime',context!);
end_date = JsonConverters.fromJson(json['end_date'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'course_name': course_name,
'title': title,
'section_code': section_code,
'amount': amount,
'is_audit': is_audit,
'meeting_days': meeting_days,
'times': times,
'room': room,
'instructor': instructor,
'status': status,
'cost': cost,
'start_date': JsonConverters.toJson(start_date,'DateTime',context!),
'end_date': JsonConverters.toJson(end_date,'DateTime',context!)
};
getTypeName() => "TermStatementRegistrationResponse";
TypeContext? context = _ctx;
}
class TermStatementChargesResponse implements IConvertible
{
DateTime? date;
String? code;
String? description;
bool? is_financial_aid;
double? charge;
TermStatementChargesResponse({this.date,this.code,this.description,this.is_financial_aid,this.charge});
TermStatementChargesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
date = JsonConverters.fromJson(json['date'],'DateTime',context!);
code = json['code'];
description = json['description'];
is_financial_aid = json['is_financial_aid'];
charge = JsonConverters.toDouble(json['charge']);
return this;
}
Map<String, dynamic> toJson() => {
'date': JsonConverters.toJson(date,'DateTime',context!),
'code': code,
'description': description,
'is_financial_aid': is_financial_aid,
'charge': charge
};
getTypeName() => "TermStatementChargesResponse";
TypeContext? context = _ctx;
}
class TermStatementResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? regent_id;
String? uuid;
String? name;
String? addr1;
String? addr2;
String? city;
String? state;
String? country;
String? code;
String? reporting_term;
DateTime? reporting_term_start_date;
DateTime? reporting_term_end_date;
String? academic_program;
double? total_term_payments;
double? total_term_charges;
double? total_term_taxes;
List<TermStatementRegistrationResponse>? registrations;
List<TermStatementChargesResponse>? charges;
TermStatementResponse({this.responseStatus,this.regent_id,this.uuid,this.name,this.addr1,this.addr2,this.city,this.state,this.country,this.code,this.reporting_term,this.reporting_term_start_date,this.reporting_term_end_date,this.academic_program,this.total_term_payments,this.total_term_charges,this.total_term_taxes,this.registrations,this.charges});
TermStatementResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
regent_id = json['regent_id'];
uuid = json['uuid'];
name = json['name'];
addr1 = json['addr1'];
addr2 = json['addr2'];
city = json['city'];
state = json['state'];
country = json['country'];
code = json['code'];
reporting_term = json['reporting_term'];
reporting_term_start_date = JsonConverters.fromJson(json['reporting_term_start_date'],'DateTime',context!);
reporting_term_end_date = JsonConverters.fromJson(json['reporting_term_end_date'],'DateTime',context!);
academic_program = json['academic_program'];
total_term_payments = JsonConverters.toDouble(json['total_term_payments']);
total_term_charges = JsonConverters.toDouble(json['total_term_charges']);
total_term_taxes = JsonConverters.toDouble(json['total_term_taxes']);
registrations = JsonConverters.fromJson(json['registrations'],'List<TermStatementRegistrationResponse>',context!);
charges = JsonConverters.fromJson(json['charges'],'List<TermStatementChargesResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'regent_id': regent_id,
'uuid': uuid,
'name': name,
'addr1': addr1,
'addr2': addr2,
'city': city,
'state': state,
'country': country,
'code': code,
'reporting_term': reporting_term,
'reporting_term_start_date': JsonConverters.toJson(reporting_term_start_date,'DateTime',context!),
'reporting_term_end_date': JsonConverters.toJson(reporting_term_end_date,'DateTime',context!),
'academic_program': academic_program,
'total_term_payments': total_term_payments,
'total_term_charges': total_term_charges,
'total_term_taxes': total_term_taxes,
'registrations': JsonConverters.toJson(registrations,'List<TermStatementRegistrationResponse>',context!),
'charges': JsonConverters.toJson(charges,'List<TermStatementChargesResponse>',context!)
};
getTypeName() => "TermStatementResponse";
TypeContext? context = _ctx;
}
class TermStatementRequest implements IConvertible
{
String? uuid;
String? reporting_term;
String? authorizing_uuid;
TermStatementRequest({this.uuid,this.reporting_term,this.authorizing_uuid});
TermStatementRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
uuid = json['uuid'];
reporting_term = json['reporting_term'];
authorizing_uuid = json['authorizing_uuid'];
return this;
}
Map<String, dynamic> toJson() => {
'uuid': uuid,
'reporting_term': reporting_term,
'authorizing_uuid': authorizing_uuid
};
getTypeName() => "TermStatementRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'TermStatementRegistrationResponse': TypeInfo(TypeOf.Class, create:() => TermStatementRegistrationResponse()),
'TermStatementChargesResponse': TypeInfo(TypeOf.Class, create:() => TermStatementChargesResponse()),
'TermStatementResponse': TypeInfo(TypeOf.Class, create:() => TermStatementResponse()),
'List<TermStatementRegistrationResponse>': TypeInfo(TypeOf.Class, create:() => <TermStatementRegistrationResponse>[]),
'List<TermStatementChargesResponse>': TypeInfo(TypeOf.Class, create:() => <TermStatementChargesResponse>[]),
'TermStatementRequest': TypeInfo(TypeOf.Class, create:() => TermStatementRequest()),
});
Dart TermStatementRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /TermStatements/{uuid}/{reporting_term} HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"uuid":"String","reporting_term":"String","authorizing_uuid":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl 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,"uuid":"String","name":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","code":"String","reporting_term":"String","reporting_term_start_date":"0001-01-01T00:00:00.0000000","reporting_term_end_date":"0001-01-01T00:00:00.0000000","academic_program":"String","total_term_payments":0,"total_term_charges":0,"total_term_taxes":0,"registrations":[{"course_name":"String","title":"String","section_code":"String","amount":0,"is_audit":false,"meeting_days":"String","times":"String","room":"String","instructor":"String","status":"String","cost":0,"start_date":"0001-01-01T00:00:00.0000000","end_date":"0001-01-01T00:00:00.0000000"}],"charges":[{"date":"0001-01-01T00:00:00.0000000","code":"String","description":"String","is_financial_aid":false,"charge":0}]}