| POST | /plugin/ips/rwc |
|---|
import 'package:servicestack/servicestack.dart';
class NewSession implements IConvertible
{
String? SessionID;
String? AmountPaid;
NewSession({this.SessionID,this.AmountPaid});
NewSession.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SessionID = json['SessionID'];
AmountPaid = json['AmountPaid'];
return this;
}
Map<String, dynamic> toJson() => {
'SessionID': SessionID,
'AmountPaid': AmountPaid
};
getTypeName() => "NewSession";
TypeContext? context = _ctx;
}
class AddTime implements IConvertible
{
String? SessionID;
String? AmountPaid;
AddTime({this.SessionID,this.AmountPaid});
AddTime.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SessionID = json['SessionID'];
AmountPaid = json['AmountPaid'];
return this;
}
Map<String, dynamic> toJson() => {
'SessionID': SessionID,
'AmountPaid': AmountPaid
};
getTypeName() => "AddTime";
TypeContext? context = _ctx;
}
class Payment implements IConvertible
{
String? TransmissionID;
String? TransmissionDateTime;
String? Zone;
String? Area;
String? SubArea;
String? StreetAddress;
String? MeterID;
String? EventType;
NewSession? NewSession;
AddTime? AddTime;
String? StartTime;
String? EndTime;
String? PaymentType;
String? SpaceName;
String? PlateNumber;
Payment({this.TransmissionID,this.TransmissionDateTime,this.Zone,this.Area,this.SubArea,this.StreetAddress,this.MeterID,this.EventType,this.NewSession,this.AddTime,this.StartTime,this.EndTime,this.PaymentType,this.SpaceName,this.PlateNumber});
Payment.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TransmissionID = json['TransmissionID'];
TransmissionDateTime = json['TransmissionDateTime'];
Zone = json['Zone'];
Area = json['Area'];
SubArea = json['SubArea'];
StreetAddress = json['StreetAddress'];
MeterID = json['MeterID'];
EventType = json['EventType'];
NewSession = JsonConverters.fromJson(json['NewSession'],'NewSession',context!);
AddTime = JsonConverters.fromJson(json['AddTime'],'AddTime',context!);
StartTime = json['StartTime'];
EndTime = json['EndTime'];
PaymentType = json['PaymentType'];
SpaceName = json['SpaceName'];
PlateNumber = json['PlateNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'TransmissionID': TransmissionID,
'TransmissionDateTime': TransmissionDateTime,
'Zone': Zone,
'Area': Area,
'SubArea': SubArea,
'StreetAddress': StreetAddress,
'MeterID': MeterID,
'EventType': EventType,
'NewSession': JsonConverters.toJson(NewSession,'NewSession',context!),
'AddTime': JsonConverters.toJson(AddTime,'AddTime',context!),
'StartTime': StartTime,
'EndTime': EndTime,
'PaymentType': PaymentType,
'SpaceName': SpaceName,
'PlateNumber': PlateNumber
};
getTypeName() => "Payment";
TypeContext? context = _ctx;
}
/**
* Enables viewiing, creation, updating and deletion of parking data
*/
// @Api(Description="Enables viewiing, creation, updating and deletion of parking data")
class ipsRequest implements IConvertible
{
String? _id;
DateTime? Sample;
List<Payment>? Payments;
ipsRequest({this._id,this.Sample,this.Payments});
ipsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
_id = JsonConverters.fromJson(json['_id'],'String',context!);
Sample = JsonConverters.fromJson(json['Sample'],'DateTime',context!);
Payments = JsonConverters.fromJson(json['Payments'],'List<Payment>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'_id': JsonConverters.toJson(_id,'String',context!),
'Sample': JsonConverters.toJson(Sample,'DateTime',context!),
'Payments': JsonConverters.toJson(Payments,'List<Payment>',context!)
};
getTypeName() => "ipsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: '188.138.100.94', types: <String, TypeInfo> {
'NewSession': TypeInfo(TypeOf.Class, create:() => NewSession()),
'AddTime': TypeInfo(TypeOf.Class, create:() => AddTime()),
'Payment': TypeInfo(TypeOf.Class, create:() => Payment()),
'ipsRequest': TypeInfo(TypeOf.Class, create:() => ipsRequest()),
'List<Payment>': TypeInfo(TypeOf.Class, create:() => <Payment>[]),
});
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 /plugin/ips/rwc HTTP/1.1
Host: 188.138.100.94
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ipsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ccsService.CustomerPlugin.us.redwoodcity">
<Payments>
<Payment>
<AddTime>
<AmountPaid>String</AmountPaid>
<SessionID>String</SessionID>
</AddTime>
<Area>String</Area>
<EndTime>String</EndTime>
<EventType>String</EventType>
<MeterID>String</MeterID>
<NewSession>
<AmountPaid>String</AmountPaid>
<SessionID>String</SessionID>
</NewSession>
<PaymentType>String</PaymentType>
<PlateNumber>String</PlateNumber>
<SpaceName>String</SpaceName>
<StartTime>String</StartTime>
<StreetAddress>String</StreetAddress>
<SubArea>String</SubArea>
<TransmissionDateTime>String</TransmissionDateTime>
<TransmissionID>String</TransmissionID>
<Zone>String</Zone>
</Payment>
</Payments>
<Sample>0001-01-01T00:00:00</Sample>
<_id xmlns:d2p1="http://schemas.datacontract.org/2004/07/MongoDB.Bson">
<d2p1:_a>0</d2p1:_a>
<d2p1:_b>0</d2p1:_b>
<d2p1:_c>0</d2p1:_c>
</_id>
</ipsRequest>