Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Subtle.Canvara.WebAPIModel.ServiceModelSubscription
Imports Eros.Saguna.Common.WebAPI.ServiceModel
Imports Eros.Causal.Common.Entity
Namespace Global
Namespace Eros.Causal.Common.Entity
Public Partial Class ContactsStaff
Public Overridable Property ContactId As Guid
Public Overridable Property ContactStaffId As Guid
End Class
End Namespace
Namespace Eros.Saguna.Common.WebAPI.ServiceModel
Public Partial Class AddressModel
'''<Summary>
'''The distance between this project and another specified set of gps coordinates.
'''</Summary>
<ApiMember(DataType:="double", Description:="The distance between this project and another specified set of gps coordinates.", Name:="DistanceAway", ParameterType:="query")>
Public Overridable Property DistanceAway As Double
'''<Summary>
'''The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.", IsRequired:=true, Name:="Latitude", ParameterType:="query")>
Public Overridable Property Latitude As Double
'''<Summary>
'''The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.", IsRequired:=true, Name:="Longitude", ParameterType:="query")>
Public Overridable Property Longitude As Double
'''<Summary>
'''Address Format Id Guid - this will be determined by the service.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Address Format Id Guid - this will be determined by the service.", Name:="AddressFormatId", ParameterType:="query")>
Public Overridable Property AddressFormatId As Guid
'''<Summary>
'''Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered.", Name:="SuburbId", ParameterType:="query")>
Public Overridable Property SuburbId As Guid
'''<Summary>
'''The suburb name.
'''</Summary>
<ApiMember(DataType:="string", Description:="The suburb name.", Name:="SuburbName", ParameterType:="query")>
Public Overridable Property SuburbName As String
'''<Summary>
'''The shortened State Name e.g Vic for Victoria.
'''</Summary>
<ApiMember(DataType:="string", Description:="The shortened State Name e.g Vic for Victoria.", Name:="StateShortName", ParameterType:="query")>
Public Overridable Property StateShortName As String
'''<Summary>
'''The suburb postcode.
'''</Summary>
<ApiMember(DataType:="string", Description:="The suburb postcode.", Name:="PostCode", ParameterType:="query")>
Public Overridable Property PostCode As String
'''<Summary>
'''Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered.", Name:="CountryId", ParameterType:="query")>
Public Overridable Property CountryId As Guid
'''<Summary>
'''the name of the country the address is within.
'''</Summary>
<ApiMember(DataType:="string", Description:="the name of the country the address is within.", Name:="CountryName", ParameterType:="query")>
Public Overridable Property CountryName As String
'''<Summary>
'''A 2 digit ISO Country Code representing the country.
'''</Summary>
<ApiMember(DataType:="string", Description:="A 2 digit ISO Country Code representing the country.", Name:="ISOCountryCode", ParameterType:="query")>
Public Overridable Property ISOCountryCode As String
'''<Summary>
'''The address Lot number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The address Lot number.", Name:="LotNumber", ParameterType:="query")>
Public Overridable Property LotNumber As String
'''<Summary>
'''The address Sub Unit number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The address Sub Unit number.", Name:="SubUnit", ParameterType:="query")>
Public Overridable Property SubUnit As String
'''<Summary>
'''The address building number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The address building number.", Name:="BuildingNumber", ParameterType:="query")>
Public Overridable Property BuildingNumber As String
'''<Summary>
'''The address street number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The address street number.", Name:="StreetNumber", ParameterType:="query")>
Public Overridable Property StreetNumber As String
'''<Summary>
'''The address street name including street type.
'''</Summary>
<ApiMember(DataType:="string", Description:="The address street name including street type.", Name:="StreetName", ParameterType:="query")>
Public Overridable Property StreetName As String
'''<Summary>
'''A formatted address Line 1.
'''</Summary>
<ApiMember(DataType:="string", Description:="A formatted address Line 1.", Name:="AddressLineOne", ParameterType:="query")>
Public Overridable Property AddressLineOne As String
'''<Summary>
'''A formatted address Line 2.
'''</Summary>
<ApiMember(DataType:="string", Description:="A formatted address Line 2.", Name:="AddressLineTwo", ParameterType:="query")>
Public Overridable Property AddressLineTwo As String
'''<Summary>
'''The full address string.
'''</Summary>
<ApiMember(DataType:="string", Description:="The full address string.", Name:="AddressFull", ParameterType:="query")>
Public Overridable Property AddressFull As String
'''<Summary>
'''True if the address is a physical location.
'''</Summary>
<ApiMember(DataType:="bool?", Description:="True if the address is a physical location.", Name:="IsPhysical", ParameterType:="query")>
Public Overridable Property IsPhysical As Boolean?
'''<Summary>
'''Notes about the address.
'''</Summary>
<ApiMember(DataType:="string", Description:="Notes about the address.", Name:="Notes", ParameterType:="query")>
Public Overridable Property Notes As String
'''<Summary>
'''If true, the address is eligible for having its coordinates calculated/updated.
'''</Summary>
<ApiMember(DataType:="bool?", Description:="If true, the address is eligible for having its coordinates calculated/updated.", Name:="AutoMapCoordinates", ParameterType:="query")>
Public Overridable Property AutoMapCoordinates As Boolean?
'''<Summary>
'''Location Coordinates for the address.
'''</Summary>
<ApiMember(DataType:="LocationCoordinates", Description:="Location Coordinates for the address.", Name:="LocationCoordinates", ParameterType:="query")>
Public Overridable Property LocationCoordinates As LocationCoordinatesModel
End Class
Public Partial Class ContactAddressModel
Public Overridable Property Address As AddressModel
Public Overridable Property IsPostal As Boolean
Public Overridable Property IsPrimaryLocation As Boolean
Public Overridable Property IsRegisteredLocation As Boolean
Public Overridable Property SuburbName As String
Public Overridable Property StateName As String
Public Overridable Property CountryName As String
End Class
Public Partial Class ContactDetailModel
Public Overridable Property ContactMethodId As Guid
Public Overridable Property ContactMethodName As String
Public Overridable Property ContactAddress As ContactAddressModel
Public Overridable Property ContactPhone As PhoneModel
Public Overridable Property CountryId As Guid?
Public Overridable Property ContactDetails As String
Public Overridable Property Notes As String
Public Overridable Property ContactDetailsCode As String
Public Overridable Property OrderContactMethod As Integer
Public Overridable Property IsPrimaryContactMethod As Boolean
Public Overridable Property IsAddress As Boolean
End Class
Public Partial Class ContactRole
'''<Summary>
'''Guid of the Role List Item object within Eros.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid of the Role List Item object within Eros.", IsRequired:=true, Name:="RoleId", ParameterType:="query")>
Public Overridable Property RoleId As Guid
'''<Summary>
'''The unique key that represents the role type on the external system.
'''</Summary>
<ApiMember(DataType:="string", Description:="The unique key that represents the role type on the external system.", Name:="AlternateKey", ParameterType:="query")>
Public Overridable Property AlternateKey As String
End Class
Public Partial Class GetContactsModel
'''<Summary>
'''List of Contacts with details.
'''</Summary>
<ApiMember(DataType:="string", Description:="List of Contacts with details.", IsRequired:=true, Name:="Contacts", ParameterType:="query")>
Public Overridable Property Contacts As IList(Of SubscriptionContactModel)
'''<Summary>
'''List of contact-staff details.
'''</Summary>
<ApiMember(DataType:="string", Description:="List of contact-staff details.", IsRequired:=true, Name:="ContactStaff", ParameterType:="query")>
Public Overridable Property ContactStaff As IList(Of ContactsStaff)
End Class
Public Partial Class LocationCoordinatesModel
'''<Summary>
'''The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.", IsRequired:=true, Name:="Latitude", ParameterType:="query")>
Public Overridable Property Latitude As Double
'''<Summary>
'''The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.", IsRequired:=true, Name:="Longitude", ParameterType:="query")>
Public Overridable Property Longitude As Double
'''<Summary>
'''The altitude of an address - the altitude above sea level.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="The altitude of an address - the altitude above sea level.", Name:="Altitude", ParameterType:="query")>
Public Overridable Property Altitude As Double?
'''<Summary>
'''Accuracy of the latitude and longitude.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="Accuracy of the latitude and longitude.", Name:="Accuracy", ParameterType:="query")>
Public Overridable Property Accuracy As Double?
'''<Summary>
'''Accurancy of the Altitude.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="Accurancy of the Altitude.", Name:="AltitudeAccuracy", ParameterType:="query")>
Public Overridable Property AltitudeAccuracy As Double?
'''<Summary>
'''Direction you are heading.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="Direction you are heading.", Name:="Heading", ParameterType:="query")>
Public Overridable Property Heading As Double?
'''<Summary>
'''Speed you are going.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="Speed you are going.", Name:="Speed", ParameterType:="query")>
Public Overridable Property Speed As Double?
'''<Summary>
'''Speed your altitude is ascending/descending at.
'''</Summary>
<ApiMember(DataType:="Double?", Description:="Speed your altitude is ascending/descending at.", Name:="VerticalSpeed", ParameterType:="query")>
Public Overridable Property VerticalSpeed As Double?
End Class
Public Partial Class PhoneModel
Public Overridable Property CountryCode As String
Public Overridable Property AreaCode As String
Public Overridable Property LocalNumber As String
End Class
Public Partial Class SubscriptionContactModel
'''<Summary>
'''Guid of the contact object within Eros.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid of the contact object within Eros.", Name:="ContactId", ParameterType:="query")>
Public Overridable Property ContactId As Guid
'''<Summary>
'''Guid of the Contact Type List Item object within Eros.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid of the Contact Type List Item object within Eros.", IsRequired:=true, Name:="ContactType", ParameterType:="query")>
Public Overridable Property ContactType As Guid
'''<Summary>
'''Guid of the Marital Status List Item object within Eros.
'''</Summary>
<ApiMember(DataType:="Guid?", Description:="Guid of the Marital Status List Item object within Eros.", Name:="MaritalStatus", ParameterType:="query")>
Public Overridable Property MaritalStatus As Guid?
'''<Summary>
'''Guid of the Gender List Item object within Eros.
'''</Summary>
<ApiMember(DataType:="Guid?", Description:="Guid of the Gender List Item object within Eros.", Name:="Gender", ParameterType:="query")>
Public Overridable Property Gender As Guid?
'''<Summary>
'''The first given name for the contact. Applies to a person contact type.
'''</Summary>
<ApiMember(DataType:="string", Description:="The first given name for the contact. Applies to a person contact type.", Name:="FirstName", ParameterType:="query")>
Public Overridable Property FirstName As String
'''<Summary>
'''The middle name(s) for the contact. Applies to a person contact type.
'''</Summary>
<ApiMember(DataType:="string", Description:="The middle name(s) for the contact. Applies to a person contact type.", Name:="MiddleName", ParameterType:="query")>
Public Overridable Property MiddleName As String
'''<Summary>
'''The surname for the contact. Applies to a person contact type.
'''</Summary>
<ApiMember(DataType:="string", Description:="The surname for the contact. Applies to a person contact type.", Name:="Surname", ParameterType:="query")>
Public Overridable Property Surname As String
'''<Summary>
'''The full name for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="The full name for the contact.", Name:="FullName", ParameterType:="query")>
Public Overridable Property FullName As String
'''<Summary>
'''A short name for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="A short name for the contact.", Name:="ShortName", ParameterType:="query")>
Public Overridable Property ShortName As String
'''<Summary>
'''The birth date for the contact. Applies to a person contact type.
'''</Summary>
<ApiMember(DataType:="DateTime?", Description:="The birth date for the contact. Applies to a person contact type.", Name:="BirthDate", ParameterType:="query")>
Public Overridable Property BirthDate As Date?
'''<Summary>
'''The title for the contact. Applies to a person contact type.
'''</Summary>
<ApiMember(DataType:="string", Description:="The title for the contact. Applies to a person contact type.", Name:="Title", ParameterType:="query")>
Public Overridable Property Title As String
'''<Summary>
'''A salutation for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="A salutation for the contact.", Name:="Salutation", ParameterType:="query")>
Public Overridable Property Salutation As String
'''<Summary>
'''The A.B.N for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="The A.B.N for the contact.", Name:="Abn", ParameterType:="query")>
Public Overridable Property Abn As String
'''<Summary>
'''The A.C.N for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="The A.C.N for the contact.", Name:="Acn", ParameterType:="query")>
Public Overridable Property Acn As String
'''<Summary>
'''The A.R.B.N for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="The A.R.B.N for the contact.", Name:="Arbn", ParameterType:="query")>
Public Overridable Property Arbn As String
'''<Summary>
'''A trading name for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="A trading name for the contact.", Name:="TradingName", ParameterType:="query")>
Public Overridable Property TradingName As String
'''<Summary>
'''A legal name for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="A legal name for the contact.", Name:="LegalName", ParameterType:="query")>
Public Overridable Property LegalName As String
'''<Summary>
'''Any notes/description for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="Any notes/description for the contact.", Name:="Notes", ParameterType:="query")>
Public Overridable Property Notes As String
'''<Summary>
'''Contact Employment Industry.
'''</Summary>
<ApiMember(DataType:="string", Description:="Contact Employment Industry.", Name:="EmploymentIndustry", ParameterType:="query")>
Public Overridable Property EmploymentIndustry As String
'''<Summary>
'''Contact Employment Role.
'''</Summary>
<ApiMember(DataType:="string", Description:="Contact Employment Role.", Name:="EmploymentRole", ParameterType:="query")>
Public Overridable Property EmploymentRole As String
'''<Summary>
'''Contact Employment Geographic Area.
'''</Summary>
<ApiMember(DataType:="string", Description:="Contact Employment Geographic Area.", Name:="EmploymentGeographicArea", ParameterType:="query")>
Public Overridable Property EmploymentGeographicArea As String
'''<Summary>
'''The Contacts Drivers Licence Number
'''</Summary>
<ApiMember(DataType:="string", Description:="The Contacts Drivers Licence Number", Name:="DriversLicence", ParameterType:="query")>
Public Overridable Property DriversLicence As String
'''<Summary>
'''Indicates if the Contact is registered for GST
'''</Summary>
<ApiMember(DataType:="bool", Description:="Indicates if the Contact is registered for GST", Name:="GstRegistered", ParameterType:="query")>
Public Overridable Property GstRegistered As Boolean
'''<Summary>
'''The status of the contact in EROS
'''</Summary>
<ApiMember(DataType:="string", Description:="The status of the contact in EROS", Name:="RecordStatus", ParameterType:="query")>
Public Overridable Property RecordStatus As String
'''<Summary>
'''A list of roles this contact has.
'''</Summary>
<ApiMember(DataType:="List<ContactRole>", Description:="A list of roles this contact has.", IsRequired:=true, Name:="ContactRoles", ParameterType:="query")>
Public Overridable Property ContactRoles As List(Of ContactRole) = New List(Of ContactRole)
'''<Summary>
'''A list of the contact details for the contact.
'''</Summary>
<ApiMember(DataType:="List<ContactDetailModel>", Description:="A list of the contact details for the contact.", IsRequired:=true, Name:="ContactDetails", ParameterType:="query")>
Public Overridable Property ContactDetails As List(Of ContactDetailModel) = New List(Of ContactDetailModel)
'''<Summary>
'''Custom Content XML for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="Custom Content XML for the contact.", Name:="CustomContentXML", ParameterType:="query")>
Public Overridable Property CustomContentXML As String
Public Overridable Property BlobImageURLPrimary As String
Public Overridable Property BlobImageURLPrimaryThumbnail As String
'''<Summary>
'''The primary mobile for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="The primary mobile for the contact.", Name:="PrimaryMobile", ParameterType:="query")>
Public Overridable Property PrimaryMobile As String
'''<Summary>
'''The primary email for the contact.
'''</Summary>
<ApiMember(DataType:="string", Description:="The primary email for the contact.", Name:="PrimaryEmail", ParameterType:="query")>
Public Overridable Property PrimaryEmail As String
End Class
End Namespace
Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModelSubscription
'''<Summary>
'''Returns a list of contacts with specified roles. There are options to include custom and also to include each contacts connected contacts
'''</Summary>
<Api(Description:="Returns a list of contacts with specified roles. There are options to include custom and also to include each contacts connected contacts")>
Public Partial Class GetContacts
'''<Summary>
'''Guid representing the external system datasource requesting the contact information. This is required to return any existing object subscription details for each contact.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid representing the external system datasource requesting the contact information. This is required to return any existing object subscription details for each contact.", IsRequired:=true, Name:="SuiteDataSourceInstanceId", ParameterType:="query")>
Public Overridable Property SuiteDataSourceInstanceId As Guid
'''<Summary>
'''A list of 1 or more roles that a contact must have in order to be returned. (Roles are treated as OR not AND, ie a contact may have one or the other to be returned, but not necessarily both)
'''</Summary>
<ApiMember(DataType:="List<Guid>", Description:="A list of 1 or more roles that a contact must have in order to be returned. (Roles are treated as OR not AND, ie a contact may have one or the other to be returned, but not necessarily both)", IsRequired:=true, Name:="ContactRoles", ParameterType:="query")>
Public Overridable Property ContactRoles As List(Of Guid) = New List(Of Guid)
'''<Summary>
'''A list of contact types that we want returned. If no contact types are specified all 4 major contact types are eligible to be returned. (organisation/person - real/virtual)
'''</Summary>
<ApiMember(DataType:="List<Guid>", Description:="A list of contact types that we want returned. If no contact types are specified all 4 major contact types are eligible to be returned. (organisation/person - real/virtual)", Name:="ContactTypes", ParameterType:="query")>
Public Overridable Property ContactTypes As List(Of Guid)
'''<Summary>
'''Set to true if you want to include the any linked staff for each contact.
'''</Summary>
<ApiMember(DataType:="bool", Description:="Set to true if you want to include the any linked staff for each contact.", IsRequired:=true, Name:="IncludeStaff", ParameterType:="query")>
Public Overridable Property IncludeStaff As Boolean
'''<Summary>
'''To include custom content then you need to specify the view Id of the content to include.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="To include custom content then you need to specify the view Id of the content to include.", Name:="CustomContentViewId", ParameterType:="query")>
Public Overridable Property CustomContentViewId As Guid
'''<Summary>
'''Set the date to return only contacts that have been modified since a particular date.
'''</Summary>
<ApiMember(DataType:="DateTime", Description:="Set the date to return only contacts that have been modified since a particular date.", Name:="ModifiedSince", ParameterType:="query")>
Public Overridable Property ModifiedSince As Date
End Class
End Namespace
End Namespace
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 /json/reply/GetContacts HTTP/1.1
Host: production-eros-platform-apisubscription.azurewebsites.net
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ContactRoles":["00000000-0000-0000-0000-000000000000"],"ContactTypes":["00000000-0000-0000-0000-000000000000"],"IncludeStaff":false,"ModifiedSince":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {}