| POST | /cmd/pool-transaction/cancel |
|---|
import 'package:servicestack/servicestack.dart';
class PoolTransactionStatus
{
static const PoolTransactionStatus Pending = const PoolTransactionStatus._(0);
static const PoolTransactionStatus Executed = const PoolTransactionStatus._(1);
static const PoolTransactionStatus Failed = const PoolTransactionStatus._(2);
static const PoolTransactionStatus PendingCancellation = const PoolTransactionStatus._(3);
static const PoolTransactionStatus Cancelled = const PoolTransactionStatus._(4);
final int _value;
const PoolTransactionStatus._(this._value);
int get value => _value;
static List<PoolTransactionStatus> get values => const [Pending,Executed,Failed,PendingCancellation,Cancelled];
}
class CancelPoolTransaction implements IConvertible
{
String? id;
PoolTransactionStatus status;
CancelPoolTransaction({this.id,this.status});
CancelPoolTransaction.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
status = JsonConverters.fromJson(json['status'],'PoolTransactionStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'status': JsonConverters.toJson(status,'PoolTransactionStatus',context!)
};
getTypeName() => "CancelPoolTransaction";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.webhop.biz', types: <String, TypeInfo> {
'PoolTransactionStatus': TypeInfo(TypeOf.Enum, enumValues:PoolTransactionStatus.values),
'CancelPoolTransaction': TypeInfo(TypeOf.Class, create:() => CancelPoolTransaction()),
});
Dart CancelPoolTransaction 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 /cmd/pool-transaction/cancel HTTP/1.1
Host: s4w2.api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CancelPoolTransaction xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.WebApi.ServiceModel">
<Id>String</Id>
<Status>Pending</Status>
</CancelPoolTransaction>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<ErrorCode>String</ErrorCode>
<Message>String</Message>
<StackTrace>String</StackTrace>
<Errors>
<ResponseError>
<ErrorCode>String</ErrorCode>
<FieldName>String</FieldName>
<Message>String</Message>
<Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</Meta>
</ResponseError>
</Errors>
<Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</Meta>
</ResponseStatus>