Required role: | REGISUserRole |
POST | /DynamicsCRM/PaymentsDatamart | ||
---|---|---|---|
POST | /DynamicsCRM/PaymentsDatamart/{regent_id} |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CRMPaymentDatamartResponse implements IConvertible
{
String? guid;
int? regent_id;
String? addressee;
int? soft_credit_regent_id;
int? second_soft_credit_regent_id;
String? donation_id;
String? designation;
String? pretty_designation;
double? pledged;
double? paid;
double? paid_canadian;
DateTime? payment_date;
CRMPaymentDatamartResponse({this.guid,this.regent_id,this.addressee,this.soft_credit_regent_id,this.second_soft_credit_regent_id,this.donation_id,this.designation,this.pretty_designation,this.pledged,this.paid,this.paid_canadian,this.payment_date});
CRMPaymentDatamartResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
guid = json['guid'];
regent_id = json['regent_id'];
addressee = json['addressee'];
soft_credit_regent_id = json['soft_credit_regent_id'];
second_soft_credit_regent_id = json['second_soft_credit_regent_id'];
donation_id = json['donation_id'];
designation = json['designation'];
pretty_designation = json['pretty_designation'];
pledged = JsonConverters.toDouble(json['pledged']);
paid = JsonConverters.toDouble(json['paid']);
paid_canadian = JsonConverters.toDouble(json['paid_canadian']);
payment_date = JsonConverters.fromJson(json['payment_date'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'guid': guid,
'regent_id': regent_id,
'addressee': addressee,
'soft_credit_regent_id': soft_credit_regent_id,
'second_soft_credit_regent_id': second_soft_credit_regent_id,
'donation_id': donation_id,
'designation': designation,
'pretty_designation': pretty_designation,
'pledged': pledged,
'paid': paid,
'paid_canadian': paid_canadian,
'payment_date': JsonConverters.toJson(payment_date,'DateTime',context!)
};
getTypeName() => "CRMPaymentDatamartResponse";
TypeContext? context = _ctx;
}
class CRMPaymentsDatamartResponse implements IConvertible
{
List<CRMPaymentDatamartResponse>? personal_payments;
List<CRMPaymentDatamartResponse>? other_payments;
CRMPaymentsDatamartResponse({this.personal_payments,this.other_payments});
CRMPaymentsDatamartResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
personal_payments = JsonConverters.fromJson(json['personal_payments'],'List<CRMPaymentDatamartResponse>',context!);
other_payments = JsonConverters.fromJson(json['other_payments'],'List<CRMPaymentDatamartResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'personal_payments': JsonConverters.toJson(personal_payments,'List<CRMPaymentDatamartResponse>',context!),
'other_payments': JsonConverters.toJson(other_payments,'List<CRMPaymentDatamartResponse>',context!)
};
getTypeName() => "CRMPaymentsDatamartResponse";
TypeContext? context = _ctx;
}
class CRMPaymentsDatamartRequest implements IConvertible
{
int? regent_id;
CRMPaymentsDatamartRequest({this.regent_id});
CRMPaymentsDatamartRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
regent_id = json['regent_id'];
return this;
}
Map<String, dynamic> toJson() => {
'regent_id': regent_id
};
getTypeName() => "CRMPaymentsDatamartRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'CRMPaymentDatamartResponse': TypeInfo(TypeOf.Class, create:() => CRMPaymentDatamartResponse()),
'CRMPaymentsDatamartResponse': TypeInfo(TypeOf.Class, create:() => CRMPaymentsDatamartResponse()),
'List<CRMPaymentDatamartResponse>': TypeInfo(TypeOf.Class, create:() => <CRMPaymentDatamartResponse>[]),
'CRMPaymentsDatamartRequest': TypeInfo(TypeOf.Class, create:() => CRMPaymentsDatamartRequest()),
});
Dart CRMPaymentsDatamartRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DynamicsCRM/PaymentsDatamart HTTP/1.1
Host: data.regent-college.edu
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"regent_id":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"personal_payments":[{"guid":"String","regent_id":0,"addressee":"String","soft_credit_regent_id":0,"second_soft_credit_regent_id":0,"donation_id":"String","designation":"String","pretty_designation":"String","pledged":0,"paid":0,"paid_canadian":0,"payment_date":"0001-01-01T00:00:00.0000000"}],"other_payments":[{"guid":"String","regent_id":0,"addressee":"String","soft_credit_regent_id":0,"second_soft_credit_regent_id":0,"donation_id":"String","designation":"String","pretty_designation":"String","pledged":0,"paid":0,"paid_canadian":0,"payment_date":"0001-01-01T00:00:00.0000000"}]}