regis

<back to all web services

CRMDonationUpsertRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/DynamicsCRM/Donation/Upsert
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class CRMDonationUpsertRequest implements IConvertible
{
    int? regent_id;
    int? soft_credit_regent_id;
    int? soft_credit_second_regent_id;
    int? import_id;
    bool? is_contact;
    bool? is_account;
    String? name;
    String? description;
    double? total_pledge_amount;
    double? receipt_amount;
    String? currency;
    String? receipting_organization;
    String? type;
    DateTime? gift_date;
    String? cheque_number;
    bool? do_not_receipt;
    bool? is_complete;
    bool? anonymous;
    String? gift_batch;
    String? source;
    String? channel;
    String? designation;
    String? designation_description;
    String? campaign;
    String? campaign_code;
    String? campaign_description;
    DateTime? campaign_start_date;
    DateTime? campaign_end_date;
    double? campaign_goal;
    String? appeal;
    String? appeal_code;
    String? appeal_description;
    DateTime? appeal_start_date;
    DateTime? appeal_end_date;
    double? appeal_goal;
    DateTime? added_date;

    CRMDonationUpsertRequest({this.regent_id,this.soft_credit_regent_id,this.soft_credit_second_regent_id,this.import_id,this.is_contact,this.is_account,this.name,this.description,this.total_pledge_amount,this.receipt_amount,this.currency,this.receipting_organization,this.type,this.gift_date,this.cheque_number,this.do_not_receipt,this.is_complete,this.anonymous,this.gift_batch,this.source,this.channel,this.designation,this.designation_description,this.campaign,this.campaign_code,this.campaign_description,this.campaign_start_date,this.campaign_end_date,this.campaign_goal,this.appeal,this.appeal_code,this.appeal_description,this.appeal_start_date,this.appeal_end_date,this.appeal_goal,this.added_date});
    CRMDonationUpsertRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        regent_id = json['regent_id'];
        soft_credit_regent_id = json['soft_credit_regent_id'];
        soft_credit_second_regent_id = json['soft_credit_second_regent_id'];
        import_id = json['import_id'];
        is_contact = json['is_contact'];
        is_account = json['is_account'];
        name = json['name'];
        description = json['description'];
        total_pledge_amount = JsonConverters.toDouble(json['total_pledge_amount']);
        receipt_amount = JsonConverters.toDouble(json['receipt_amount']);
        currency = json['currency'];
        receipting_organization = json['receipting_organization'];
        type = json['type'];
        gift_date = JsonConverters.fromJson(json['gift_date'],'DateTime',context!);
        cheque_number = json['cheque_number'];
        do_not_receipt = json['do_not_receipt'];
        is_complete = json['is_complete'];
        anonymous = json['anonymous'];
        gift_batch = json['gift_batch'];
        source = json['source'];
        channel = json['channel'];
        designation = json['designation'];
        designation_description = json['designation_description'];
        campaign = json['campaign'];
        campaign_code = json['campaign_code'];
        campaign_description = json['campaign_description'];
        campaign_start_date = JsonConverters.fromJson(json['campaign_start_date'],'DateTime',context!);
        campaign_end_date = JsonConverters.fromJson(json['campaign_end_date'],'DateTime',context!);
        campaign_goal = JsonConverters.toDouble(json['campaign_goal']);
        appeal = json['appeal'];
        appeal_code = json['appeal_code'];
        appeal_description = json['appeal_description'];
        appeal_start_date = JsonConverters.fromJson(json['appeal_start_date'],'DateTime',context!);
        appeal_end_date = JsonConverters.fromJson(json['appeal_end_date'],'DateTime',context!);
        appeal_goal = JsonConverters.toDouble(json['appeal_goal']);
        added_date = JsonConverters.fromJson(json['added_date'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'regent_id': regent_id,
        'soft_credit_regent_id': soft_credit_regent_id,
        'soft_credit_second_regent_id': soft_credit_second_regent_id,
        'import_id': import_id,
        'is_contact': is_contact,
        'is_account': is_account,
        'name': name,
        'description': description,
        'total_pledge_amount': total_pledge_amount,
        'receipt_amount': receipt_amount,
        'currency': currency,
        'receipting_organization': receipting_organization,
        'type': type,
        'gift_date': JsonConverters.toJson(gift_date,'DateTime',context!),
        'cheque_number': cheque_number,
        'do_not_receipt': do_not_receipt,
        'is_complete': is_complete,
        'anonymous': anonymous,
        'gift_batch': gift_batch,
        'source': source,
        'channel': channel,
        'designation': designation,
        'designation_description': designation_description,
        'campaign': campaign,
        'campaign_code': campaign_code,
        'campaign_description': campaign_description,
        'campaign_start_date': JsonConverters.toJson(campaign_start_date,'DateTime',context!),
        'campaign_end_date': JsonConverters.toJson(campaign_end_date,'DateTime',context!),
        'campaign_goal': campaign_goal,
        'appeal': appeal,
        'appeal_code': appeal_code,
        'appeal_description': appeal_description,
        'appeal_start_date': JsonConverters.toJson(appeal_start_date,'DateTime',context!),
        'appeal_end_date': JsonConverters.toJson(appeal_end_date,'DateTime',context!),
        'appeal_goal': appeal_goal,
        'added_date': JsonConverters.toJson(added_date,'DateTime',context!)
    };

    getTypeName() => "CRMDonationUpsertRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
    'CRMDonationUpsertRequest': TypeInfo(TypeOf.Class, create:() => CRMDonationUpsertRequest()),
});

Dart CRMDonationUpsertRequest 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/Donation/Upsert HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CRMDonationUpsertRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Requests">
  <added_date>0001-01-01T00:00:00</added_date>
  <anonymous>false</anonymous>
  <appeal>String</appeal>
  <appeal_code>String</appeal_code>
  <appeal_description>String</appeal_description>
  <appeal_end_date>0001-01-01T00:00:00</appeal_end_date>
  <appeal_goal>0</appeal_goal>
  <appeal_start_date>0001-01-01T00:00:00</appeal_start_date>
  <campaign>String</campaign>
  <campaign_code>String</campaign_code>
  <campaign_description>String</campaign_description>
  <campaign_end_date>0001-01-01T00:00:00</campaign_end_date>
  <campaign_goal>0</campaign_goal>
  <campaign_start_date>0001-01-01T00:00:00</campaign_start_date>
  <channel>String</channel>
  <cheque_number>String</cheque_number>
  <currency>String</currency>
  <description>String</description>
  <designation>String</designation>
  <designation_description>String</designation_description>
  <do_not_receipt>false</do_not_receipt>
  <gift_batch>String</gift_batch>
  <gift_date>0001-01-01T00:00:00</gift_date>
  <import_id>0</import_id>
  <is_account>false</is_account>
  <is_complete>false</is_complete>
  <is_contact>false</is_contact>
  <name>String</name>
  <receipt_amount>0</receipt_amount>
  <receipting_organization>String</receipting_organization>
  <regent_id>0</regent_id>
  <soft_credit_regent_id>0</soft_credit_regent_id>
  <soft_credit_second_regent_id>0</soft_credit_second_regent_id>
  <source>String</source>
  <total_pledge_amount>0</total_pledge_amount>
  <type>String</type>
</CRMDonationUpsertRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ErrorCode>String</ErrorCode>
  <Message>String</Message>
  <StackTrace>String</StackTrace>
  <Errors>
    <ResponseError>
      <ErrorCode>String</ErrorCode>
      <FieldName>String</FieldName>
      <Message>String</Message>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseError>
  </Errors>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
</ResponseStatus>