| Required role: | REGISUserRole |
| POST | /DynamicsCRM/Donation/{donation_id} |
|---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class CRMDonationRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $donation_id=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['donation_id'])) $this->donation_id = $o['donation_id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->donation_id)) $o['donation_id'] = $this->donation_id;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DynamicsCRM/Donation/{donation_id} HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CRMDonationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Requests">
<donation_id>String</donation_id>
</CRMDonationRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ArrayOfCRMDonationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Responses">
<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>
</ArrayOfCRMDonationResponse>