| POST | /api/4PSBC/ImportBedrijf |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Header implements IConvertible
{
/**
* Inhoud van het bericht
*/
// @ApiMember(Description="Inhoud van het bericht")
String? Contains;
/**
* Datum aanmaak bericht
*/
// @ApiMember(Description="Datum aanmaak bericht")
String? Date;
/**
* ID voor het bericht
*/
// @ApiMember(Description="ID voor het bericht")
String? MessageID;
/**
* Verzender van het bericht
*/
// @ApiMember(Description="Verzender van het bericht")
String? Sender;
Header({this.Contains,this.Date,this.MessageID,this.Sender});
Header.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Contains = json['Contains'];
Date = json['Date'];
MessageID = json['MessageID'];
Sender = json['Sender'];
return this;
}
Map<String, dynamic> toJson() => {
'Contains': Contains,
'Date': Date,
'MessageID': MessageID,
'Sender': Sender
};
getTypeName() => "Header";
TypeContext? context = _ctx;
}
class Response_Company implements IConvertible
{
/**
* Reponse status (Ok/Error)
*/
// @ApiMember(Description="Reponse status (Ok/Error)", IsRequired=true)
String? Status;
/**
* Errors summary
*/
// @ApiMember(Description="Errors summary")
String? Errors;
/**
* ID of the company in DigiOffice
*/
// @ApiMember(Description="ID of the company in DigiOffice", IsRequired=true)
String? DigiOfficeCompanyID;
/**
* GlobalID (digiOfficeId) of the company in DigiOffice
*/
// @ApiMember(Description="GlobalID (digiOfficeId) of the company in DigiOffice", IsRequired=true)
String? DigiOfficeGlobalID;
Response_Company({this.Status,this.Errors,this.DigiOfficeCompanyID,this.DigiOfficeGlobalID});
Response_Company.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Status = json['Status'];
Errors = json['Errors'];
DigiOfficeCompanyID = json['DigiOfficeCompanyID'];
DigiOfficeGlobalID = json['DigiOfficeGlobalID'];
return this;
}
Map<String, dynamic> toJson() => {
'Status': Status,
'Errors': Errors,
'DigiOfficeCompanyID': DigiOfficeCompanyID,
'DigiOfficeGlobalID': DigiOfficeGlobalID
};
getTypeName() => "Response_Company";
TypeContext? context = _ctx;
}
class IDB_4PSBC_Response_Bedrijf implements IConvertible
{
/**
* Header of the response
*/
// @ApiMember(Description="Header of the response", IsRequired=true)
Header? Header;
/**
* Response body
*/
// @ApiMember(Description="Response body", IsRequired=true)
Response_Company? Response;
IDB_4PSBC_Response_Bedrijf({this.Header,this.Response});
IDB_4PSBC_Response_Bedrijf.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Header = JsonConverters.fromJson(json['Header'],'Header',context!);
Response = JsonConverters.fromJson(json['Response'],'Response_Company',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Header': JsonConverters.toJson(Header,'Header',context!),
'Response': JsonConverters.toJson(Response,'Response_Company',context!)
};
getTypeName() => "IDB_4PSBC_Response_Bedrijf";
TypeContext? context = _ctx;
}
class Data_Company implements IConvertible
{
String? visitAddress;
String? visitAddress2;
String? vatRegistrationNo;
String? vendorNo;
String? customerNo;
String? eMail;
String? companyName4ps;
String? systemId;
String? digiOfficeId;
String? cocRegistrationNo;
String? cocLocationNo;
String? cocCity;
String? visitAddressCountryRegionId;
String? countryRegionId;
String? countryRegionCodeId;
String? mobilePhoneNo;
String? name;
String? name2;
String? visitAddressCity;
String? city;
String? address;
String? visitAddressPostCode;
String? postCode;
String? phoneNo;
String? phoneNo2;
String? homePage;
String? no;
String? companyId;
bool? blocked;
String? nameAbbreviation;
Data_Company({this.visitAddress,this.visitAddress2,this.vatRegistrationNo,this.vendorNo,this.customerNo,this.eMail,this.companyName4ps,this.systemId,this.digiOfficeId,this.cocRegistrationNo,this.cocLocationNo,this.cocCity,this.visitAddressCountryRegionId,this.countryRegionId,this.countryRegionCodeId,this.mobilePhoneNo,this.name,this.name2,this.visitAddressCity,this.city,this.address,this.visitAddressPostCode,this.postCode,this.phoneNo,this.phoneNo2,this.homePage,this.no,this.companyId,this.blocked,this.nameAbbreviation});
Data_Company.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
visitAddress = json['visitAddress'];
visitAddress2 = json['visitAddress2'];
vatRegistrationNo = json['vatRegistrationNo'];
vendorNo = json['vendorNo'];
customerNo = json['customerNo'];
eMail = json['eMail'];
companyName4ps = json['companyName4ps'];
systemId = json['systemId'];
digiOfficeId = json['digiOfficeId'];
cocRegistrationNo = json['cocRegistrationNo'];
cocLocationNo = json['cocLocationNo'];
cocCity = json['cocCity'];
visitAddressCountryRegionId = json['visitAddressCountryRegionId'];
countryRegionId = json['countryRegionId'];
countryRegionCodeId = json['countryRegionCodeId'];
mobilePhoneNo = json['mobilePhoneNo'];
name = json['name'];
name2 = json['name2'];
visitAddressCity = json['visitAddressCity'];
city = json['city'];
address = json['address'];
visitAddressPostCode = json['visitAddressPostCode'];
postCode = json['postCode'];
phoneNo = json['phoneNo'];
phoneNo2 = json['phoneNo2'];
homePage = json['homePage'];
no = json['no'];
companyId = json['companyId'];
blocked = json['blocked'];
nameAbbreviation = json['nameAbbreviation'];
return this;
}
Map<String, dynamic> toJson() => {
'visitAddress': visitAddress,
'visitAddress2': visitAddress2,
'vatRegistrationNo': vatRegistrationNo,
'vendorNo': vendorNo,
'customerNo': customerNo,
'eMail': eMail,
'companyName4ps': companyName4ps,
'systemId': systemId,
'digiOfficeId': digiOfficeId,
'cocRegistrationNo': cocRegistrationNo,
'cocLocationNo': cocLocationNo,
'cocCity': cocCity,
'visitAddressCountryRegionId': visitAddressCountryRegionId,
'countryRegionId': countryRegionId,
'countryRegionCodeId': countryRegionCodeId,
'mobilePhoneNo': mobilePhoneNo,
'name': name,
'name2': name2,
'visitAddressCity': visitAddressCity,
'city': city,
'address': address,
'visitAddressPostCode': visitAddressPostCode,
'postCode': postCode,
'phoneNo': phoneNo,
'phoneNo2': phoneNo2,
'homePage': homePage,
'no': no,
'companyId': companyId,
'blocked': blocked,
'nameAbbreviation': nameAbbreviation
};
getTypeName() => "Data_Company";
TypeContext? context = _ctx;
}
/**
* Import bedrijf record vanuit 4PS
*/
// @Api(Description="Import bedrijf record vanuit 4PS")
class IDB_4PSBC_Import_Bedrijf implements IConvertible
{
/**
* Message header
*/
// @ApiMember(Description="Message header", IsRequired=true)
Header? Header;
/**
* Message data
*/
// @ApiMember(Description="Message data", IsRequired=true)
Data_Company? Data;
IDB_4PSBC_Import_Bedrijf({this.Header,this.Data});
IDB_4PSBC_Import_Bedrijf.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Header = JsonConverters.fromJson(json['Header'],'Header',context!);
Data = JsonConverters.fromJson(json['Data'],'Data_Company',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Header': JsonConverters.toJson(Header,'Header',context!),
'Data': JsonConverters.toJson(Data,'Data_Company',context!)
};
getTypeName() => "IDB_4PSBC_Import_Bedrijf";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'test_do_services.klokgroep.nl', types: <String, TypeInfo> {
'Header': TypeInfo(TypeOf.Class, create:() => Header()),
'Response_Company': TypeInfo(TypeOf.Class, create:() => Response_Company()),
'IDB_4PSBC_Response_Bedrijf': TypeInfo(TypeOf.Class, create:() => IDB_4PSBC_Response_Bedrijf()),
'Data_Company': TypeInfo(TypeOf.Class, create:() => Data_Company()),
'IDB_4PSBC_Import_Bedrijf': TypeInfo(TypeOf.Class, create:() => IDB_4PSBC_Import_Bedrijf()),
});
Dart IDB_4PSBC_Import_Bedrijf DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/4PSBC/ImportBedrijf HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Header":{"Contains":"String","Date":"String","MessageID":"String","Sender":"String"},"Data":{"visitAddress":"String","visitAddress2":"String","vatRegistrationNo":"String","vendorNo":"String","customerNo":"String","eMail":"String","companyName4ps":"String","systemId":"00000000-0000-0000-0000-000000000000","digiOfficeId":"00000000-0000-0000-0000-000000000000","cocRegistrationNo":"String","cocLocationNo":"String","cocCity":"String","visitAddressCountryRegionId":"String","countryRegionId":"String","countryRegionCodeId":"String","mobilePhoneNo":"String","name":"String","name2":"String","visitAddressCity":"String","city":"String","address":"String","visitAddressPostCode":"String","postCode":"String","phoneNo":"String","phoneNo2":"String","homePage":"String","no":"String","companyId":"00000000-0000-0000-0000-000000000000","blocked":false,"nameAbbreviation":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Header":{"Contains":"String","Date":"String","MessageID":"String","Sender":"String"},"Response":{"Status":"String","Errors":"String","DigiOfficeCompanyID":"String","DigiOfficeGlobalID":"00000000-0000-0000-0000-000000000000"}}