Required role: | REGISUserRole |
POST | /DynamicsCRM/DonationsLegacy |
---|
import Foundation
import ServiceStack
public class CRMDonationsLegacyRequest : Codable
{
required public init(){}
}
public class CRMDonationsResponse : Codable
{
public var responseStatus:ResponseStatus
public var donations:[CRMDonationResponse] = []
public var from_date:Date?
public var to_date:Date?
public var start_version_number:Int?
public var end_version_number:Int?
required public init(){}
}
public class CRMDonationResponse : Codable
{
public var regent_id:Int
public var contact_addressee:String
public var donor_first_name:String
public var donor_last_name:String
public var donor_addressee:String
public var donor_city:String
public var donor_country:String
public var donor_owner_full_name:String
public var is_contact:Bool
public var is_account:Bool
public var soft_credit_regent_id:Int?
public var soft_credit_contact_addressee:String
public var soft_credit_contact_first_name:String
public var soft_credit_contact_last_name:String
public var soft_credit_contact_spouse_is_main_contact:Bool
public var soft_credit_contact_city:String
public var soft_credit_contact_country:String
public var soft_credit_contact_owner_full_name:String
public var soft_credit_second_regent_id:String
public var soft_credit_second_contact_addressee:String
public var soft_credit_second_contact_first_name:String
public var soft_credit_second_contact_last_name:String
public var soft_credit_second_contact_spouse_is_main_contact:Bool
public var soft_credit_second_contact_city:String
public var soft_credit_second_contact_country:String
public var soft_credit_second_contact_owner_full_name:String
public var spouse_is_main_contact:Bool
public var import_id:Int?
public var donation_id:String
public var guid:String
public var name:String
public var Description:String
public var appeal_code:String
public var designation:String
public var designation_description:String
public var general_ledger_account_number:String
public var campaign:String
public var total_pledge_amount:Double
public var total_paid_amount:Double
public var receipt_amount:Double
public var exchange_rate:Double?
public var total_paid_canadian_amount:Double?
public var is_recurring:Bool
public var is_parent_donation:Bool
public var currency:String
public var source:String
public var channel:String
public var receipting_organization:String
public var type:String
public var acknowledgment_sent:Bool
public var send_acknowledgment:Bool
public var acknowledgment_template_guid:String
public var parent_guid:String
public var anonymous:Bool
public var gift_date:Date?
public var recurring_gift_start_date:Date?
public var recurring_gift_end_date:Date?
public var cheque_number:String
public var version_number:Int
public var added_date:Date?
required public init(){}
}
Swift 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 }