regis

<back to all web services

CRMDonationsRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/DynamicsCRM/Donations
POST/DynamicsCRM/Donations/{regent_id}
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 CRMDonationsRequest implements IConvertible
{
    int? regent_id;
    DateTime? from_date;
    DateTime? to_date;
    int? start_version_number;
    int? end_version_number;
    bool? is_missing_acknowledgement;
    bool? has_acknowledgement_letter;

    CRMDonationsRequest({this.regent_id,this.from_date,this.to_date,this.start_version_number,this.end_version_number,this.is_missing_acknowledgement,this.has_acknowledgement_letter});
    CRMDonationsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        regent_id = json['regent_id'];
        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'];
        is_missing_acknowledgement = json['is_missing_acknowledgement'];
        has_acknowledgement_letter = json['has_acknowledgement_letter'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'regent_id': regent_id,
        '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,
        'is_missing_acknowledgement': is_missing_acknowledgement,
        'has_acknowledgement_letter': has_acknowledgement_letter
    };

    getTypeName() => "CRMDonationsRequest";
    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>[]),
    'CRMDonationsRequest': TypeInfo(TypeOf.Class, create:() => CRMDonationsRequest()),
});

Dart CRMDonationsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /DynamicsCRM/Donations HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CRMDonationsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Requests">
  <end_version_number>0</end_version_number>
  <from_date>0001-01-01T00:00:00</from_date>
  <has_acknowledgement_letter>false</has_acknowledgement_letter>
  <is_missing_acknowledgement>false</is_missing_acknowledgement>
  <regent_id>0</regent_id>
  <start_version_number>0</start_version_number>
  <to_date>0001-01-01T00:00:00</to_date>
</CRMDonationsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CRMDonationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.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>
  <donations>
    <CRMDonationResponse>
      <acknowledgment_sent>false</acknowledgment_sent>
      <acknowledgment_template_guid>String</acknowledgment_template_guid>
      <added_date>0001-01-01T00:00:00</added_date>
      <anonymous>false</anonymous>
      <appeal_code>String</appeal_code>
      <campaign>String</campaign>
      <channel>String</channel>
      <cheque_number>String</cheque_number>
      <contact_addressee>String</contact_addressee>
      <currency>String</currency>
      <description>String</description>
      <designation>String</designation>
      <designation_description>String</designation_description>
      <donation_id>String</donation_id>
      <donor_addressee>String</donor_addressee>
      <donor_city>String</donor_city>
      <donor_country>String</donor_country>
      <donor_first_name>String</donor_first_name>
      <donor_last_name>String</donor_last_name>
      <donor_owner_full_name>String</donor_owner_full_name>
      <exchange_rate>0</exchange_rate>
      <general_ledger_account_number>String</general_ledger_account_number>
      <gift_date>0001-01-01T00:00:00</gift_date>
      <guid>String</guid>
      <import_id>0</import_id>
      <is_account>false</is_account>
      <is_contact>false</is_contact>
      <is_parent_donation>false</is_parent_donation>
      <is_recurring>false</is_recurring>
      <name>String</name>
      <parent_guid>String</parent_guid>
      <receipt_amount>0</receipt_amount>
      <receipting_organization>String</receipting_organization>
      <recurring_gift_end_date>0001-01-01T00:00:00</recurring_gift_end_date>
      <recurring_gift_start_date>0001-01-01T00:00:00</recurring_gift_start_date>
      <regent_id>0</regent_id>
      <send_acknowledgment>false</send_acknowledgment>
      <soft_credit_contact_addressee>String</soft_credit_contact_addressee>
      <soft_credit_contact_city>String</soft_credit_contact_city>
      <soft_credit_contact_country>String</soft_credit_contact_country>
      <soft_credit_contact_first_name>String</soft_credit_contact_first_name>
      <soft_credit_contact_last_name>String</soft_credit_contact_last_name>
      <soft_credit_contact_owner_full_name>String</soft_credit_contact_owner_full_name>
      <soft_credit_contact_spouse_is_main_contact>false</soft_credit_contact_spouse_is_main_contact>
      <soft_credit_regent_id>0</soft_credit_regent_id>
      <soft_credit_second_contact_addressee>String</soft_credit_second_contact_addressee>
      <soft_credit_second_contact_city>String</soft_credit_second_contact_city>
      <soft_credit_second_contact_country>String</soft_credit_second_contact_country>
      <soft_credit_second_contact_first_name>String</soft_credit_second_contact_first_name>
      <soft_credit_second_contact_last_name>String</soft_credit_second_contact_last_name>
      <soft_credit_second_contact_owner_full_name>String</soft_credit_second_contact_owner_full_name>
      <soft_credit_second_contact_spouse_is_main_contact>false</soft_credit_second_contact_spouse_is_main_contact>
      <soft_credit_second_regent_id>String</soft_credit_second_regent_id>
      <source>String</source>
      <spouse_is_main_contact>false</spouse_is_main_contact>
      <total_paid_amount>0</total_paid_amount>
      <total_paid_canadian_amount>0</total_paid_canadian_amount>
      <total_pledge_amount>0</total_pledge_amount>
      <type>String</type>
      <version_number>0</version_number>
    </CRMDonationResponse>
  </donations>
  <end_version_number>0</end_version_number>
  <from_date>0001-01-01T00:00:00</from_date>
  <start_version_number>0</start_version_number>
  <to_date>0001-01-01T00:00:00</to_date>
</CRMDonationsResponse>