regis

<back to all web services

CRMDonationRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
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;
    }
}

PHP CRMDonationRequest DTOs

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

HTTP + JSV

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

{
	donation_id: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

[
	{
		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
	}
]