POST,GET | /api/Member/GetMember |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubManager.Interfaces.Models.Member;
using ClubManager.Interfaces.Models.Message;
namespace ClubManager.Interfaces.Models.Member
{
public enum ExternalStatus
{
Off,
Active,
Pending,
CancelledInsideContract,
CancelledOutsideContract,
WithDebtRecovery,
Suspended,
}
public enum Gender
{
Unknown,
Male,
Female,
Other,
PreferNotToSay,
}
public partial class Member
{
public virtual int MemberId { get; set; }
public virtual int BranchId { get; set; }
public virtual string MembershipNumber { get; set; }
public virtual DateTime? JoinedDate { get; set; }
public virtual string CardNumber { get; set; }
public virtual string CompanyName { get; set; }
public virtual Gender Gender { get; set; }
public virtual string GenderName { get; set; }
public virtual string FullName { get; set; }
public virtual string Title { get; set; }
public virtual string Forenames { get; set; }
public virtual string Surname { get; set; }
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string County { get; set; }
public virtual string City { get; set; }
public virtual string HomePhone { get; set; }
public virtual string MobilePhone { get; set; }
public virtual string EmailAddress { get; set; }
public virtual string ExternalReference { get; set; }
public virtual string Country { get; set; }
public virtual bool EmailOptOut { get; set; }
public virtual bool SmsOptOut { get; set; }
public virtual bool PhoneOptOut { get; set; }
public virtual bool LetterOptOut { get; set; }
public virtual bool UseExternalStatus { get; set; }
public virtual ExternalStatus ExternalStatus { get; set; }
public virtual DateTime? DateOfBirth { get; set; }
public virtual string Postcode { get; set; }
public virtual string Notes { get; set; }
public virtual DateTime? StartDate { get; set; }
public virtual DateTime? Expires { get; set; }
public virtual int? SessionsRemaining { get; set; }
public virtual DateTime? ContractEndDate { get; set; }
public virtual int DaysRemaining { get; set; }
public virtual string MembershipType { get; set; }
public virtual DateTime? LastAttendance { get; set; }
public virtual int Attendance { get; set; }
public virtual MemberType MemberType { get; set; }
public virtual int RecurringPayments { get; set; }
public virtual int OverduePayments { get; set; }
public virtual int AttendanceThisWeek { get; set; }
public virtual decimal retentionMetric { get; set; }
public virtual decimal MonthlyAttendanceFrequency { get; set; }
public virtual decimal TotalProductSpend { get; set; }
public virtual string JournalEntry { get; set; }
public virtual decimal Balance { get; set; }
public virtual decimal CreditLimit { get; set; }
public virtual Guid guid { get; set; }
public virtual MembershipState MembershipState { get; set; }
public virtual int BookingsAttended { get; set; }
public virtual DateTime? DateOfLastBooking { get; set; }
public virtual DateTime? PhotoModifiedDate { get; set; }
public virtual DateTime? CreatedDate { get; set; }
public virtual DateTime? ModifiedDate { get; set; }
public virtual DateTime? DeletedDate { get; set; }
public virtual Guid MemberKey { get; set; }
public virtual int CreatedByUserId { get; set; }
public virtual int AssignedToUserId { get; set; }
public virtual int DeletedByUserId { get; set; }
public virtual bool GiftAidPermission { get; set; }
public virtual bool FirstAidPermission { get; set; }
public virtual bool PhotoPermission { get; set; }
public virtual string EmergencyContact { get; set; }
public virtual int? WonOrLost { get; set; }
public virtual DateTime? WonOrLostDate { get; set; }
public virtual int? WonOrLostByUserId { get; set; }
public virtual string LicenseReference { get; set; }
public virtual DateTime? LicenseStartDate { get; set; }
public virtual DateTime? LicenseRenewalDate { get; set; }
public virtual DateTime? AgreedToTerms { get; set; }
public virtual bool OnlineBookingBanned { get; set; }
public virtual int? ChildBranchId { get; set; }
public virtual string ChildBranch { get; set; }
public virtual int ProspectingPoints { get; set; }
public virtual int AchievementPoints { get; set; }
public virtual string ParentForenames { get; set; }
public virtual string ParentSurname { get; set; }
public virtual int GradingReadiness { get; set; }
public virtual string DirectDebitAccountHolder { get; set; }
public virtual string DirectDebitAccountNumber { get; set; }
public virtual string DirectDebitSortCode { get; set; }
public virtual string DirectDebitBankAddress { get; set; }
public virtual DateTime? InvitedDate { get; set; }
public virtual string Grade { get; set; }
public virtual string ColourLeft { get; set; }
public virtual string ColourRight { get; set; }
public virtual int SessionsToComplete { get; set; }
public virtual string UniqueId { get; set; }
public virtual string PreferenceLink { get; set; }
public virtual string MarketingAllLink { get; set; }
public virtual string MarketingNoneLink { get; set; }
public virtual string AppRegistrationId { get; set; }
public virtual string AppRegistrationLink { get; set; }
public virtual string AppQrImageLink { get; set; }
public virtual string CardNumberQrImageLink { get; set; }
public virtual string PhotoThumbnailLink { get; set; }
public virtual MessageTemplateContentType ContentTypesOptIn { get; set; }
public virtual MessageTemplateType TemplateTypesOptIn { get; set; }
public virtual bool CanEmail { get; set; }
public virtual bool CanDirectMail { get; set; }
public virtual bool CanSMS { get; set; }
public virtual bool CanTelephone { get; set; }
public virtual bool NoMarketingConsent { get; set; }
public virtual bool CanSendInvite { get; set; }
public virtual Guid BranchKey { get; set; }
public virtual string SageLink { get; set; }
public virtual DateTime? SageLastPaymentDate { get; set; }
public virtual DateTime? SageFirstPaymentDate { get; set; }
public virtual decimal? SageLastPaymentAmount { get; set; }
public virtual decimal? SageFirstPaymentAmount { get; set; }
public virtual decimal? SageTotalPaid { get; set; }
}
public enum MembershipState
{
Prospect,
Active,
Expired,
Cancelled,
PaymentRequired,
Suspended,
}
public enum MemberType
{
Prospect,
Active,
Cancelled,
Expired,
Suspended,
ClubCancelled,
DropOut,
}
}
namespace ClubManager.Interfaces.Models.Message
{
[Flags]
public enum MessageTemplateContentType
{
Transactional = 1,
Marketing = 2,
None = 1048576,
}
[Flags]
public enum MessageTemplateType
{
SMS = 1,
Email = 2,
Telephone = 4,
DirectMail = 8,
Notification = 16,
Page = 32,
None = 1048576,
NoConsent = 2097152,
}
}
C# MemberService.GetMemberRequest 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 /api/Member/GetMember HTTP/1.1
Host: api.clubmanagercentral.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<MemberService.GetMemberRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Api.Services">
<MemberId>0</MemberId>
</MemberService.GetMemberRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <Member xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Interfaces.Models.Member"> <_x003C_AchievementPoints_x003E_k__BackingField>0</_x003C_AchievementPoints_x003E_k__BackingField> <_x003C_Address1_x003E_k__BackingField>String</_x003C_Address1_x003E_k__BackingField> <_x003C_Address2_x003E_k__BackingField>String</_x003C_Address2_x003E_k__BackingField> <_x003C_AgreedToTerms_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_AgreedToTerms_x003E_k__BackingField> <_x003C_AssignedToUserId_x003E_k__BackingField>0</_x003C_AssignedToUserId_x003E_k__BackingField> <_x003C_AttendanceThisWeek_x003E_k__BackingField>0</_x003C_AttendanceThisWeek_x003E_k__BackingField> <_x003C_Attendance_x003E_k__BackingField>0</_x003C_Attendance_x003E_k__BackingField> <_x003C_Balance_x003E_k__BackingField>0</_x003C_Balance_x003E_k__BackingField> <_x003C_BookingsAttended_x003E_k__BackingField>0</_x003C_BookingsAttended_x003E_k__BackingField> <_x003C_BranchId_x003E_k__BackingField>0</_x003C_BranchId_x003E_k__BackingField> <_x003C_BranchKey_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</_x003C_BranchKey_x003E_k__BackingField> <_x003C_CardNumber_x003E_k__BackingField>String</_x003C_CardNumber_x003E_k__BackingField> <_x003C_ChildBranchId_x003E_k__BackingField>0</_x003C_ChildBranchId_x003E_k__BackingField> <_x003C_ChildBranch_x003E_k__BackingField>String</_x003C_ChildBranch_x003E_k__BackingField> <_x003C_City_x003E_k__BackingField>String</_x003C_City_x003E_k__BackingField> <_x003C_ColourLeft_x003E_k__BackingField>String</_x003C_ColourLeft_x003E_k__BackingField> <_x003C_ColourRight_x003E_k__BackingField>String</_x003C_ColourRight_x003E_k__BackingField> <_x003C_CompanyName_x003E_k__BackingField>String</_x003C_CompanyName_x003E_k__BackingField> <_x003C_ContentTypesOptIn_x003E_k__BackingField>Transactional</_x003C_ContentTypesOptIn_x003E_k__BackingField> <_x003C_ContractEndDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_ContractEndDate_x003E_k__BackingField> <_x003C_Country_x003E_k__BackingField>String</_x003C_Country_x003E_k__BackingField> <_x003C_County_x003E_k__BackingField>String</_x003C_County_x003E_k__BackingField> <_x003C_CreatedByUserId_x003E_k__BackingField>0</_x003C_CreatedByUserId_x003E_k__BackingField> <_x003C_CreatedDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_CreatedDate_x003E_k__BackingField> <_x003C_CreditLimit_x003E_k__BackingField>0</_x003C_CreditLimit_x003E_k__BackingField> <_x003C_DateOfBirth_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_DateOfBirth_x003E_k__BackingField> <_x003C_DateOfLastBooking_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_DateOfLastBooking_x003E_k__BackingField> <_x003C_DaysRemaining_x003E_k__BackingField>0</_x003C_DaysRemaining_x003E_k__BackingField> <_x003C_DeletedByUserId_x003E_k__BackingField>0</_x003C_DeletedByUserId_x003E_k__BackingField> <_x003C_DeletedDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_DeletedDate_x003E_k__BackingField> <_x003C_DirectDebitAccountHolder_x003E_k__BackingField>String</_x003C_DirectDebitAccountHolder_x003E_k__BackingField> <_x003C_DirectDebitAccountNumber_x003E_k__BackingField>String</_x003C_DirectDebitAccountNumber_x003E_k__BackingField> <_x003C_DirectDebitBankAddress_x003E_k__BackingField>String</_x003C_DirectDebitBankAddress_x003E_k__BackingField> <_x003C_DirectDebitSortCode_x003E_k__BackingField>String</_x003C_DirectDebitSortCode_x003E_k__BackingField> <_x003C_EmailAddress_x003E_k__BackingField>String</_x003C_EmailAddress_x003E_k__BackingField> <_x003C_EmailOptOut_x003E_k__BackingField>false</_x003C_EmailOptOut_x003E_k__BackingField> <_x003C_EmergencyContact_x003E_k__BackingField>String</_x003C_EmergencyContact_x003E_k__BackingField> <_x003C_Expires_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_Expires_x003E_k__BackingField> <_x003C_ExternalReference_x003E_k__BackingField>String</_x003C_ExternalReference_x003E_k__BackingField> <_x003C_ExternalStatus_x003E_k__BackingField>Off</_x003C_ExternalStatus_x003E_k__BackingField> <_x003C_FirstAidPermission_x003E_k__BackingField>false</_x003C_FirstAidPermission_x003E_k__BackingField> <_x003C_Forenames_x003E_k__BackingField>String</_x003C_Forenames_x003E_k__BackingField> <_x003C_FullName_x003E_k__BackingField>String</_x003C_FullName_x003E_k__BackingField> <_x003C_GenderName_x003E_k__BackingField>String</_x003C_GenderName_x003E_k__BackingField> <_x003C_Gender_x003E_k__BackingField>Unknown</_x003C_Gender_x003E_k__BackingField> <_x003C_GiftAidPermission_x003E_k__BackingField>false</_x003C_GiftAidPermission_x003E_k__BackingField> <_x003C_Grade_x003E_k__BackingField>String</_x003C_Grade_x003E_k__BackingField> <_x003C_GradingReadiness_x003E_k__BackingField>0</_x003C_GradingReadiness_x003E_k__BackingField> <_x003C_HomePhone_x003E_k__BackingField>String</_x003C_HomePhone_x003E_k__BackingField> <_x003C_InvitedDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_InvitedDate_x003E_k__BackingField> <_x003C_JoinedDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_JoinedDate_x003E_k__BackingField> <_x003C_JournalEntry_x003E_k__BackingField>String</_x003C_JournalEntry_x003E_k__BackingField> <_x003C_LastAttendance_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_LastAttendance_x003E_k__BackingField> <_x003C_LetterOptOut_x003E_k__BackingField>false</_x003C_LetterOptOut_x003E_k__BackingField> <_x003C_LicenseReference_x003E_k__BackingField>String</_x003C_LicenseReference_x003E_k__BackingField> <_x003C_LicenseRenewalDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_LicenseRenewalDate_x003E_k__BackingField> <_x003C_LicenseStartDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_LicenseStartDate_x003E_k__BackingField> <_x003C_MemberId_x003E_k__BackingField>0</_x003C_MemberId_x003E_k__BackingField> <_x003C_MemberKey_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</_x003C_MemberKey_x003E_k__BackingField> <_x003C_MemberType_x003E_k__BackingField>Prospect</_x003C_MemberType_x003E_k__BackingField> <_x003C_MembershipNumber_x003E_k__BackingField>String</_x003C_MembershipNumber_x003E_k__BackingField> <_x003C_MembershipState_x003E_k__BackingField>Prospect</_x003C_MembershipState_x003E_k__BackingField> <_x003C_MembershipType_x003E_k__BackingField>String</_x003C_MembershipType_x003E_k__BackingField> <_x003C_MobilePhone_x003E_k__BackingField>String</_x003C_MobilePhone_x003E_k__BackingField> <_x003C_ModifiedDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_ModifiedDate_x003E_k__BackingField> <_x003C_MonthlyAttendanceFrequency_x003E_k__BackingField>0</_x003C_MonthlyAttendanceFrequency_x003E_k__BackingField> <_x003C_Notes_x003E_k__BackingField>String</_x003C_Notes_x003E_k__BackingField> <_x003C_OnlineBookingBanned_x003E_k__BackingField>false</_x003C_OnlineBookingBanned_x003E_k__BackingField> <_x003C_OverduePayments_x003E_k__BackingField>0</_x003C_OverduePayments_x003E_k__BackingField> <_x003C_ParentForenames_x003E_k__BackingField>String</_x003C_ParentForenames_x003E_k__BackingField> <_x003C_ParentSurname_x003E_k__BackingField>String</_x003C_ParentSurname_x003E_k__BackingField> <_x003C_PhoneOptOut_x003E_k__BackingField>false</_x003C_PhoneOptOut_x003E_k__BackingField> <_x003C_PhotoModifiedDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_PhotoModifiedDate_x003E_k__BackingField> <_x003C_PhotoPermission_x003E_k__BackingField>false</_x003C_PhotoPermission_x003E_k__BackingField> <_x003C_Postcode_x003E_k__BackingField>String</_x003C_Postcode_x003E_k__BackingField> <_x003C_ProspectingPoints_x003E_k__BackingField>0</_x003C_ProspectingPoints_x003E_k__BackingField> <_x003C_RecurringPayments_x003E_k__BackingField>0</_x003C_RecurringPayments_x003E_k__BackingField> <_x003C_SageFirstPaymentAmount_x003E_k__BackingField>0</_x003C_SageFirstPaymentAmount_x003E_k__BackingField> <_x003C_SageFirstPaymentDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_SageFirstPaymentDate_x003E_k__BackingField> <_x003C_SageLastPaymentAmount_x003E_k__BackingField>0</_x003C_SageLastPaymentAmount_x003E_k__BackingField> <_x003C_SageLastPaymentDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_SageLastPaymentDate_x003E_k__BackingField> <_x003C_SageLink_x003E_k__BackingField>String</_x003C_SageLink_x003E_k__BackingField> <_x003C_SageTotalPaid_x003E_k__BackingField>0</_x003C_SageTotalPaid_x003E_k__BackingField> <_x003C_SessionsRemaining_x003E_k__BackingField>0</_x003C_SessionsRemaining_x003E_k__BackingField> <_x003C_SessionsToComplete_x003E_k__BackingField>0</_x003C_SessionsToComplete_x003E_k__BackingField> <_x003C_SmsOptOut_x003E_k__BackingField>false</_x003C_SmsOptOut_x003E_k__BackingField> <_x003C_StartDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_StartDate_x003E_k__BackingField> <_x003C_Surname_x003E_k__BackingField>String</_x003C_Surname_x003E_k__BackingField> <_x003C_TemplateTypesOptIn_x003E_k__BackingField>SMS</_x003C_TemplateTypesOptIn_x003E_k__BackingField> <_x003C_Title_x003E_k__BackingField>String</_x003C_Title_x003E_k__BackingField> <_x003C_TotalProductSpend_x003E_k__BackingField>0</_x003C_TotalProductSpend_x003E_k__BackingField> <_x003C_UseExternalStatus_x003E_k__BackingField>false</_x003C_UseExternalStatus_x003E_k__BackingField> <_x003C_WonOrLostByUserId_x003E_k__BackingField>0</_x003C_WonOrLostByUserId_x003E_k__BackingField> <_x003C_WonOrLostDate_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_WonOrLostDate_x003E_k__BackingField> <_x003C_WonOrLost_x003E_k__BackingField>0</_x003C_WonOrLost_x003E_k__BackingField> <_x003C_guid_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</_x003C_guid_x003E_k__BackingField> <_x003C_retentionMetric_x003E_k__BackingField>0</_x003C_retentionMetric_x003E_k__BackingField> </Member>