| POST | /setupcode/{SubscriptionId}/{CendynPropertyId} |
|---|
import 'package:servicestack/servicestack.dart';
class Response implements IConvertible
{
String? statusCode;
int? recordCount;
int? errorCount;
Response({this.statusCode,this.recordCount,this.errorCount});
Response.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
statusCode = json['statusCode'];
recordCount = json['recordCount'];
errorCount = json['errorCount'];
return this;
}
Map<String, dynamic> toJson() => {
'statusCode': statusCode,
'recordCount': recordCount,
'errorCount': errorCount
};
getTypeName() => "Response";
TypeContext? context = _ctx;
}
class SetupCode implements IConvertible
{
String? cendynPropertyID;
String? hotelCode;
String? codeId;
String? codeGroup;
String? languageCode;
String? nameValue;
String? codeValue;
String? description;
String? alternativeName;
String? alternativeCode;
String? alternativeDescription;
int? displaySequence;
String? comments;
String? codeSource;
bool? isActive;
DateTime? sourceDateCreated;
String? sourceCreateUser;
DateTime? sourceDateUpdated;
String? sourceUpdateUser;
SetupCode({this.cendynPropertyID,this.hotelCode,this.codeId,this.codeGroup,this.languageCode,this.nameValue,this.codeValue,this.description,this.alternativeName,this.alternativeCode,this.alternativeDescription,this.displaySequence,this.comments,this.codeSource,this.isActive,this.sourceDateCreated,this.sourceCreateUser,this.sourceDateUpdated,this.sourceUpdateUser});
SetupCode.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
cendynPropertyID = json['cendynPropertyID'];
hotelCode = json['hotelCode'];
codeId = json['codeId'];
codeGroup = json['codeGroup'];
languageCode = json['languageCode'];
nameValue = json['nameValue'];
codeValue = json['codeValue'];
description = json['description'];
alternativeName = json['alternativeName'];
alternativeCode = json['alternativeCode'];
alternativeDescription = json['alternativeDescription'];
displaySequence = json['displaySequence'];
comments = json['comments'];
codeSource = json['codeSource'];
isActive = json['isActive'];
sourceDateCreated = JsonConverters.fromJson(json['sourceDateCreated'],'DateTime',context!);
sourceCreateUser = json['sourceCreateUser'];
sourceDateUpdated = JsonConverters.fromJson(json['sourceDateUpdated'],'DateTime',context!);
sourceUpdateUser = json['sourceUpdateUser'];
return this;
}
Map<String, dynamic> toJson() => {
'cendynPropertyID': cendynPropertyID,
'hotelCode': hotelCode,
'codeId': codeId,
'codeGroup': codeGroup,
'languageCode': languageCode,
'nameValue': nameValue,
'codeValue': codeValue,
'description': description,
'alternativeName': alternativeName,
'alternativeCode': alternativeCode,
'alternativeDescription': alternativeDescription,
'displaySequence': displaySequence,
'comments': comments,
'codeSource': codeSource,
'isActive': isActive,
'sourceDateCreated': JsonConverters.toJson(sourceDateCreated,'DateTime',context!),
'sourceCreateUser': sourceCreateUser,
'sourceDateUpdated': JsonConverters.toJson(sourceDateUpdated,'DateTime',context!),
'sourceUpdateUser': sourceUpdateUser
};
getTypeName() => "SetupCode";
TypeContext? context = _ctx;
}
class SetupCodePost implements IConvertible
{
List<SetupCode>? setupCodes;
String? subscriptionId;
String? cendynPropertyId;
SetupCodePost({this.setupCodes,this.subscriptionId,this.cendynPropertyId});
SetupCodePost.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
setupCodes = JsonConverters.fromJson(json['setupCodes'],'List<SetupCode>',context!);
subscriptionId = json['subscriptionId'];
cendynPropertyId = json['cendynPropertyId'];
return this;
}
Map<String, dynamic> toJson() => {
'setupCodes': JsonConverters.toJson(setupCodes,'List<SetupCode>',context!),
'subscriptionId': subscriptionId,
'cendynPropertyId': cendynPropertyId
};
getTypeName() => "SetupCodePost";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'cert.cendyn.com', types: <String, TypeInfo> {
'Response': TypeInfo(TypeOf.Class, create:() => Response()),
'SetupCode': TypeInfo(TypeOf.Class, create:() => SetupCode()),
'SetupCodePost': TypeInfo(TypeOf.Class, create:() => SetupCodePost()),
'List<SetupCode>': TypeInfo(TypeOf.Class, create:() => <SetupCode>[]),
});
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 /setupcode/{SubscriptionId}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"setupCodes":[{"cendynPropertyID":"String","hotelCode":"String","codeId":"String","codeGroup":"String","languageCode":"String","nameValue":"String","codeValue":"String","description":"String","alternativeName":"String","alternativeCode":"String","alternativeDescription":"String","displaySequence":0,"comments":"String","codeSource":"String","isActive":false,"sourceDateCreated":"0001-01-01T00:00:00.0000000","sourceCreateUser":"String","sourceDateUpdated":"0001-01-01T00:00:00.0000000","sourceUpdateUser":"String"}],"subscriptionId":"String","cendynPropertyId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"statusCode":"String","recordCount":0,"errorCount":0}