| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | Tickets.Add |
| 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 .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<OwnerCardRefundRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Id>0</Id>
<IdempotencyKey>String</IdempotencyKey>
<OwnerId>0</OwnerId>
<Reason>String</Reason>
<UserId>0</UserId>
</OwnerCardRefundRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <OwnerCardRefundResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <BorgunPartial>false</BorgunPartial> <BorgunRefundTransactionId>String</BorgunRefundTransactionId> <BorgunRefunded>false</BorgunRefunded> <CardRefundAmount>0</CardRefundAmount> <DonationAmountNotRefunded>0</DonationAmountNotRefunded> <GiftCreditAmount>0</GiftCreditAmount> <GiftCreditPendingAmount>0</GiftCreditPendingAmount> <MerchantCredentials>String</MerchantCredentials> <Message>String</Message> <OrderReference>String</OrderReference> <OwnerCardId>0</OwnerCardId> <OwnerId>0</OwnerId> <PaymentReference>String</PaymentReference> <PaymentStatus>String</PaymentStatus> <PreviousPaymentStatus>String</PreviousPaymentStatus> <RefundId>0</RefundId> <RefundedUTC>0001-01-01T00:00:00</RefundedUTC> <Replayed>false</Replayed> <Result>String</Result> <StatusCode>0</StatusCode> <Success>false</Success> <TotalRefunded>0</TotalRefunded> </OwnerCardRefundResult>