| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| PUT | /GiftCardType |
|---|
import 'package:servicestack/servicestack.dart';
class GiftCardType implements IConvertible
{
int? id;
String? name;
String? scope;
int? ownerId;
String? currency;
int? defaultExpiryMonths;
bool? isActive;
DateTime? createdAt;
GiftCardType({this.id,this.name,this.scope,this.ownerId,this.currency,this.defaultExpiryMonths,this.isActive,this.createdAt});
GiftCardType.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
scope = json['scope'];
ownerId = json['ownerId'];
currency = json['currency'];
defaultExpiryMonths = json['defaultExpiryMonths'];
isActive = json['isActive'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'scope': scope,
'ownerId': ownerId,
'currency': currency,
'defaultExpiryMonths': defaultExpiryMonths,
'isActive': isActive,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!)
};
getTypeName() => "GiftCardType";
TypeContext? context = _ctx;
}
class GiftCardTypeResult implements IConvertible
{
GiftCardType? item;
int? statusCode;
String? message;
GiftCardTypeResult({this.item,this.statusCode,this.message});
GiftCardTypeResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'GiftCardType',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'GiftCardType',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "GiftCardTypeResult";
TypeContext? context = _ctx;
}
class GiftCardTypeUpdateRequest implements IConvertible
{
GiftCardType? item;
GiftCardTypeUpdateRequest({this.item});
GiftCardTypeUpdateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'GiftCardType',context!);
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'GiftCardType',context!)
};
getTypeName() => "GiftCardTypeUpdateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'GiftCardType': TypeInfo(TypeOf.Class, create:() => GiftCardType()),
'GiftCardTypeResult': TypeInfo(TypeOf.Class, create:() => GiftCardTypeResult()),
'GiftCardTypeUpdateRequest': TypeInfo(TypeOf.Class, create:() => GiftCardTypeUpdateRequest()),
});
Dart GiftCardTypeUpdateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /GiftCardType HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"item":{"id":0,"name":"String","scope":"String","ownerId":0,"currency":"String","defaultExpiryMonths":0,"isActive":false,"createdAt":"0001-01-01T00:00:00.0000000"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"item":{"id":0,"name":"String","scope":"String","ownerId":0,"currency":"String","defaultExpiryMonths":0,"isActive":false,"createdAt":"0001-01-01T00:00:00.0000000"},"statusCode":0,"message":"String"}