| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | ReadData |
| POST | /OwnerCards/Purchase/Quote |
|---|
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 OwnerCardPurchaseQuoteResult implements IConvertible
{
int? ownerCardTypeId;
int? ownerId;
String? currency;
int? priceMinor;
int? giftAppliedMinor;
int? remainingMinor;
int? giftHoldId;
bool? fullyCoveredByGiftCard;
bool? requiresCardMandate;
String? giftRejectedReason;
LocalizedMessage? giftMessage;
int? statusCode;
String? message;
OwnerCardPurchaseQuoteResult({this.ownerCardTypeId,this.ownerId,this.currency,this.priceMinor,this.giftAppliedMinor,this.remainingMinor,this.giftHoldId,this.fullyCoveredByGiftCard,this.requiresCardMandate,this.giftRejectedReason,this.giftMessage,this.statusCode,this.message});
OwnerCardPurchaseQuoteResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ownerCardTypeId = json['ownerCardTypeId'];
ownerId = json['ownerId'];
currency = json['currency'];
priceMinor = json['priceMinor'];
giftAppliedMinor = json['giftAppliedMinor'];
remainingMinor = json['remainingMinor'];
giftHoldId = json['giftHoldId'];
fullyCoveredByGiftCard = json['fullyCoveredByGiftCard'];
requiresCardMandate = json['requiresCardMandate'];
giftRejectedReason = json['giftRejectedReason'];
giftMessage = JsonConverters.fromJson(json['giftMessage'],'LocalizedMessage',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'ownerCardTypeId': ownerCardTypeId,
'ownerId': ownerId,
'currency': currency,
'priceMinor': priceMinor,
'giftAppliedMinor': giftAppliedMinor,
'remainingMinor': remainingMinor,
'giftHoldId': giftHoldId,
'fullyCoveredByGiftCard': fullyCoveredByGiftCard,
'requiresCardMandate': requiresCardMandate,
'giftRejectedReason': giftRejectedReason,
'giftMessage': JsonConverters.toJson(giftMessage,'LocalizedMessage',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "OwnerCardPurchaseQuoteResult";
TypeContext? context = _ctx;
}
class OwnerCardPurchaseQuoteRequest implements IConvertible
{
int? ownerCardTypeId;
String? giftCardCode;
String? idempotencyKey;
bool? isRecurring;
OwnerCardPurchaseQuoteRequest({this.ownerCardTypeId,this.giftCardCode,this.idempotencyKey,this.isRecurring});
OwnerCardPurchaseQuoteRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ownerCardTypeId = json['ownerCardTypeId'];
giftCardCode = json['giftCardCode'];
idempotencyKey = json['idempotencyKey'];
isRecurring = json['isRecurring'];
return this;
}
Map<String, dynamic> toJson() => {
'ownerCardTypeId': ownerCardTypeId,
'giftCardCode': giftCardCode,
'idempotencyKey': idempotencyKey,
'isRecurring': isRecurring
};
getTypeName() => "OwnerCardPurchaseQuoteRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'LocalizedMessage': TypeInfo(TypeOf.Class, create:() => LocalizedMessage()),
'OwnerCardPurchaseQuoteResult': TypeInfo(TypeOf.Class, create:() => OwnerCardPurchaseQuoteResult()),
'OwnerCardPurchaseQuoteRequest': TypeInfo(TypeOf.Class, create:() => OwnerCardPurchaseQuoteRequest()),
});
Dart OwnerCardPurchaseQuoteRequest 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/Purchase/Quote HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<OwnerCardPurchaseQuoteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<GiftCardCode>String</GiftCardCode>
<IdempotencyKey>String</IdempotencyKey>
<IsRecurring>false</IsRecurring>
<OwnerCardTypeId>0</OwnerCardTypeId>
</OwnerCardPurchaseQuoteRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<OwnerCardPurchaseQuoteResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Currency>String</Currency>
<FullyCoveredByGiftCard>false</FullyCoveredByGiftCard>
<GiftAppliedMinor>0</GiftAppliedMinor>
<GiftHoldId>0</GiftHoldId>
<GiftMessage>
<En>String</En>
<Is>String</Is>
</GiftMessage>
<GiftRejectedReason>String</GiftRejectedReason>
<Message>String</Message>
<OwnerCardTypeId>0</OwnerCardTypeId>
<OwnerId>0</OwnerId>
<PriceMinor>0</PriceMinor>
<RemainingMinor>0</RemainingMinor>
<RequiresCardMandate>false</RequiresCardMandate>
<StatusCode>0</StatusCode>
</OwnerCardPurchaseQuoteResult>