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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<TermStatementRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<authorizing_uuid>String</authorizing_uuid>
<reporting_term>String</reporting_term>
<uuid>String</uuid>
</TermStatementRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <TermStatementResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <academic_program>String</academic_program> <addr1>String</addr1> <addr2>String</addr2> <charges> <TermStatementChargesResponse> <charge>0</charge> <code>String</code> <date>0001-01-01T00:00:00</date> <description>String</description> <is_financial_aid>false</is_financial_aid> </TermStatementChargesResponse> </charges> <city>String</city> <code>String</code> <country>String</country> <name>String</name> <regent_id>0</regent_id> <registrations> <TermStatementRegistrationResponse> <amount>0</amount> <cost>0</cost> <course_name>String</course_name> <end_date>0001-01-01T00:00:00</end_date> <instructor>String</instructor> <is_audit>false</is_audit> <meeting_days>String</meeting_days> <room>String</room> <section_code>String</section_code> <start_date>0001-01-01T00:00:00</start_date> <status>String</status> <times>String</times> <title>String</title> </TermStatementRegistrationResponse> </registrations> <reporting_term>String</reporting_term> <reporting_term_end_date>0001-01-01T00:00:00</reporting_term_end_date> <reporting_term_start_date>0001-01-01T00:00:00</reporting_term_start_date> <state>String</state> <total_term_charges>0</total_term_charges> <total_term_payments>0</total_term_payments> <total_term_taxes>0</total_term_taxes> <uuid>String</uuid> </TermStatementResponse>