TicketUserServices

<back to all web services

DonationPayoutMarkRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequired permission:Tickets.Add
The following routes are available for this service:
POST/donations/payout/mark
import 'package:servicestack/servicestack.dart';

class DonationPayoutRow implements IConvertible
{
    int? id;
    int? donationId;
    int? ownerId;
    int? ownerCardId;
    String? paymentMethodId;
    String? paymentReference;
    double? amount;
    double? txnPercent;
    double? payoutAmount;
    String? markPaidReference;
    String? source;
    String? note;
    DateTime? createdUTC;
    String? createdBy;
    DateTime? donationPaidUTC;

    DonationPayoutRow({this.id,this.donationId,this.ownerId,this.ownerCardId,this.paymentMethodId,this.paymentReference,this.amount,this.txnPercent,this.payoutAmount,this.markPaidReference,this.source,this.note,this.createdUTC,this.createdBy,this.donationPaidUTC});
    DonationPayoutRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        donationId = json['donationId'];
        ownerId = json['ownerId'];
        ownerCardId = json['ownerCardId'];
        paymentMethodId = json['paymentMethodId'];
        paymentReference = json['paymentReference'];
        amount = JsonConverters.toDouble(json['amount']);
        txnPercent = JsonConverters.toDouble(json['txnPercent']);
        payoutAmount = JsonConverters.toDouble(json['payoutAmount']);
        markPaidReference = json['markPaidReference'];
        source = json['source'];
        note = json['note'];
        createdUTC = JsonConverters.fromJson(json['createdUTC'],'DateTime',context!);
        createdBy = json['createdBy'];
        donationPaidUTC = JsonConverters.fromJson(json['donationPaidUTC'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'donationId': donationId,
        'ownerId': ownerId,
        'ownerCardId': ownerCardId,
        'paymentMethodId': paymentMethodId,
        'paymentReference': paymentReference,
        'amount': amount,
        'txnPercent': txnPercent,
        'payoutAmount': payoutAmount,
        'markPaidReference': markPaidReference,
        'source': source,
        'note': note,
        'createdUTC': JsonConverters.toJson(createdUTC,'DateTime',context!),
        'createdBy': createdBy,
        'donationPaidUTC': JsonConverters.toJson(donationPaidUTC,'DateTime',context!)
    };

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

class DonationPayoutBatchResult implements IConvertible
{
    List<DonationPayoutRow>? rows;
    int? count;
    int? donationAmount;
    double? payoutAmount;
    int? payoutAmountIsk;
    int? alreadyPaidCount;
    bool? replayed;
    String? markPaidReference;
    int? ownerId;
    int? statusCode;
    String? message;

    DonationPayoutBatchResult({this.rows,this.count,this.donationAmount,this.payoutAmount,this.payoutAmountIsk,this.alreadyPaidCount,this.replayed,this.markPaidReference,this.ownerId,this.statusCode,this.message});
    DonationPayoutBatchResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        rows = JsonConverters.fromJson(json['rows'],'List<DonationPayoutRow>',context!);
        count = json['count'];
        donationAmount = json['donationAmount'];
        payoutAmount = JsonConverters.toDouble(json['payoutAmount']);
        payoutAmountIsk = json['payoutAmountIsk'];
        alreadyPaidCount = json['alreadyPaidCount'];
        replayed = json['replayed'];
        markPaidReference = json['markPaidReference'];
        ownerId = json['ownerId'];
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'rows': JsonConverters.toJson(rows,'List<DonationPayoutRow>',context!),
        'count': count,
        'donationAmount': donationAmount,
        'payoutAmount': payoutAmount,
        'payoutAmountIsk': payoutAmountIsk,
        'alreadyPaidCount': alreadyPaidCount,
        'replayed': replayed,
        'markPaidReference': markPaidReference,
        'ownerId': ownerId,
        'statusCode': statusCode,
        'message': message
    };

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

class DonationPayoutMarkRequest implements IConvertible
{
    int? ownerId;
    String? markPaidReference;
    DateTime? cutoffUTC;
    Map<String,double?>? txnPercentByMethod;
    double? defaultTxnPercent;
    String? createdBy;

    DonationPayoutMarkRequest({this.ownerId,this.markPaidReference,this.cutoffUTC,this.txnPercentByMethod,this.defaultTxnPercent,this.createdBy});
    DonationPayoutMarkRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ownerId = json['ownerId'];
        markPaidReference = json['markPaidReference'];
        cutoffUTC = JsonConverters.fromJson(json['cutoffUTC'],'DateTime',context!);
        txnPercentByMethod = JsonConverters.fromJson(json['txnPercentByMethod'],'Map<String,double?>',context!);
        defaultTxnPercent = JsonConverters.toDouble(json['defaultTxnPercent']);
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ownerId': ownerId,
        'markPaidReference': markPaidReference,
        'cutoffUTC': JsonConverters.toJson(cutoffUTC,'DateTime',context!),
        'txnPercentByMethod': JsonConverters.toJson(txnPercentByMethod,'Map<String,double?>',context!),
        'defaultTxnPercent': defaultTxnPercent,
        'createdBy': createdBy
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'DonationPayoutRow': TypeInfo(TypeOf.Class, create:() => DonationPayoutRow()),
    'DonationPayoutBatchResult': TypeInfo(TypeOf.Class, create:() => DonationPayoutBatchResult()),
    'List<DonationPayoutRow>': TypeInfo(TypeOf.Class, create:() => <DonationPayoutRow>[]),
    'DonationPayoutMarkRequest': TypeInfo(TypeOf.Class, create:() => DonationPayoutMarkRequest()),
    'Map<String,double?>': TypeInfo(TypeOf.Class, create:() => Map<String,double?>()),
});

Dart DonationPayoutMarkRequest DTOs

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

HTTP + CSV

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

POST /donations/payout/mark HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ownerId":0,"markPaidReference":"String","cutoffUTC":"0001-01-01T00:00:00.0000000","txnPercentByMethod":{"String":0},"defaultTxnPercent":0,"createdBy":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"rows":[{"id":0,"donationId":0,"ownerId":0,"ownerCardId":0,"paymentMethodId":"String","paymentReference":"String","amount":0,"txnPercent":0,"payoutAmount":0,"markPaidReference":"String","source":"String","note":"String","createdUTC":"0001-01-01T00:00:00.0000000","createdBy":"String","donationPaidUTC":"0001-01-01T00:00:00.0000000"}],"count":0,"donationAmount":0,"payoutAmount":0,"payoutAmountIsk":0,"alreadyPaidCount":0,"replayed":false,"markPaidReference":"String","ownerId":0,"statusCode":0,"message":"String"}