GET | /api/licensee/contacts |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class ConnectedContactDetailModel implements IConvertible
{
/**
* The type of contact detail this is (email/mobile/fax/website etc)
*/
// @ApiMember(DataType="string", Description="The type of contact detail this is (email/mobile/fax/website etc)", Name="Type")
String? Type;
/**
* The contact detail. e.g (phone number or email address)
*/
// @ApiMember(DataType="string", Description="The contact detail. e.g (phone number or email address)", Name="ContactDetails")
String? ContactDetails;
ConnectedContactDetailModel({this.Type,this.ContactDetails});
ConnectedContactDetailModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Type = json['Type'];
ContactDetails = json['ContactDetails'];
return this;
}
Map<String, dynamic> toJson() => {
'Type': Type,
'ContactDetails': ContactDetails
};
getTypeName() => "ConnectedContactDetailModel";
TypeContext? context = _ctx;
}
class ConnectedContactAddressModel implements IConvertible
{
/**
* A full address string of the address.
*/
// @ApiMember(DataType="string", Description="A full address string of the address.", Name="FullAddress")
String? FullAddress;
/**
* If true, this is the contacts primary address.
*/
// @ApiMember(DataType="bool", Description="If true, this is the contacts primary address.", Name="IsPrimary")
bool? IsPrimary;
/**
* If true, this is the contacts postal address.
*/
// @ApiMember(DataType="bool", Description="If true, this is the contacts postal address.", Name="IsPostal")
bool? IsPostal;
/**
* If true, this is the contacts registered address.
*/
// @ApiMember(DataType="bool", Description="If true, this is the contacts registered address.", Name="IsRegistered")
bool? IsRegistered;
ConnectedContactAddressModel({this.FullAddress,this.IsPrimary,this.IsPostal,this.IsRegistered});
ConnectedContactAddressModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FullAddress = json['FullAddress'];
IsPrimary = json['IsPrimary'];
IsPostal = json['IsPostal'];
IsRegistered = json['IsRegistered'];
return this;
}
Map<String, dynamic> toJson() => {
'FullAddress': FullAddress,
'IsPrimary': IsPrimary,
'IsPostal': IsPostal,
'IsRegistered': IsRegistered
};
getTypeName() => "ConnectedContactAddressModel";
TypeContext? context = _ctx;
}
class ConnectedContactConnectionsModel implements IConvertible
{
/**
* Guid of the role within Eros
*/
// @ApiMember(DataType="Guid", Description="Guid of the role within Eros", Name="RoleId")
String? RoleId;
/**
* Name of the role this contact is connected to the licensee with.
*/
// @ApiMember(DataType="string", Description="Name of the role this contact is connected to the licensee with.", Name="Role")
String? Role;
/**
* Guid of the role connections status within Eros.
*/
// @ApiMember(DataType="Guid", Description="Guid of the role connections status within Eros.", Name="StatusId")
String? StatusId;
/**
* Connection status of the role. It maybe active or pending.
*/
// @ApiMember(DataType="string", Description="Connection status of the role. It maybe active or pending.", Name="Status")
String? Status;
ConnectedContactConnectionsModel({this.RoleId,this.Role,this.StatusId,this.Status});
ConnectedContactConnectionsModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RoleId = json['RoleId'];
Role = json['Role'];
StatusId = json['StatusId'];
Status = json['Status'];
return this;
}
Map<String, dynamic> toJson() => {
'RoleId': RoleId,
'Role': Role,
'StatusId': StatusId,
'Status': Status
};
getTypeName() => "ConnectedContactConnectionsModel";
TypeContext? context = _ctx;
}
class ContactLinkedCustomerProjectsModel implements IConvertible
{
/**
* Guid of the project within Eros.
*/
// @ApiMember(DataType="Guid", Description="Guid of the project within Eros.", Name="ProjectId")
String? ProjectId;
/**
* Name of the project.
*/
// @ApiMember(DataType="string", Description="Name of the project.", Name="Name")
String? Name;
ContactLinkedCustomerProjectsModel({this.ProjectId,this.Name});
ContactLinkedCustomerProjectsModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectId = json['ProjectId'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'ProjectId': ProjectId,
'Name': Name
};
getTypeName() => "ContactLinkedCustomerProjectsModel";
TypeContext? context = _ctx;
}
class ConnectedContactSubscriptionsModel implements IConvertible
{
/**
* Guid of the datasource within Eros.
*/
// @ApiMember(DataType="Guid", Description="Guid of the datasource within Eros.", Name="DatasourceId")
String? DatasourceId;
/**
* Name of the datasource that is the external system with a record of this contact.
*/
// @ApiMember(DataType="string", Description="Name of the datasource that is the external system with a record of this contact.", Name="Datasource")
String? Datasource;
/**
* Foreign Key lookup of this contact in the external system the datasource represents.
*/
// @ApiMember(DataType="string", Description="Foreign Key lookup of this contact in the external system the datasource represents.", Name="AlternateKey")
String? AlternateKey;
ConnectedContactSubscriptionsModel({this.DatasourceId,this.Datasource,this.AlternateKey});
ConnectedContactSubscriptionsModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DatasourceId = json['DatasourceId'];
Datasource = json['Datasource'];
AlternateKey = json['AlternateKey'];
return this;
}
Map<String, dynamic> toJson() => {
'DatasourceId': DatasourceId,
'Datasource': Datasource,
'AlternateKey': AlternateKey
};
getTypeName() => "ConnectedContactSubscriptionsModel";
TypeContext? context = _ctx;
}
class ConnectedContactModel implements IConvertible
{
/**
* Guid of the contact object within Eros.
*/
// @ApiMember(DataType="Guid", Description="Guid of the contact object within Eros.", Name="ContactId")
String? ContactId;
/**
* The salutation(preferred name) for the contact. Applies to a person contact type.
*/
// @ApiMember(DataType="string", Description="The salutation(preferred name) for the contact. Applies to a person contact type.", Name="Salutation")
String? Salutation;
/**
* The title for the contact. Applies to a person contact type.
*/
// @ApiMember(DataType="string", Description="The title for the contact. Applies to a person contact type.", Name="Title")
String? Title;
/**
* The first given name for the contact. Applies to a person contact type.
*/
// @ApiMember(DataType="string", Description="The first given name for the contact. Applies to a person contact type.", Name="FirstName")
String? FirstName;
/**
* Any middle names for the contact. Applies to a person contact type.
*/
// @ApiMember(DataType="string", Description="Any middle names for the contact. Applies to a person contact type.", Name="MiddleName")
String? MiddleName;
/**
* The surname for the contact. Applies to a person contact type.
*/
// @ApiMember(DataType="string", Description="The surname for the contact. Applies to a person contact type.", Name="Surname")
String? Surname;
/**
* The full name for the contact.
*/
// @ApiMember(DataType="string", Description="The full name for the contact.", Name="FullName")
String? FullName;
/**
* A legal name for the contact. Applies to an organisation contact type.
*/
// @ApiMember(DataType="string", Description="A legal name for the contact. Applies to an organisation contact type.", Name="LegalName")
String? LegalName;
/**
* A trading name for the contact. Applies to an organisation contact type.
*/
// @ApiMember(DataType="string", Description="A trading name for the contact. Applies to an organisation contact type.", Name="TradingName")
String? TradingName;
/**
* The birth date for the contact. Applies to a person contact type.
*/
// @ApiMember(DataType="DateTime?", Description="The birth date for the contact. Applies to a person contact type.", Name="BirthDate")
DateTime? BirthDate;
/**
* Guid of the marital status within Eros.
*/
// @ApiMember(DataType="Guid?", Description="Guid of the marital status within Eros.", Name="MaritalStatusId")
String? MaritalStatusId;
/**
* The contacts marital status if set.
*/
// @ApiMember(DataType="string", Description="The contacts marital status if set.", Name="MaritalStatusName")
String? MaritalStatusName;
/**
* Guid of the gender within Eros.
*/
// @ApiMember(DataType="Guid?", Description="Guid of the gender within Eros.", Name="GenderId")
String? GenderId;
/**
* The contacts gender if set.
*/
// @ApiMember(DataType="string", Description="The contacts gender if set.", Name="GenderName")
String? GenderName;
/**
* Preferred language of the contact.
*/
// @ApiMember(DataType="string", Description="Preferred language of the contact.", Name="Language")
String? Language;
/**
* If true, the contact requires an interpreter.
*/
// @ApiMember(DataType="bool", Description="If true, the contact requires an interpreter.", Name="InterpreterRequired")
bool? InterpreterRequired;
/**
* Contact Type name of the contact.
*/
// @ApiMember(DataType="string", Description="Contact Type name of the contact.", Name="ContactTypeName")
String? ContactTypeName;
/**
* Guid of the Contact Type List Item object within Eros.
*/
// @ApiMember(DataType="Guid", Description="Guid of the Contact Type List Item object within Eros.", Name="ContactTypeId")
String? ContactTypeId;
/**
* Description of the contact for their external profile.
*/
// @ApiMember(DataType="string", Description="Description of the contact for their external profile.", Name="Description")
String? Description;
/**
* Contact 'Profession/Trade/Industry' details for their external profile.
*/
// @ApiMember(DataType="string", Description="Contact 'Profession/Trade/Industry' details for their external profile.", Name="EmploymentIndustry")
String? EmploymentIndustry;
/**
* Contact 'Working/Subcontracting for' details for their external profile.
*/
// @ApiMember(DataType="string", Description="Contact 'Working/Subcontracting for' details for their external profile.", Name="EmploymentRole")
String? EmploymentRole;
/**
* Contact 'Work Area/Suburbs' detail for their external profile.
*/
// @ApiMember(DataType="string", Description="Contact 'Work Area/Suburbs' detail for their external profile.", Name="EmploymentGeographicArea")
String? EmploymentGeographicArea;
/**
* The A.B.N for the contact.
*/
// @ApiMember(DataType="string", Description="The A.B.N for the contact.", Name="Abn")
String? Abn;
/**
* The A.C.N for the contact.
*/
// @ApiMember(DataType="string", Description="The A.C.N for the contact.", Name="Acn")
String? Acn;
/**
* The A.R.B.N for the contact.
*/
// @ApiMember(DataType="string", Description="The A.R.B.N for the contact.", Name="Arbn")
String? Arbn;
/**
* Timezone name that applies to the contact.
*/
// @ApiMember(DataType="string", Description="Timezone name that applies to the contact.", Name="TimezoneName")
String? TimezoneName;
/**
* A list of the contact details for the contact.
*/
// @ApiMember(DataType="List<ConnectedContactDetailModel>", Description="A list of the contact details for the contact.", Name="ContactDetails")
List<ConnectedContactDetailModel>? ContactDetails;
/**
* A list of the contact addresses for the contact
*/
// @ApiMember(DataType="List<ConnectedContactAddressModel>", Description="A list of the contact addresses for the contact", Name="ContactAddresses")
List<ConnectedContactAddressModel>? ContactAddresses;
/**
* True if this contact has at least 1 active connection to the licensee. Without an active connection only public profile information for the contact is returned.
*/
// @ApiMember(DataType="bool", Description="True if this contact has at least 1 active connection to the licensee. Without an active connection only public profile information for the contact is returned.", Name="IsContactConnected")
bool? IsContactConnected;
/**
* A list of connections this contact has with the licensee. May be active or a pending request to connect.
*/
// @ApiMember(DataType="List<ConnectedContactConnectionsModel>", Description="A list of connections this contact has with the licensee. May be active or a pending request to connect.", Name="Connections")
List<ConnectedContactConnectionsModel>? Connections;
/**
* A list of projects this contact is linked to as a customer.
*/
// @ApiMember(DataType="List<ContactLinkedCustomerProjectsModel>", Description="A list of projects this contact is linked to as a customer.", Name="Projects")
List<ContactLinkedCustomerProjectsModel>? Projects;
/**
* A list of integration subscriptions used to link this contact to external records in other licensee owned systems.
*/
// @ApiMember(DataType="List<ConnectedContactSubscriptionsModel>", Description="A list of integration subscriptions used to link this contact to external records in other licensee owned systems.", Name="Subscriptions")
List<ConnectedContactSubscriptionsModel>? Subscriptions;
ConnectedContactModel({this.ContactId,this.Salutation,this.Title,this.FirstName,this.MiddleName,this.Surname,this.FullName,this.LegalName,this.TradingName,this.BirthDate,this.MaritalStatusId,this.MaritalStatusName,this.GenderId,this.GenderName,this.Language,this.InterpreterRequired,this.ContactTypeName,this.ContactTypeId,this.Description,this.EmploymentIndustry,this.EmploymentRole,this.EmploymentGeographicArea,this.Abn,this.Acn,this.Arbn,this.TimezoneName,this.ContactDetails,this.ContactAddresses,this.IsContactConnected,this.Connections,this.Projects,this.Subscriptions});
ConnectedContactModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContactId = json['ContactId'];
Salutation = json['Salutation'];
Title = json['Title'];
FirstName = json['FirstName'];
MiddleName = json['MiddleName'];
Surname = json['Surname'];
FullName = json['FullName'];
LegalName = json['LegalName'];
TradingName = json['TradingName'];
BirthDate = JsonConverters.fromJson(json['BirthDate'],'DateTime',context!);
MaritalStatusId = json['MaritalStatusId'];
MaritalStatusName = json['MaritalStatusName'];
GenderId = json['GenderId'];
GenderName = json['GenderName'];
Language = json['Language'];
InterpreterRequired = json['InterpreterRequired'];
ContactTypeName = json['ContactTypeName'];
ContactTypeId = json['ContactTypeId'];
Description = json['Description'];
EmploymentIndustry = json['EmploymentIndustry'];
EmploymentRole = json['EmploymentRole'];
EmploymentGeographicArea = json['EmploymentGeographicArea'];
Abn = json['Abn'];
Acn = json['Acn'];
Arbn = json['Arbn'];
TimezoneName = json['TimezoneName'];
ContactDetails = JsonConverters.fromJson(json['ContactDetails'],'List<ConnectedContactDetailModel>',context!);
ContactAddresses = JsonConverters.fromJson(json['ContactAddresses'],'List<ConnectedContactAddressModel>',context!);
IsContactConnected = json['IsContactConnected'];
Connections = JsonConverters.fromJson(json['Connections'],'List<ConnectedContactConnectionsModel>',context!);
Projects = JsonConverters.fromJson(json['Projects'],'List<ContactLinkedCustomerProjectsModel>',context!);
Subscriptions = JsonConverters.fromJson(json['Subscriptions'],'List<ConnectedContactSubscriptionsModel>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ContactId': ContactId,
'Salutation': Salutation,
'Title': Title,
'FirstName': FirstName,
'MiddleName': MiddleName,
'Surname': Surname,
'FullName': FullName,
'LegalName': LegalName,
'TradingName': TradingName,
'BirthDate': JsonConverters.toJson(BirthDate,'DateTime',context!),
'MaritalStatusId': MaritalStatusId,
'MaritalStatusName': MaritalStatusName,
'GenderId': GenderId,
'GenderName': GenderName,
'Language': Language,
'InterpreterRequired': InterpreterRequired,
'ContactTypeName': ContactTypeName,
'ContactTypeId': ContactTypeId,
'Description': Description,
'EmploymentIndustry': EmploymentIndustry,
'EmploymentRole': EmploymentRole,
'EmploymentGeographicArea': EmploymentGeographicArea,
'Abn': Abn,
'Acn': Acn,
'Arbn': Arbn,
'TimezoneName': TimezoneName,
'ContactDetails': JsonConverters.toJson(ContactDetails,'List<ConnectedContactDetailModel>',context!),
'ContactAddresses': JsonConverters.toJson(ContactAddresses,'List<ConnectedContactAddressModel>',context!),
'IsContactConnected': IsContactConnected,
'Connections': JsonConverters.toJson(Connections,'List<ConnectedContactConnectionsModel>',context!),
'Projects': JsonConverters.toJson(Projects,'List<ContactLinkedCustomerProjectsModel>',context!),
'Subscriptions': JsonConverters.toJson(Subscriptions,'List<ConnectedContactSubscriptionsModel>',context!)
};
getTypeName() => "ConnectedContactModel";
TypeContext? context = _ctx;
}
// @ApiResponse(Description="List of Contacts")
class GetLicenseeContactListResponse implements IConvertible
{
/**
* List of contacts.
*/
// @ApiMember(DataType="List<ConnectedContactModel>", Description="List of contacts.", Name="Contacts")
List<ConnectedContactModel>? Contacts;
/**
* Details of the api response. Success/Fail.
*/
// @ApiMember(DataType="ResponseStatus", Description="Details of the api response. Success/Fail.", Name="ResponseStatus")
ResponseStatus? ResponseStatus;
GetLicenseeContactListResponse({this.Contacts,this.ResponseStatus});
GetLicenseeContactListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Contacts = JsonConverters.fromJson(json['Contacts'],'List<ConnectedContactModel>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Contacts': JsonConverters.toJson(Contacts,'List<ConnectedContactModel>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetLicenseeContactListResponse";
TypeContext? context = _ctx;
}
/**
* Returns a list of contacts a licensee is linked to. Contacts are returned in batches.
*/
// @Api(Description="Returns a list of contacts a licensee is linked to. Contacts are returned in batches.")
class GetLicenseeContactList implements IConvertible
{
/**
* Number of contacts to retrieve per call.
*/
// @ApiMember(DataType="int", Description="Number of contacts to retrieve per call.", IsRequired=true, Name="BatchSize")
int? BatchSize;
/**
* Call number (1=1st, 2=2nd) this should progress upwards until all contacts have been retrieved.
*/
// @ApiMember(DataType="int", Description="Call number (1=1st, 2=2nd) this should progress upwards until all contacts have been retrieved.", IsRequired=true, Name="BatchNumber")
int? BatchNumber;
GetLicenseeContactList({this.BatchSize,this.BatchNumber});
GetLicenseeContactList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BatchSize = json['BatchSize'];
BatchNumber = json['BatchNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'BatchSize': BatchSize,
'BatchNumber': BatchNumber
};
getTypeName() => "GetLicenseeContactList";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'production_eros_platform_apisubscription.azurewebsites.net', types: <String, TypeInfo> {
'ConnectedContactDetailModel': TypeInfo(TypeOf.Class, create:() => ConnectedContactDetailModel()),
'ConnectedContactAddressModel': TypeInfo(TypeOf.Class, create:() => ConnectedContactAddressModel()),
'ConnectedContactConnectionsModel': TypeInfo(TypeOf.Class, create:() => ConnectedContactConnectionsModel()),
'ContactLinkedCustomerProjectsModel': TypeInfo(TypeOf.Class, create:() => ContactLinkedCustomerProjectsModel()),
'ConnectedContactSubscriptionsModel': TypeInfo(TypeOf.Class, create:() => ConnectedContactSubscriptionsModel()),
'ConnectedContactModel': TypeInfo(TypeOf.Class, create:() => ConnectedContactModel()),
'List<ConnectedContactDetailModel>': TypeInfo(TypeOf.Class, create:() => <ConnectedContactDetailModel>[]),
'List<ConnectedContactAddressModel>': TypeInfo(TypeOf.Class, create:() => <ConnectedContactAddressModel>[]),
'List<ConnectedContactConnectionsModel>': TypeInfo(TypeOf.Class, create:() => <ConnectedContactConnectionsModel>[]),
'List<ContactLinkedCustomerProjectsModel>': TypeInfo(TypeOf.Class, create:() => <ContactLinkedCustomerProjectsModel>[]),
'List<ConnectedContactSubscriptionsModel>': TypeInfo(TypeOf.Class, create:() => <ConnectedContactSubscriptionsModel>[]),
'GetLicenseeContactListResponse': TypeInfo(TypeOf.Class, create:() => GetLicenseeContactListResponse()),
'List<ConnectedContactModel>': TypeInfo(TypeOf.Class, create:() => <ConnectedContactModel>[]),
'GetLicenseeContactList': TypeInfo(TypeOf.Class, create:() => GetLicenseeContactList()),
});
Dart GetLicenseeContactList DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/licensee/contacts HTTP/1.1 Host: production-eros-platform-apisubscription.azurewebsites.net Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Contacts":[{"Salutation":"String","Title":"String","FirstName":"String","MiddleName":"String","Surname":"String","FullName":"String","LegalName":"String","TradingName":"String","BirthDate":"0001-01-01T00:00:00.0000000","MaritalStatusId":"00000000-0000-0000-0000-000000000000","MaritalStatusName":"String","GenderId":"00000000-0000-0000-0000-000000000000","GenderName":"String","Language":"String","InterpreterRequired":false,"ContactTypeName":"String","Description":"String","EmploymentIndustry":"String","EmploymentRole":"String","EmploymentGeographicArea":"String","Abn":"String","Acn":"String","Arbn":"String","TimezoneName":"String","ContactDetails":[{"Type":"String","ContactDetails":"String"}],"ContactAddresses":[{"FullAddress":"String","IsPrimary":false,"IsPostal":false,"IsRegistered":false}],"IsContactConnected":false,"Connections":[{"Role":"String","Status":"String"}],"Projects":[{"Name":"String"}],"Subscriptions":[{"Datasource":"String","AlternateKey":"String"}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}