| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
Content-Type: application/json
Content-Length: length
{"ownerCardTypeId":0,"giftCardCode":"String","idempotencyKey":"String","isRecurring":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ownerCardTypeId":0,"ownerId":0,"currency":"String","priceMinor":0,"giftAppliedMinor":0,"remainingMinor":0,"giftHoldId":0,"fullyCoveredByGiftCard":false,"requiresCardMandate":false,"giftRejectedReason":"String","giftMessage":{"is":"String","en":"String"},"statusCode":0,"message":"String"}