| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| POST | /GiftCard/RefundCredit |
|---|
import 'package:servicestack/servicestack.dart';
class LocalizedMessage implements IConvertible
{
String? Is;
String? en;
LocalizedMessage({this.Is,this.en});
LocalizedMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Is = json['is'];
en = json['en'];
return this;
}
Map<String, dynamic> toJson() => {
'is': Is,
'en': en
};
getTypeName() => "LocalizedMessage";
TypeContext? context = _ctx;
}
class GiftCardRedeemResult implements IConvertible
{
bool? ok;
String? reason;
LocalizedMessage? message;
int? redeemedAmountMinor;
int? newBalanceMinor;
int? transactionId;
String? settlementTag;
int? statusCode;
GiftCardRedeemResult({this.ok,this.reason,this.message,this.redeemedAmountMinor,this.newBalanceMinor,this.transactionId,this.settlementTag,this.statusCode});
GiftCardRedeemResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ok = json['ok'];
reason = json['reason'];
message = JsonConverters.fromJson(json['message'],'LocalizedMessage',context!);
redeemedAmountMinor = json['redeemedAmountMinor'];
newBalanceMinor = json['newBalanceMinor'];
transactionId = json['transactionId'];
settlementTag = json['settlementTag'];
statusCode = json['statusCode'];
return this;
}
Map<String, dynamic> toJson() => {
'ok': ok,
'reason': reason,
'message': JsonConverters.toJson(message,'LocalizedMessage',context!),
'redeemedAmountMinor': redeemedAmountMinor,
'newBalanceMinor': newBalanceMinor,
'transactionId': transactionId,
'settlementTag': settlementTag,
'statusCode': statusCode
};
getTypeName() => "GiftCardRedeemResult";
TypeContext? context = _ctx;
}
class GiftCardRefundCreditRequest implements IConvertible
{
int? giftCardId;
String? code;
int? amountMinor;
String? orderPaymentReference;
String? idempotencyKey;
String? note;
GiftCardRefundCreditRequest({this.giftCardId,this.code,this.amountMinor,this.orderPaymentReference,this.idempotencyKey,this.note});
GiftCardRefundCreditRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
giftCardId = json['giftCardId'];
code = json['code'];
amountMinor = json['amountMinor'];
orderPaymentReference = json['orderPaymentReference'];
idempotencyKey = json['idempotencyKey'];
note = json['note'];
return this;
}
Map<String, dynamic> toJson() => {
'giftCardId': giftCardId,
'code': code,
'amountMinor': amountMinor,
'orderPaymentReference': orderPaymentReference,
'idempotencyKey': idempotencyKey,
'note': note
};
getTypeName() => "GiftCardRefundCreditRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'LocalizedMessage': TypeInfo(TypeOf.Class, create:() => LocalizedMessage()),
'GiftCardRedeemResult': TypeInfo(TypeOf.Class, create:() => GiftCardRedeemResult()),
'GiftCardRefundCreditRequest': TypeInfo(TypeOf.Class, create:() => GiftCardRefundCreditRequest()),
});
Dart GiftCardRefundCreditRequest 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 /GiftCard/RefundCredit HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GiftCardRefundCreditRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<AmountMinor>0</AmountMinor>
<Code>String</Code>
<GiftCardId>0</GiftCardId>
<IdempotencyKey>String</IdempotencyKey>
<Note>String</Note>
<OrderPaymentReference>String</OrderPaymentReference>
</GiftCardRefundCreditRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GiftCardRedeemResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Message>
<En>String</En>
<Is>String</Is>
</Message>
<NewBalanceMinor>0</NewBalanceMinor>
<Ok>false</Ok>
<Reason>String</Reason>
<RedeemedAmountMinor>0</RedeemedAmountMinor>
<SettlementTag>String</SettlementTag>
<StatusCode>0</StatusCode>
<TransactionId>0</TransactionId>
</GiftCardRedeemResult>