TicketUserServices

<back to all web services

OwnerCardRefundRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:Tickets.Add
The following routes are available for this service:
POST/OwnerCards/{Id}/refund
import 'package:servicestack/servicestack.dart';

class OwnerCardRefundResult implements IConvertible
{
    bool? success;
    int? statusCode;
    String? message;
    String? result;
    int? ownerCardId;
    int? ownerId;
    String? orderReference;
    String? paymentReference;
    String? previousPaymentStatus;
    String? paymentStatus;
    int? cardRefundAmount;
    int? giftCreditAmount;
    int? giftCreditPendingAmount;
    int? totalRefunded;
    int? donationAmountNotRefunded;
    bool? borgunRefunded;
    bool? borgunPartial;
    String? borgunRefundTransactionId;
    String? merchantCredentials;
    bool? replayed;
    int? refundId;
    DateTime? refundedUTC;

    OwnerCardRefundResult({this.success,this.statusCode,this.message,this.result,this.ownerCardId,this.ownerId,this.orderReference,this.paymentReference,this.previousPaymentStatus,this.paymentStatus,this.cardRefundAmount,this.giftCreditAmount,this.giftCreditPendingAmount,this.totalRefunded,this.donationAmountNotRefunded,this.borgunRefunded,this.borgunPartial,this.borgunRefundTransactionId,this.merchantCredentials,this.replayed,this.refundId,this.refundedUTC});
    OwnerCardRefundResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        success = json['success'];
        statusCode = json['statusCode'];
        message = json['message'];
        result = json['result'];
        ownerCardId = json['ownerCardId'];
        ownerId = json['ownerId'];
        orderReference = json['orderReference'];
        paymentReference = json['paymentReference'];
        previousPaymentStatus = json['previousPaymentStatus'];
        paymentStatus = json['paymentStatus'];
        cardRefundAmount = json['cardRefundAmount'];
        giftCreditAmount = json['giftCreditAmount'];
        giftCreditPendingAmount = json['giftCreditPendingAmount'];
        totalRefunded = json['totalRefunded'];
        donationAmountNotRefunded = json['donationAmountNotRefunded'];
        borgunRefunded = json['borgunRefunded'];
        borgunPartial = json['borgunPartial'];
        borgunRefundTransactionId = json['borgunRefundTransactionId'];
        merchantCredentials = json['merchantCredentials'];
        replayed = json['replayed'];
        refundId = json['refundId'];
        refundedUTC = JsonConverters.fromJson(json['refundedUTC'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'success': success,
        'statusCode': statusCode,
        'message': message,
        'result': result,
        'ownerCardId': ownerCardId,
        'ownerId': ownerId,
        'orderReference': orderReference,
        'paymentReference': paymentReference,
        'previousPaymentStatus': previousPaymentStatus,
        'paymentStatus': paymentStatus,
        'cardRefundAmount': cardRefundAmount,
        'giftCreditAmount': giftCreditAmount,
        'giftCreditPendingAmount': giftCreditPendingAmount,
        'totalRefunded': totalRefunded,
        'donationAmountNotRefunded': donationAmountNotRefunded,
        'borgunRefunded': borgunRefunded,
        'borgunPartial': borgunPartial,
        'borgunRefundTransactionId': borgunRefundTransactionId,
        'merchantCredentials': merchantCredentials,
        'replayed': replayed,
        'refundId': refundId,
        'refundedUTC': JsonConverters.toJson(refundedUTC,'DateTime',context!)
    };

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

class OwnerCardRefundRequest implements IConvertible
{
    int? id;
    int? ownerId;
    String? reason;
    int? userId;
    String? idempotencyKey;

    OwnerCardRefundRequest({this.id,this.ownerId,this.reason,this.userId,this.idempotencyKey});
    OwnerCardRefundRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        reason = json['reason'];
        userId = json['userId'];
        idempotencyKey = json['idempotencyKey'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'reason': reason,
        'userId': userId,
        'idempotencyKey': idempotencyKey
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'OwnerCardRefundResult': TypeInfo(TypeOf.Class, create:() => OwnerCardRefundResult()),
    'OwnerCardRefundRequest': TypeInfo(TypeOf.Class, create:() => OwnerCardRefundRequest()),
});

Dart OwnerCardRefundRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /OwnerCards/{Id}/refund HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":0,"ownerId":0,"reason":"String","userId":0,"idempotencyKey":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"success":false,"statusCode":0,"message":"String","result":"String","ownerCardId":0,"ownerId":0,"orderReference":"String","paymentReference":"String","previousPaymentStatus":"String","paymentStatus":"String","cardRefundAmount":0,"giftCreditAmount":0,"giftCreditPendingAmount":0,"totalRefunded":0,"donationAmountNotRefunded":0,"borgunRefunded":false,"borgunPartial":false,"borgunRefundTransactionId":"String","merchantCredentials":"String","replayed":false,"refundId":0,"refundedUTC":"0001-01-01T00:00:00.0000000"}