regis

<back to all web services

CRMPaymentsDatamartRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/DynamicsCRM/PaymentsDatamart
POST/DynamicsCRM/PaymentsDatamart/{regent_id}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class CRMPaymentDatamartResponse implements IConvertible
{
    String? guid;
    int? regent_id;
    String? addressee;
    int? soft_credit_regent_id;
    int? second_soft_credit_regent_id;
    String? donation_id;
    String? designation;
    String? pretty_designation;
    double? pledged;
    double? paid;
    double? paid_canadian;
    DateTime? payment_date;

    CRMPaymentDatamartResponse({this.guid,this.regent_id,this.addressee,this.soft_credit_regent_id,this.second_soft_credit_regent_id,this.donation_id,this.designation,this.pretty_designation,this.pledged,this.paid,this.paid_canadian,this.payment_date});
    CRMPaymentDatamartResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        guid = json['guid'];
        regent_id = json['regent_id'];
        addressee = json['addressee'];
        soft_credit_regent_id = json['soft_credit_regent_id'];
        second_soft_credit_regent_id = json['second_soft_credit_regent_id'];
        donation_id = json['donation_id'];
        designation = json['designation'];
        pretty_designation = json['pretty_designation'];
        pledged = JsonConverters.toDouble(json['pledged']);
        paid = JsonConverters.toDouble(json['paid']);
        paid_canadian = JsonConverters.toDouble(json['paid_canadian']);
        payment_date = JsonConverters.fromJson(json['payment_date'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'guid': guid,
        'regent_id': regent_id,
        'addressee': addressee,
        'soft_credit_regent_id': soft_credit_regent_id,
        'second_soft_credit_regent_id': second_soft_credit_regent_id,
        'donation_id': donation_id,
        'designation': designation,
        'pretty_designation': pretty_designation,
        'pledged': pledged,
        'paid': paid,
        'paid_canadian': paid_canadian,
        'payment_date': JsonConverters.toJson(payment_date,'DateTime',context!)
    };

    getTypeName() => "CRMPaymentDatamartResponse";
    TypeContext? context = _ctx;
}

class CRMPaymentsDatamartResponse implements IConvertible
{
    List<CRMPaymentDatamartResponse>? personal_payments;
    List<CRMPaymentDatamartResponse>? other_payments;

    CRMPaymentsDatamartResponse({this.personal_payments,this.other_payments});
    CRMPaymentsDatamartResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        personal_payments = JsonConverters.fromJson(json['personal_payments'],'List<CRMPaymentDatamartResponse>',context!);
        other_payments = JsonConverters.fromJson(json['other_payments'],'List<CRMPaymentDatamartResponse>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'personal_payments': JsonConverters.toJson(personal_payments,'List<CRMPaymentDatamartResponse>',context!),
        'other_payments': JsonConverters.toJson(other_payments,'List<CRMPaymentDatamartResponse>',context!)
    };

    getTypeName() => "CRMPaymentsDatamartResponse";
    TypeContext? context = _ctx;
}

class CRMPaymentsDatamartRequest implements IConvertible
{
    int? regent_id;

    CRMPaymentsDatamartRequest({this.regent_id});
    CRMPaymentsDatamartRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        regent_id = json['regent_id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'regent_id': regent_id
    };

    getTypeName() => "CRMPaymentsDatamartRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
    'CRMPaymentDatamartResponse': TypeInfo(TypeOf.Class, create:() => CRMPaymentDatamartResponse()),
    'CRMPaymentsDatamartResponse': TypeInfo(TypeOf.Class, create:() => CRMPaymentsDatamartResponse()),
    'List<CRMPaymentDatamartResponse>': TypeInfo(TypeOf.Class, create:() => <CRMPaymentDatamartResponse>[]),
    'CRMPaymentsDatamartRequest': TypeInfo(TypeOf.Class, create:() => CRMPaymentsDatamartRequest()),
});

Dart CRMPaymentsDatamartRequest DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /DynamicsCRM/PaymentsDatamart HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CRMPaymentsDatamartRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Requests">
  <regent_id>0</regent_id>
</CRMPaymentsDatamartRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CRMPaymentsDatamartResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Responses">
  <other_payments>
    <CRMPaymentDatamartResponse>
      <addressee>String</addressee>
      <designation>String</designation>
      <donation_id>String</donation_id>
      <guid>String</guid>
      <paid>0</paid>
      <paid_canadian>0</paid_canadian>
      <payment_date>0001-01-01T00:00:00</payment_date>
      <pledged>0</pledged>
      <pretty_designation>String</pretty_designation>
      <regent_id>0</regent_id>
      <second_soft_credit_regent_id>0</second_soft_credit_regent_id>
      <soft_credit_regent_id>0</soft_credit_regent_id>
    </CRMPaymentDatamartResponse>
  </other_payments>
  <personal_payments>
    <CRMPaymentDatamartResponse>
      <addressee>String</addressee>
      <designation>String</designation>
      <donation_id>String</donation_id>
      <guid>String</guid>
      <paid>0</paid>
      <paid_canadian>0</paid_canadian>
      <payment_date>0001-01-01T00:00:00</payment_date>
      <pledged>0</pledged>
      <pretty_designation>String</pretty_designation>
      <regent_id>0</regent_id>
      <second_soft_credit_regent_id>0</second_soft_credit_regent_id>
      <soft_credit_regent_id>0</soft_credit_regent_id>
    </CRMPaymentDatamartResponse>
  </personal_payments>
</CRMPaymentsDatamartResponse>