Required role: | REGISUserRole |
POST | /DynamicsCRM/DonationsLegacy |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CRMDonationResponse implements IConvertible
{
int? regent_id;
String? contact_addressee;
String? donor_first_name;
String? donor_last_name;
String? donor_addressee;
String? donor_city;
String? donor_country;
String? donor_owner_full_name;
bool? is_contact;
bool? is_account;
int? soft_credit_regent_id;
String? soft_credit_contact_addressee;
String? soft_credit_contact_first_name;
String? soft_credit_contact_last_name;
bool? soft_credit_contact_spouse_is_main_contact;
String? soft_credit_contact_city;
String? soft_credit_contact_country;
String? soft_credit_contact_owner_full_name;
String? soft_credit_second_regent_id;
String? soft_credit_second_contact_addressee;
String? soft_credit_second_contact_first_name;
String? soft_credit_second_contact_last_name;
bool? soft_credit_second_contact_spouse_is_main_contact;
String? soft_credit_second_contact_city;
String? soft_credit_second_contact_country;
String? soft_credit_second_contact_owner_full_name;
bool? spouse_is_main_contact;
int? import_id;
String? donation_id;
String? guid;
String? name;
String? description;
String? appeal_code;
String? designation;
String? designation_description;
String? general_ledger_account_number;
String? campaign;
double? total_pledge_amount;
double? total_paid_amount;
double? receipt_amount;
double? exchange_rate;
double? total_paid_canadian_amount;
bool? is_recurring;
bool? is_parent_donation;
String? currency;
String? source;
String? channel;
String? receipting_organization;
String? type;
bool? acknowledgment_sent;
bool? send_acknowledgment;
String? acknowledgment_template_guid;
String? parent_guid;
bool? anonymous;
DateTime? gift_date;
DateTime? recurring_gift_start_date;
DateTime? recurring_gift_end_date;
String? cheque_number;
int? version_number;
DateTime? added_date;
CRMDonationResponse({this.regent_id,this.contact_addressee,this.donor_first_name,this.donor_last_name,this.donor_addressee,this.donor_city,this.donor_country,this.donor_owner_full_name,this.is_contact,this.is_account,this.soft_credit_regent_id,this.soft_credit_contact_addressee,this.soft_credit_contact_first_name,this.soft_credit_contact_last_name,this.soft_credit_contact_spouse_is_main_contact,this.soft_credit_contact_city,this.soft_credit_contact_country,this.soft_credit_contact_owner_full_name,this.soft_credit_second_regent_id,this.soft_credit_second_contact_addressee,this.soft_credit_second_contact_first_name,this.soft_credit_second_contact_last_name,this.soft_credit_second_contact_spouse_is_main_contact,this.soft_credit_second_contact_city,this.soft_credit_second_contact_country,this.soft_credit_second_contact_owner_full_name,this.spouse_is_main_contact,this.import_id,this.donation_id,this.guid,this.name,this.description,this.appeal_code,this.designation,this.designation_description,this.general_ledger_account_number,this.campaign,this.total_pledge_amount,this.total_paid_amount,this.receipt_amount,this.exchange_rate,this.total_paid_canadian_amount,this.is_recurring,this.is_parent_donation,this.currency,this.source,this.channel,this.receipting_organization,this.type,this.acknowledgment_sent,this.send_acknowledgment,this.acknowledgment_template_guid,this.parent_guid,this.anonymous,this.gift_date,this.recurring_gift_start_date,this.recurring_gift_end_date,this.cheque_number,this.version_number,this.added_date});
CRMDonationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
regent_id = json['regent_id'];
contact_addressee = json['contact_addressee'];
donor_first_name = json['donor_first_name'];
donor_last_name = json['donor_last_name'];
donor_addressee = json['donor_addressee'];
donor_city = json['donor_city'];
donor_country = json['donor_country'];
donor_owner_full_name = json['donor_owner_full_name'];
is_contact = json['is_contact'];
is_account = json['is_account'];
soft_credit_regent_id = json['soft_credit_regent_id'];
soft_credit_contact_addressee = json['soft_credit_contact_addressee'];
soft_credit_contact_first_name = json['soft_credit_contact_first_name'];
soft_credit_contact_last_name = json['soft_credit_contact_last_name'];
soft_credit_contact_spouse_is_main_contact = json['soft_credit_contact_spouse_is_main_contact'];
soft_credit_contact_city = json['soft_credit_contact_city'];
soft_credit_contact_country = json['soft_credit_contact_country'];
soft_credit_contact_owner_full_name = json['soft_credit_contact_owner_full_name'];
soft_credit_second_regent_id = json['soft_credit_second_regent_id'];
soft_credit_second_contact_addressee = json['soft_credit_second_contact_addressee'];
soft_credit_second_contact_first_name = json['soft_credit_second_contact_first_name'];
soft_credit_second_contact_last_name = json['soft_credit_second_contact_last_name'];
soft_credit_second_contact_spouse_is_main_contact = json['soft_credit_second_contact_spouse_is_main_contact'];
soft_credit_second_contact_city = json['soft_credit_second_contact_city'];
soft_credit_second_contact_country = json['soft_credit_second_contact_country'];
soft_credit_second_contact_owner_full_name = json['soft_credit_second_contact_owner_full_name'];
spouse_is_main_contact = json['spouse_is_main_contact'];
import_id = json['import_id'];
donation_id = json['donation_id'];
guid = json['guid'];
name = json['name'];
description = json['description'];
appeal_code = json['appeal_code'];
designation = json['designation'];
designation_description = json['designation_description'];
general_ledger_account_number = json['general_ledger_account_number'];
campaign = json['campaign'];
total_pledge_amount = JsonConverters.toDouble(json['total_pledge_amount']);
total_paid_amount = JsonConverters.toDouble(json['total_paid_amount']);
receipt_amount = JsonConverters.toDouble(json['receipt_amount']);
exchange_rate = JsonConverters.toDouble(json['exchange_rate']);
total_paid_canadian_amount = JsonConverters.toDouble(json['total_paid_canadian_amount']);
is_recurring = json['is_recurring'];
is_parent_donation = json['is_parent_donation'];
currency = json['currency'];
source = json['source'];
channel = json['channel'];
receipting_organization = json['receipting_organization'];
type = json['type'];
acknowledgment_sent = json['acknowledgment_sent'];
send_acknowledgment = json['send_acknowledgment'];
acknowledgment_template_guid = json['acknowledgment_template_guid'];
parent_guid = json['parent_guid'];
anonymous = json['anonymous'];
gift_date = JsonConverters.fromJson(json['gift_date'],'DateTime',context!);
recurring_gift_start_date = JsonConverters.fromJson(json['recurring_gift_start_date'],'DateTime',context!);
recurring_gift_end_date = JsonConverters.fromJson(json['recurring_gift_end_date'],'DateTime',context!);
cheque_number = json['cheque_number'];
version_number = json['version_number'];
added_date = JsonConverters.fromJson(json['added_date'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'regent_id': regent_id,
'contact_addressee': contact_addressee,
'donor_first_name': donor_first_name,
'donor_last_name': donor_last_name,
'donor_addressee': donor_addressee,
'donor_city': donor_city,
'donor_country': donor_country,
'donor_owner_full_name': donor_owner_full_name,
'is_contact': is_contact,
'is_account': is_account,
'soft_credit_regent_id': soft_credit_regent_id,
'soft_credit_contact_addressee': soft_credit_contact_addressee,
'soft_credit_contact_first_name': soft_credit_contact_first_name,
'soft_credit_contact_last_name': soft_credit_contact_last_name,
'soft_credit_contact_spouse_is_main_contact': soft_credit_contact_spouse_is_main_contact,
'soft_credit_contact_city': soft_credit_contact_city,
'soft_credit_contact_country': soft_credit_contact_country,
'soft_credit_contact_owner_full_name': soft_credit_contact_owner_full_name,
'soft_credit_second_regent_id': soft_credit_second_regent_id,
'soft_credit_second_contact_addressee': soft_credit_second_contact_addressee,
'soft_credit_second_contact_first_name': soft_credit_second_contact_first_name,
'soft_credit_second_contact_last_name': soft_credit_second_contact_last_name,
'soft_credit_second_contact_spouse_is_main_contact': soft_credit_second_contact_spouse_is_main_contact,
'soft_credit_second_contact_city': soft_credit_second_contact_city,
'soft_credit_second_contact_country': soft_credit_second_contact_country,
'soft_credit_second_contact_owner_full_name': soft_credit_second_contact_owner_full_name,
'spouse_is_main_contact': spouse_is_main_contact,
'import_id': import_id,
'donation_id': donation_id,
'guid': guid,
'name': name,
'description': description,
'appeal_code': appeal_code,
'designation': designation,
'designation_description': designation_description,
'general_ledger_account_number': general_ledger_account_number,
'campaign': campaign,
'total_pledge_amount': total_pledge_amount,
'total_paid_amount': total_paid_amount,
'receipt_amount': receipt_amount,
'exchange_rate': exchange_rate,
'total_paid_canadian_amount': total_paid_canadian_amount,
'is_recurring': is_recurring,
'is_parent_donation': is_parent_donation,
'currency': currency,
'source': source,
'channel': channel,
'receipting_organization': receipting_organization,
'type': type,
'acknowledgment_sent': acknowledgment_sent,
'send_acknowledgment': send_acknowledgment,
'acknowledgment_template_guid': acknowledgment_template_guid,
'parent_guid': parent_guid,
'anonymous': anonymous,
'gift_date': JsonConverters.toJson(gift_date,'DateTime',context!),
'recurring_gift_start_date': JsonConverters.toJson(recurring_gift_start_date,'DateTime',context!),
'recurring_gift_end_date': JsonConverters.toJson(recurring_gift_end_date,'DateTime',context!),
'cheque_number': cheque_number,
'version_number': version_number,
'added_date': JsonConverters.toJson(added_date,'DateTime',context!)
};
getTypeName() => "CRMDonationResponse";
TypeContext? context = _ctx;
}
class CRMDonationsResponse implements IConvertible
{
ResponseStatus? responseStatus;
List<CRMDonationResponse>? donations;
DateTime? from_date;
DateTime? to_date;
int? start_version_number;
int? end_version_number;
CRMDonationsResponse({this.responseStatus,this.donations,this.from_date,this.to_date,this.start_version_number,this.end_version_number});
CRMDonationsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
donations = JsonConverters.fromJson(json['donations'],'List<CRMDonationResponse>',context!);
from_date = JsonConverters.fromJson(json['from_date'],'DateTime',context!);
to_date = JsonConverters.fromJson(json['to_date'],'DateTime',context!);
start_version_number = json['start_version_number'];
end_version_number = json['end_version_number'];
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'donations': JsonConverters.toJson(donations,'List<CRMDonationResponse>',context!),
'from_date': JsonConverters.toJson(from_date,'DateTime',context!),
'to_date': JsonConverters.toJson(to_date,'DateTime',context!),
'start_version_number': start_version_number,
'end_version_number': end_version_number
};
getTypeName() => "CRMDonationsResponse";
TypeContext? context = _ctx;
}
class CRMDonationsLegacyRequest implements IConvertible
{
CRMDonationsLegacyRequest();
CRMDonationsLegacyRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "CRMDonationsLegacyRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'CRMDonationResponse': TypeInfo(TypeOf.Class, create:() => CRMDonationResponse()),
'CRMDonationsResponse': TypeInfo(TypeOf.Class, create:() => CRMDonationsResponse()),
'List<CRMDonationResponse>': TypeInfo(TypeOf.Class, create:() => <CRMDonationResponse>[]),
'CRMDonationsLegacyRequest': TypeInfo(TypeOf.Class, create:() => CRMDonationsLegacyRequest()),
});
Dart CRMDonationsLegacyRequest 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 /DynamicsCRM/DonationsLegacy HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
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 } }, donations: [ { regent_id: 0, contact_addressee: String, donor_first_name: String, donor_last_name: String, donor_addressee: String, donor_city: String, donor_country: String, donor_owner_full_name: String, is_contact: False, is_account: False, soft_credit_regent_id: 0, soft_credit_contact_addressee: String, soft_credit_contact_first_name: String, soft_credit_contact_last_name: String, soft_credit_contact_spouse_is_main_contact: False, soft_credit_contact_city: String, soft_credit_contact_country: String, soft_credit_contact_owner_full_name: String, soft_credit_second_regent_id: String, soft_credit_second_contact_addressee: String, soft_credit_second_contact_first_name: String, soft_credit_second_contact_last_name: String, soft_credit_second_contact_spouse_is_main_contact: False, soft_credit_second_contact_city: String, soft_credit_second_contact_country: String, soft_credit_second_contact_owner_full_name: String, spouse_is_main_contact: False, import_id: 0, donation_id: String, guid: String, name: String, description: String, appeal_code: String, designation: String, designation_description: String, general_ledger_account_number: String, campaign: String, total_pledge_amount: 0, total_paid_amount: 0, receipt_amount: 0, exchange_rate: 0, total_paid_canadian_amount: 0, is_recurring: False, is_parent_donation: False, currency: String, source: String, channel: String, receipting_organization: String, type: String, acknowledgment_sent: False, send_acknowledgment: False, acknowledgment_template_guid: String, parent_guid: String, anonymous: False, gift_date: 0001-01-01, recurring_gift_start_date: 0001-01-01, recurring_gift_end_date: 0001-01-01, cheque_number: String, version_number: 0, added_date: 0001-01-01 } ], from_date: 0001-01-01, to_date: 0001-01-01, start_version_number: 0, end_version_number: 0 }