Required role: | REGISUserRole |
POST | /DynamicsCRM/Payments |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CRMPaymentsRequest
{
public Date from_date = null;
public Date to_date = null;
public Integer regent_id = null;
public Integer start_version_number = null;
public Integer end_version_number = null;
public Boolean recurring_only = null;
public Boolean completed_only = null;
public Date getFromDate() { return from_date; }
public CRMPaymentsRequest setFromDate(Date value) { this.from_date = value; return this; }
public Date getToDate() { return to_date; }
public CRMPaymentsRequest setToDate(Date value) { this.to_date = value; return this; }
public Integer getRegentId() { return regent_id; }
public CRMPaymentsRequest setRegentId(Integer value) { this.regent_id = value; return this; }
public Integer getStartVersionNumber() { return start_version_number; }
public CRMPaymentsRequest setStartVersionNumber(Integer value) { this.start_version_number = value; return this; }
public Integer getEndVersionNumber() { return end_version_number; }
public CRMPaymentsRequest setEndVersionNumber(Integer value) { this.end_version_number = value; return this; }
public Boolean isRecurringOnly() { return recurring_only; }
public CRMPaymentsRequest setRecurringOnly(Boolean value) { this.recurring_only = value; return this; }
public Boolean isCompletedOnly() { return completed_only; }
public CRMPaymentsRequest setCompletedOnly(Boolean value) { this.completed_only = value; return this; }
}
public static class CRMPaymentsResponse
{
public ResponseStatus responseStatus = null;
public ArrayList<CRMPaymentResponse> payments = null;
public Date from_date = null;
public Date to_date = null;
public Integer start_version_number = null;
public Integer end_version_number = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public CRMPaymentsResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
public ArrayList<CRMPaymentResponse> getPayments() { return payments; }
public CRMPaymentsResponse setPayments(ArrayList<CRMPaymentResponse> value) { this.payments = value; return this; }
public Date getFromDate() { return from_date; }
public CRMPaymentsResponse setFromDate(Date value) { this.from_date = value; return this; }
public Date getToDate() { return to_date; }
public CRMPaymentsResponse setToDate(Date value) { this.to_date = value; return this; }
public Integer getStartVersionNumber() { return start_version_number; }
public CRMPaymentsResponse setStartVersionNumber(Integer value) { this.start_version_number = value; return this; }
public Integer getEndVersionNumber() { return end_version_number; }
public CRMPaymentsResponse setEndVersionNumber(Integer value) { this.end_version_number = value; return this; }
}
public static class CRMPaymentResponse
{
public Integer regent_id = null;
public String contact_addressee = null;
public String donor_first_name = null;
public String donor_last_name = null;
public String donor_addressee = null;
public String donor_city = null;
public String donor_country = null;
public String donor_owner_full_name = null;
public Boolean is_contact = null;
public Boolean is_account = null;
public Integer soft_credit_regent_id = null;
public String soft_credit_contact_addressee = null;
public String soft_credit_contact_first_name = null;
public String soft_credit_contact_last_name = null;
public Boolean soft_credit_contact_spouse_is_main_contact = null;
public String soft_credit_contact_city = null;
public String soft_credit_contact_country = null;
public String soft_credit_contact_owner_full_name = null;
public Integer soft_credit_second_regent_id = null;
public String soft_credit_second_contact_addressee = null;
public String soft_credit_second_contact_first_name = null;
public String soft_credit_second_contact_last_name = null;
public Boolean soft_credit_second_contact_spouse_is_main_contact = null;
public String soft_credit_second_contact_city = null;
public String soft_credit_second_contact_country = null;
public String soft_credit_second_contact_owner_full_name = null;
public Boolean spouse_is_main_contact = null;
public Integer import_id = null;
public String donation_id = null;
public String payment_id = null;
public String guid = null;
public String name = null;
public String description = null;
public String appeal_code = null;
public String designation = null;
public String designation_description = null;
public String general_ledger_account_number = null;
public String campaign = null;
public BigDecimal total_pledge_amount = null;
public BigDecimal total_paid_amount = null;
public BigDecimal amount = null;
public BigDecimal canadian_amount = null;
public BigDecimal payment_exchange_rate = null;
public BigDecimal receipt_amount = null;
public BigDecimal gift_exchange_rate = null;
public BigDecimal total_paid_canadian_amount = null;
public Boolean is_recurring = null;
public Boolean is_complete = null;
public Boolean is_parent_donation = null;
public String currency = null;
public String source = null;
public String channel = null;
public String receipting_organization = null;
public String type = null;
public Boolean push_to_gp = null;
public Date finance_entry_date = null;
public String finance_id = null;
public Boolean acknowledgment_sent = null;
public Boolean send_acknowledgment = null;
public String acknowledgment_template_guid = null;
public String parent_guid = null;
public Boolean anonymous = null;
public Date gift_date = null;
public Date recurring_gift_start_date = null;
public Date recurring_gift_end_date = null;
public Date payment_date = null;
public String tax_receipt = null;
public Date tax_receipt_date_sent = null;
public String cheque_number = null;
public Integer version_number = null;
public Date added_date = null;
public Integer getRegentId() { return regent_id; }
public CRMPaymentResponse setRegentId(Integer value) { this.regent_id = value; return this; }
public String getContactAddressee() { return contact_addressee; }
public CRMPaymentResponse setContactAddressee(String value) { this.contact_addressee = value; return this; }
public String getDonorFirstName() { return donor_first_name; }
public CRMPaymentResponse setDonorFirstName(String value) { this.donor_first_name = value; return this; }
public String getDonorLastName() { return donor_last_name; }
public CRMPaymentResponse setDonorLastName(String value) { this.donor_last_name = value; return this; }
public String getDonorAddressee() { return donor_addressee; }
public CRMPaymentResponse setDonorAddressee(String value) { this.donor_addressee = value; return this; }
public String getDonorCity() { return donor_city; }
public CRMPaymentResponse setDonorCity(String value) { this.donor_city = value; return this; }
public String getDonorCountry() { return donor_country; }
public CRMPaymentResponse setDonorCountry(String value) { this.donor_country = value; return this; }
public String getDonorOwnerFullName() { return donor_owner_full_name; }
public CRMPaymentResponse setDonorOwnerFullName(String value) { this.donor_owner_full_name = value; return this; }
public Boolean getIsContact() { return is_contact; }
public CRMPaymentResponse setIsContact(Boolean value) { this.is_contact = value; return this; }
public Boolean getIsAccount() { return is_account; }
public CRMPaymentResponse setIsAccount(Boolean value) { this.is_account = value; return this; }
public Integer getSoftCreditRegentId() { return soft_credit_regent_id; }
public CRMPaymentResponse setSoftCreditRegentId(Integer value) { this.soft_credit_regent_id = value; return this; }
public String getSoftCreditContactAddressee() { return soft_credit_contact_addressee; }
public CRMPaymentResponse setSoftCreditContactAddressee(String value) { this.soft_credit_contact_addressee = value; return this; }
public String getSoftCreditContactFirstName() { return soft_credit_contact_first_name; }
public CRMPaymentResponse setSoftCreditContactFirstName(String value) { this.soft_credit_contact_first_name = value; return this; }
public String getSoftCreditContactLastName() { return soft_credit_contact_last_name; }
public CRMPaymentResponse setSoftCreditContactLastName(String value) { this.soft_credit_contact_last_name = value; return this; }
public Boolean isSoftCreditContactSpouseIsMainContact() { return soft_credit_contact_spouse_is_main_contact; }
public CRMPaymentResponse setSoftCreditContactSpouseIsMainContact(Boolean value) { this.soft_credit_contact_spouse_is_main_contact = value; return this; }
public String getSoftCreditContactCity() { return soft_credit_contact_city; }
public CRMPaymentResponse setSoftCreditContactCity(String value) { this.soft_credit_contact_city = value; return this; }
public String getSoftCreditContactCountry() { return soft_credit_contact_country; }
public CRMPaymentResponse setSoftCreditContactCountry(String value) { this.soft_credit_contact_country = value; return this; }
public String getSoftCreditContactOwnerFullName() { return soft_credit_contact_owner_full_name; }
public CRMPaymentResponse setSoftCreditContactOwnerFullName(String value) { this.soft_credit_contact_owner_full_name = value; return this; }
public Integer getSoftCreditSecondRegentId() { return soft_credit_second_regent_id; }
public CRMPaymentResponse setSoftCreditSecondRegentId(Integer value) { this.soft_credit_second_regent_id = value; return this; }
public String getSoftCreditSecondContactAddressee() { return soft_credit_second_contact_addressee; }
public CRMPaymentResponse setSoftCreditSecondContactAddressee(String value) { this.soft_credit_second_contact_addressee = value; return this; }
public String getSoftCreditSecondContactFirstName() { return soft_credit_second_contact_first_name; }
public CRMPaymentResponse setSoftCreditSecondContactFirstName(String value) { this.soft_credit_second_contact_first_name = value; return this; }
public String getSoftCreditSecondContactLastName() { return soft_credit_second_contact_last_name; }
public CRMPaymentResponse setSoftCreditSecondContactLastName(String value) { this.soft_credit_second_contact_last_name = value; return this; }
public Boolean isSoftCreditSecondContactSpouseIsMainContact() { return soft_credit_second_contact_spouse_is_main_contact; }
public CRMPaymentResponse setSoftCreditSecondContactSpouseIsMainContact(Boolean value) { this.soft_credit_second_contact_spouse_is_main_contact = value; return this; }
public String getSoftCreditSecondContactCity() { return soft_credit_second_contact_city; }
public CRMPaymentResponse setSoftCreditSecondContactCity(String value) { this.soft_credit_second_contact_city = value; return this; }
public String getSoftCreditSecondContactCountry() { return soft_credit_second_contact_country; }
public CRMPaymentResponse setSoftCreditSecondContactCountry(String value) { this.soft_credit_second_contact_country = value; return this; }
public String getSoftCreditSecondContactOwnerFullName() { return soft_credit_second_contact_owner_full_name; }
public CRMPaymentResponse setSoftCreditSecondContactOwnerFullName(String value) { this.soft_credit_second_contact_owner_full_name = value; return this; }
public Boolean isSpouseIsMainContact() { return spouse_is_main_contact; }
public CRMPaymentResponse setSpouseIsMainContact(Boolean value) { this.spouse_is_main_contact = value; return this; }
public Integer getImportId() { return import_id; }
public CRMPaymentResponse setImportId(Integer value) { this.import_id = value; return this; }
public String getDonationId() { return donation_id; }
public CRMPaymentResponse setDonationId(String value) { this.donation_id = value; return this; }
public String getPaymentId() { return payment_id; }
public CRMPaymentResponse setPaymentId(String value) { this.payment_id = value; return this; }
public String getGuid() { return guid; }
public CRMPaymentResponse setGuid(String value) { this.guid = value; return this; }
public String getName() { return name; }
public CRMPaymentResponse setName(String value) { this.name = value; return this; }
public String getDescription() { return description; }
public CRMPaymentResponse setDescription(String value) { this.description = value; return this; }
public String getAppealCode() { return appeal_code; }
public CRMPaymentResponse setAppealCode(String value) { this.appeal_code = value; return this; }
public String getDesignation() { return designation; }
public CRMPaymentResponse setDesignation(String value) { this.designation = value; return this; }
public String getDesignationDescription() { return designation_description; }
public CRMPaymentResponse setDesignationDescription(String value) { this.designation_description = value; return this; }
public String getGeneralLedgerAccountNumber() { return general_ledger_account_number; }
public CRMPaymentResponse setGeneralLedgerAccountNumber(String value) { this.general_ledger_account_number = value; return this; }
public String getCampaign() { return campaign; }
public CRMPaymentResponse setCampaign(String value) { this.campaign = value; return this; }
public BigDecimal getTotalPledgeAmount() { return total_pledge_amount; }
public CRMPaymentResponse setTotalPledgeAmount(BigDecimal value) { this.total_pledge_amount = value; return this; }
public BigDecimal getTotalPaidAmount() { return total_paid_amount; }
public CRMPaymentResponse setTotalPaidAmount(BigDecimal value) { this.total_paid_amount = value; return this; }
public BigDecimal getAmount() { return amount; }
public CRMPaymentResponse setAmount(BigDecimal value) { this.amount = value; return this; }
public BigDecimal getCanadianAmount() { return canadian_amount; }
public CRMPaymentResponse setCanadianAmount(BigDecimal value) { this.canadian_amount = value; return this; }
public BigDecimal getPaymentExchangeRate() { return payment_exchange_rate; }
public CRMPaymentResponse setPaymentExchangeRate(BigDecimal value) { this.payment_exchange_rate = value; return this; }
public BigDecimal getReceiptAmount() { return receipt_amount; }
public CRMPaymentResponse setReceiptAmount(BigDecimal value) { this.receipt_amount = value; return this; }
public BigDecimal getGiftExchangeRate() { return gift_exchange_rate; }
public CRMPaymentResponse setGiftExchangeRate(BigDecimal value) { this.gift_exchange_rate = value; return this; }
public BigDecimal getTotalPaidCanadianAmount() { return total_paid_canadian_amount; }
public CRMPaymentResponse setTotalPaidCanadianAmount(BigDecimal value) { this.total_paid_canadian_amount = value; return this; }
public Boolean getIsRecurring() { return is_recurring; }
public CRMPaymentResponse setIsRecurring(Boolean value) { this.is_recurring = value; return this; }
public Boolean getIsComplete() { return is_complete; }
public CRMPaymentResponse setIsComplete(Boolean value) { this.is_complete = value; return this; }
public Boolean getIsParentDonation() { return is_parent_donation; }
public CRMPaymentResponse setIsParentDonation(Boolean value) { this.is_parent_donation = value; return this; }
public String getCurrency() { return currency; }
public CRMPaymentResponse setCurrency(String value) { this.currency = value; return this; }
public String getSource() { return source; }
public CRMPaymentResponse setSource(String value) { this.source = value; return this; }
public String getChannel() { return channel; }
public CRMPaymentResponse setChannel(String value) { this.channel = value; return this; }
public String getReceiptingOrganization() { return receipting_organization; }
public CRMPaymentResponse setReceiptingOrganization(String value) { this.receipting_organization = value; return this; }
public String getType() { return type; }
public CRMPaymentResponse setType(String value) { this.type = value; return this; }
public Boolean isPushToGp() { return push_to_gp; }
public CRMPaymentResponse setPushToGp(Boolean value) { this.push_to_gp = value; return this; }
public Date getFinanceEntryDate() { return finance_entry_date; }
public CRMPaymentResponse setFinanceEntryDate(Date value) { this.finance_entry_date = value; return this; }
public String getFinanceId() { return finance_id; }
public CRMPaymentResponse setFinanceId(String value) { this.finance_id = value; return this; }
public Boolean isAcknowledgmentSent() { return acknowledgment_sent; }
public CRMPaymentResponse setAcknowledgmentSent(Boolean value) { this.acknowledgment_sent = value; return this; }
public Boolean isSendAcknowledgment() { return send_acknowledgment; }
public CRMPaymentResponse setSendAcknowledgment(Boolean value) { this.send_acknowledgment = value; return this; }
public String getAcknowledgmentTemplateGuid() { return acknowledgment_template_guid; }
public CRMPaymentResponse setAcknowledgmentTemplateGuid(String value) { this.acknowledgment_template_guid = value; return this; }
public String getParentGuid() { return parent_guid; }
public CRMPaymentResponse setParentGuid(String value) { this.parent_guid = value; return this; }
public Boolean isAnonymous() { return anonymous; }
public CRMPaymentResponse setAnonymous(Boolean value) { this.anonymous = value; return this; }
public Date getGiftDate() { return gift_date; }
public CRMPaymentResponse setGiftDate(Date value) { this.gift_date = value; return this; }
public Date getRecurringGiftStartDate() { return recurring_gift_start_date; }
public CRMPaymentResponse setRecurringGiftStartDate(Date value) { this.recurring_gift_start_date = value; return this; }
public Date getRecurringGiftEndDate() { return recurring_gift_end_date; }
public CRMPaymentResponse setRecurringGiftEndDate(Date value) { this.recurring_gift_end_date = value; return this; }
public Date getPaymentDate() { return payment_date; }
public CRMPaymentResponse setPaymentDate(Date value) { this.payment_date = value; return this; }
public String getTaxReceipt() { return tax_receipt; }
public CRMPaymentResponse setTaxReceipt(String value) { this.tax_receipt = value; return this; }
public Date getTaxReceiptDateSent() { return tax_receipt_date_sent; }
public CRMPaymentResponse setTaxReceiptDateSent(Date value) { this.tax_receipt_date_sent = value; return this; }
public String getChequeNumber() { return cheque_number; }
public CRMPaymentResponse setChequeNumber(String value) { this.cheque_number = value; return this; }
public Integer getVersionNumber() { return version_number; }
public CRMPaymentResponse setVersionNumber(Integer value) { this.version_number = value; return this; }
public Date getAddedDate() { return added_date; }
public CRMPaymentResponse setAddedDate(Date value) { this.added_date = value; return this; }
}
}
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/Payments HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CRMPaymentsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Requests">
<completed_only>false</completed_only>
<end_version_number>0</end_version_number>
<from_date>0001-01-01T00:00:00</from_date>
<recurring_only>false</recurring_only>
<regent_id>0</regent_id>
<start_version_number>0</start_version_number>
<to_date>0001-01-01T00:00:00</to_date>
</CRMPaymentsRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CRMPaymentsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Responses"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <end_version_number>0</end_version_number> <from_date>0001-01-01T00:00:00</from_date> <payments> <CRMPaymentResponse> <acknowledgment_sent>false</acknowledgment_sent> <acknowledgment_template_guid>String</acknowledgment_template_guid> <added_date>0001-01-01T00:00:00</added_date> <amount>0</amount> <anonymous>false</anonymous> <appeal_code>String</appeal_code> <campaign>String</campaign> <canadian_amount>0</canadian_amount> <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> <finance_entry_date>0001-01-01T00:00:00</finance_entry_date> <finance_id>String</finance_id> <general_ledger_account_number>String</general_ledger_account_number> <gift_date>0001-01-01T00:00:00</gift_date> <gift_exchange_rate>0</gift_exchange_rate> <guid>String</guid> <import_id>0</import_id> <is_account>false</is_account> <is_complete>false</is_complete> <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> <payment_date>0001-01-01T00:00:00</payment_date> <payment_exchange_rate>0</payment_exchange_rate> <payment_id>String</payment_id> <push_to_gp>false</push_to_gp> <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>0</soft_credit_second_regent_id> <source>String</source> <spouse_is_main_contact>false</spouse_is_main_contact> <tax_receipt>String</tax_receipt> <tax_receipt_date_sent>0001-01-01T00:00:00</tax_receipt_date_sent> <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> </CRMPaymentResponse> </payments> <start_version_number>0</start_version_number> <to_date>0001-01-01T00:00:00</to_date> </CRMPaymentsResponse>