| POST | /cmd/organizations/register/integrations |
|---|
import 'package:servicestack/servicestack.dart';
class OrganizationNature
{
static const OrganizationNature FirstParty = const OrganizationNature._(1);
static const OrganizationNature Partner = const OrganizationNature._(2);
final int _value;
const OrganizationNature._(this._value);
int get value => _value;
static List<OrganizationNature> get values => const [FirstParty,Partner];
}
class IntegrationConnection implements IConvertible
{
String? url;
String? credentialsRef;
IntegrationConnection({this.url,this.credentialsRef});
IntegrationConnection.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
url = json['url'];
credentialsRef = json['credentialsRef'];
return this;
}
Map<String, dynamic> toJson() => {
'url': url,
'credentialsRef': credentialsRef
};
getTypeName() => "IntegrationConnection";
TypeContext? context = _ctx;
}
class IntegrationInstance implements IConvertible
{
String? id;
String? integrationId;
IntegrationConnection? wallet;
IntegrationConnection? partnerApi;
bool? slipForwardingEnabled;
IntegrationInstance({this.id,this.integrationId,this.wallet,this.partnerApi,this.slipForwardingEnabled});
IntegrationInstance.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
integrationId = json['integrationId'];
wallet = JsonConverters.fromJson(json['wallet'],'IntegrationConnection',context!);
partnerApi = JsonConverters.fromJson(json['partnerApi'],'IntegrationConnection',context!);
slipForwardingEnabled = json['slipForwardingEnabled'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'integrationId': integrationId,
'wallet': JsonConverters.toJson(wallet,'IntegrationConnection',context!),
'partnerApi': JsonConverters.toJson(partnerApi,'IntegrationConnection',context!),
'slipForwardingEnabled': slipForwardingEnabled
};
getTypeName() => "IntegrationInstance";
TypeContext? context = _ctx;
}
class OrganizationIntegrations implements IConvertible
{
IntegrationInstance? firstParty;
IntegrationInstance? partner;
OrganizationIntegrations({this.firstParty,this.partner});
OrganizationIntegrations.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
firstParty = JsonConverters.fromJson(json['firstParty'],'IntegrationInstance',context!);
partner = JsonConverters.fromJson(json['partner'],'IntegrationInstance',context!);
return this;
}
Map<String, dynamic> toJson() => {
'firstParty': JsonConverters.toJson(firstParty,'IntegrationInstance',context!),
'partner': JsonConverters.toJson(partner,'IntegrationInstance',context!)
};
getTypeName() => "OrganizationIntegrations";
TypeContext? context = _ctx;
}
class WalletPayoutMode
{
static const WalletPayoutMode RealTime = const WalletPayoutMode._(0);
static const WalletPayoutMode BatchPayout = const WalletPayoutMode._(1);
final int _value;
const WalletPayoutMode._(this._value);
int get value => _value;
static List<WalletPayoutMode> get values => const [RealTime,BatchPayout];
}
class PayoutPolicy implements IConvertible
{
WalletPayoutMode? selfService;
WalletPayoutMode? personal;
PayoutPolicy({this.selfService,this.personal});
PayoutPolicy.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
selfService = JsonConverters.fromJson(json['selfService'],'WalletPayoutMode',context!);
personal = JsonConverters.fromJson(json['personal'],'WalletPayoutMode',context!);
return this;
}
Map<String, dynamic> toJson() => {
'selfService': JsonConverters.toJson(selfService,'WalletPayoutMode',context!),
'personal': JsonConverters.toJson(personal,'WalletPayoutMode',context!)
};
getTypeName() => "PayoutPolicy";
TypeContext? context = _ctx;
}
class RegisterOrganizationIntegrations implements IConvertible
{
String? id;
OrganizationNature? nature;
OrganizationIntegrations? integrations;
PayoutPolicy? payoutPolicy;
RegisterOrganizationIntegrations({this.id,this.nature,this.integrations,this.payoutPolicy});
RegisterOrganizationIntegrations.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
nature = JsonConverters.fromJson(json['nature'],'OrganizationNature',context!);
integrations = JsonConverters.fromJson(json['integrations'],'OrganizationIntegrations',context!);
payoutPolicy = JsonConverters.fromJson(json['payoutPolicy'],'PayoutPolicy',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'nature': JsonConverters.toJson(nature,'OrganizationNature',context!),
'integrations': JsonConverters.toJson(integrations,'OrganizationIntegrations',context!),
'payoutPolicy': JsonConverters.toJson(payoutPolicy,'PayoutPolicy',context!)
};
getTypeName() => "RegisterOrganizationIntegrations";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bettor.webhop.biz', types: <String, TypeInfo> {
'OrganizationNature': TypeInfo(TypeOf.Enum, enumValues:OrganizationNature.values),
'IntegrationConnection': TypeInfo(TypeOf.Class, create:() => IntegrationConnection()),
'IntegrationInstance': TypeInfo(TypeOf.Class, create:() => IntegrationInstance()),
'OrganizationIntegrations': TypeInfo(TypeOf.Class, create:() => OrganizationIntegrations()),
'WalletPayoutMode': TypeInfo(TypeOf.Enum, enumValues:WalletPayoutMode.values),
'PayoutPolicy': TypeInfo(TypeOf.Class, create:() => PayoutPolicy()),
'RegisterOrganizationIntegrations': TypeInfo(TypeOf.Class, create:() => RegisterOrganizationIntegrations()),
});
Dart RegisterOrganizationIntegrations 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/organizations/register/integrations HTTP/1.1
Host: api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RegisterOrganizationIntegrations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.WebApi.ServiceModel">
<Id>String</Id>
<Integrations xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.Common">
<d2p1:FirstParty>
<d2p1:Id>String</d2p1:Id>
<d2p1:IntegrationId>String</d2p1:IntegrationId>
<d2p1:PartnerApi>
<d2p1:CredentialsRef>String</d2p1:CredentialsRef>
<d2p1:Url>String</d2p1:Url>
</d2p1:PartnerApi>
<d2p1:SlipForwardingEnabled>false</d2p1:SlipForwardingEnabled>
<d2p1:Wallet>
<d2p1:CredentialsRef>String</d2p1:CredentialsRef>
<d2p1:Url>String</d2p1:Url>
</d2p1:Wallet>
</d2p1:FirstParty>
<d2p1:Partner>
<d2p1:Id>String</d2p1:Id>
<d2p1:IntegrationId>String</d2p1:IntegrationId>
<d2p1:PartnerApi>
<d2p1:CredentialsRef>String</d2p1:CredentialsRef>
<d2p1:Url>String</d2p1:Url>
</d2p1:PartnerApi>
<d2p1:SlipForwardingEnabled>false</d2p1:SlipForwardingEnabled>
<d2p1:Wallet>
<d2p1:CredentialsRef>String</d2p1:CredentialsRef>
<d2p1:Url>String</d2p1:Url>
</d2p1:Wallet>
</d2p1:Partner>
</Integrations>
<Nature>FirstParty</Nature>
<PayoutPolicy xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.Common">
<d2p1:Personal>RealTime</d2p1:Personal>
<d2p1:SelfService>RealTime</d2p1:SelfService>
</PayoutPolicy>
</RegisterOrganizationIntegrations>
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>