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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"regent_id":0,"soft_credit_regent_id":0,"soft_credit_second_regent_id":0,"import_id":0,"is_contact":false,"is_account":false,"name":"String","description":"String","total_pledge_amount":0,"receipt_amount":0,"currency":"String","receipting_organization":"String","type":"String","gift_date":"0001-01-01T00:00:00.0000000","cheque_number":"String","do_not_receipt":false,"is_complete":false,"anonymous":false,"gift_batch":"String","source":"String","channel":"String","designation":"String","designation_description":"String","campaign":"String","campaign_code":"String","campaign_description":"String","campaign_start_date":"0001-01-01T00:00:00.0000000","campaign_end_date":"0001-01-01T00:00:00.0000000","campaign_goal":0,"appeal":"String","appeal_code":"String","appeal_description":"String","appeal_start_date":"0001-01-01T00:00:00.0000000","appeal_end_date":"0001-01-01T00:00:00.0000000","appeal_goal":0,"added_date":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}