| POST | /cmd/organizations/change/integration-instance-connection |
|---|
import 'package:servicestack/servicestack.dart';
class IntegrationService
{
static const IntegrationService Wallet = const IntegrationService._(1);
static const IntegrationService PartnerApi = const IntegrationService._(2);
final int _value;
const IntegrationService._(this._value);
int get value => _value;
static List<IntegrationService> get values => const [Wallet,PartnerApi];
}
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 ChangeIntegrationInstanceConnection implements IConvertible
{
String? id;
String? instanceId;
IntegrationService? service;
IntegrationConnection? connection;
ChangeIntegrationInstanceConnection({this.id,this.instanceId,this.service,this.connection});
ChangeIntegrationInstanceConnection.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
instanceId = json['instanceId'];
service = JsonConverters.fromJson(json['service'],'IntegrationService',context!);
connection = JsonConverters.fromJson(json['connection'],'IntegrationConnection',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'instanceId': instanceId,
'service': JsonConverters.toJson(service,'IntegrationService',context!),
'connection': JsonConverters.toJson(connection,'IntegrationConnection',context!)
};
getTypeName() => "ChangeIntegrationInstanceConnection";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bettor.webhop.biz', types: <String, TypeInfo> {
'IntegrationService': TypeInfo(TypeOf.Enum, enumValues:IntegrationService.values),
'IntegrationConnection': TypeInfo(TypeOf.Class, create:() => IntegrationConnection()),
'ChangeIntegrationInstanceConnection': TypeInfo(TypeOf.Class, create:() => ChangeIntegrationInstanceConnection()),
});
Dart ChangeIntegrationInstanceConnection DTOs
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 /cmd/organizations/change/integration-instance-connection HTTP/1.1
Host: api.bettor.webhop.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{"id":"String","instanceId":"String","service":1,"connection":{"url":"String","credentialsRef":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}