Required role: | REGISUserRole |
POST | /Finance/{uuid}/Adjustment/{reporting_term} |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class InvoiceItemBalanceResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? rate_id;
String? rate_code;
String? rate_description;
double? balance_amount;
double? charge_amount;
double? credit_amount;
InvoiceItemBalanceResponse({this.responseStatus,this.rate_id,this.rate_code,this.rate_description,this.balance_amount,this.charge_amount,this.credit_amount});
InvoiceItemBalanceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
rate_id = json['rate_id'];
rate_code = json['rate_code'];
rate_description = json['rate_description'];
balance_amount = JsonConverters.toDouble(json['balance_amount']);
charge_amount = JsonConverters.toDouble(json['charge_amount']);
credit_amount = JsonConverters.toDouble(json['credit_amount']);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'rate_id': rate_id,
'rate_code': rate_code,
'rate_description': rate_description,
'balance_amount': balance_amount,
'charge_amount': charge_amount,
'credit_amount': credit_amount
};
getTypeName() => "InvoiceItemBalanceResponse";
TypeContext? context = _ctx;
}
class InvoiceItemAdminResponse implements IConvertible
{
ResponseStatus? responseStatus;
String? invoiceItemUUID;
int? rate_id;
String? rate_code;
String? rate_description;
bool? is_required;
bool? is_optional;
double? charge;
double? credit;
InvoiceItemAdminResponse({this.responseStatus,this.invoiceItemUUID,this.rate_id,this.rate_code,this.rate_description,this.is_required,this.is_optional,this.charge,this.credit});
InvoiceItemAdminResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
invoiceItemUUID = json['invoiceItemUUID'];
rate_id = json['rate_id'];
rate_code = json['rate_code'];
rate_description = json['rate_description'];
is_required = json['is_required'];
is_optional = json['is_optional'];
charge = JsonConverters.toDouble(json['charge']);
credit = JsonConverters.toDouble(json['credit']);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'invoiceItemUUID': invoiceItemUUID,
'rate_id': rate_id,
'rate_code': rate_code,
'rate_description': rate_description,
'is_required': is_required,
'is_optional': is_optional,
'charge': charge,
'credit': credit
};
getTypeName() => "InvoiceItemAdminResponse";
TypeContext? context = _ctx;
}
class FinanceAdjustmentResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? regent_id;
String? uuid;
String? reporting_term;
DateTime? openFiscalDate;
List<InvoiceItemBalanceResponse>? invoiceItemBalances;
List<InvoiceItemAdminResponse>? availableInvoiceItems;
FinanceAdjustmentResponse({this.responseStatus,this.regent_id,this.uuid,this.reporting_term,this.openFiscalDate,this.invoiceItemBalances,this.availableInvoiceItems});
FinanceAdjustmentResponse.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'];
reporting_term = json['reporting_term'];
openFiscalDate = JsonConverters.fromJson(json['openFiscalDate'],'DateTime',context!);
invoiceItemBalances = JsonConverters.fromJson(json['invoiceItemBalances'],'List<InvoiceItemBalanceResponse>',context!);
availableInvoiceItems = JsonConverters.fromJson(json['availableInvoiceItems'],'List<InvoiceItemAdminResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'regent_id': regent_id,
'uuid': uuid,
'reporting_term': reporting_term,
'openFiscalDate': JsonConverters.toJson(openFiscalDate,'DateTime',context!),
'invoiceItemBalances': JsonConverters.toJson(invoiceItemBalances,'List<InvoiceItemBalanceResponse>',context!),
'availableInvoiceItems': JsonConverters.toJson(availableInvoiceItems,'List<InvoiceItemAdminResponse>',context!)
};
getTypeName() => "FinanceAdjustmentResponse";
TypeContext? context = _ctx;
}
class FinanceAdjustmentRequest implements IConvertible
{
String? uuid;
String? reporting_term;
bool? is_financial_aid;
String? authorizing_uuid;
FinanceAdjustmentRequest({this.uuid,this.reporting_term,this.is_financial_aid,this.authorizing_uuid});
FinanceAdjustmentRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
uuid = json['uuid'];
reporting_term = json['reporting_term'];
is_financial_aid = json['is_financial_aid'];
authorizing_uuid = json['authorizing_uuid'];
return this;
}
Map<String, dynamic> toJson() => {
'uuid': uuid,
'reporting_term': reporting_term,
'is_financial_aid': is_financial_aid,
'authorizing_uuid': authorizing_uuid
};
getTypeName() => "FinanceAdjustmentRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'InvoiceItemBalanceResponse': TypeInfo(TypeOf.Class, create:() => InvoiceItemBalanceResponse()),
'InvoiceItemAdminResponse': TypeInfo(TypeOf.Class, create:() => InvoiceItemAdminResponse()),
'FinanceAdjustmentResponse': TypeInfo(TypeOf.Class, create:() => FinanceAdjustmentResponse()),
'List<InvoiceItemBalanceResponse>': TypeInfo(TypeOf.Class, create:() => <InvoiceItemBalanceResponse>[]),
'List<InvoiceItemAdminResponse>': TypeInfo(TypeOf.Class, create:() => <InvoiceItemAdminResponse>[]),
'FinanceAdjustmentRequest': TypeInfo(TypeOf.Class, create:() => FinanceAdjustmentRequest()),
});
Dart FinanceAdjustmentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Finance/{uuid}/Adjustment/{reporting_term} HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
uuid: String,
reporting_term: String,
is_financial_aid: False,
authorizing_uuid: String
}
HTTP/1.1 200 OK Content-Type: text/jsv 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, reporting_term: String, openFiscalDate: 0001-01-01, invoiceItemBalances: [ { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } }, rate_id: 0, rate_code: String, rate_description: String, balance_amount: 0, charge_amount: 0, credit_amount: 0 } ], availableInvoiceItems: [ { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } }, invoiceItemUUID: String, rate_id: 0, rate_code: String, rate_description: String, is_required: False, is_optional: False, charge: 0, credit: 0 } ] }