Billhighway Cloud API

<back to all web services

MemberCollection

The following routes are available for this service:
POST/members
import 'package:servicestack/servicestack.dart';

class MemberReply implements IConvertible
{
    String? ClassName;
    String? UniqueId;
    DateTime? CreatedDateTime;
    int? ClientId;
    int? ErrorCode;
    String? ErrorMessage;
    int? BillhighwayuserId;
    String? UserId;
    String? GroupId;

    MemberReply({this.ClassName,this.UniqueId,this.CreatedDateTime,this.ClientId,this.ErrorCode,this.ErrorMessage,this.BillhighwayuserId,this.UserId,this.GroupId});
    MemberReply.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ClassName = json['ClassName'];
        UniqueId = json['UniqueId'];
        CreatedDateTime = JsonConverters.fromJson(json['CreatedDateTime'],'DateTime',context!);
        ClientId = json['ClientId'];
        ErrorCode = json['ErrorCode'];
        ErrorMessage = json['ErrorMessage'];
        BillhighwayuserId = json['BillhighwayuserId'];
        UserId = json['UserId'];
        GroupId = json['GroupId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ClassName': ClassName,
        'UniqueId': UniqueId,
        'CreatedDateTime': JsonConverters.toJson(CreatedDateTime,'DateTime',context!),
        'ClientId': ClientId,
        'ErrorCode': ErrorCode,
        'ErrorMessage': ErrorMessage,
        'BillhighwayuserId': BillhighwayuserId,
        'UserId': UserId,
        'GroupId': GroupId
    };

    getTypeName() => "MemberReply";
    TypeContext? context = _ctx;
}

class MemberReplyCollection implements IHaveErrorField, IConvertible
{
    List<MemberReply>? MemberReply;
    bool? IsError;

    MemberReplyCollection({this.MemberReply,this.IsError});
    MemberReplyCollection.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        MemberReply = JsonConverters.fromJson(json['MemberReply'],'List<MemberReply>',context!);
        IsError = json['IsError'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'MemberReply': JsonConverters.toJson(MemberReply,'List<MemberReply>',context!),
        'IsError': IsError
    };

    getTypeName() => "MemberReplyCollection";
    TypeContext? context = _ctx;
}

class RecurringInvoiceSettings implements IConvertible
{
    String? DonationAmount;

    RecurringInvoiceSettings({this.DonationAmount});
    RecurringInvoiceSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DonationAmount = json['DonationAmount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DonationAmount': DonationAmount
    };

    getTypeName() => "RecurringInvoiceSettings";
    TypeContext? context = _ctx;
}

class SubscriberFormField implements IConvertible
{
    String? Name;
    String? Value;

    SubscriberFormField({this.Name,this.Value});
    SubscriberFormField.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Value = json['Value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Value': Value
    };

    getTypeName() => "SubscriberFormField";
    TypeContext? context = _ctx;
}

class AttributeItem implements IConvertible
{
    String? Name;
    String? Value;

    AttributeItem({this.Name,this.Value});
    AttributeItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Value = json['Value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Value': Value
    };

    getTypeName() => "AttributeItem";
    TypeContext? context = _ctx;
}

class Chapter implements IConvertible
{
    String? GroupId;

    Chapter({this.GroupId});
    Chapter.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        GroupId = json['GroupId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'GroupId': GroupId
    };

    getTypeName() => "Chapter";
    TypeContext? context = _ctx;
}

class Member implements IConvertible
{
    String? ClassName;
    String? UniqueId;
    DateTime? CreatedDateTime;
    int? ClientId;
    String? GroupId;
    String? UserId;
    String? AlternateUserId;
    int? BhUserId;
    String? FirstName;
    String? LastName;
    String? MiddleName;
    String? PreferredEmailAddress;
    String? OtherEmailAddress;
    String? PreferredPhoneNumber;
    String? PreferredAddress1;
    String? PreferredAddress2;
    String? PreferredCity;
    String? PreferredState;
    String? PreferredZip;
    String? PreferredCountry;
    String? AccessLevel;
    String? MemberStatus;
    String? MemberTypeClient;
    String? BillingType;
    int? FiscalYear;
    String? WorkLocation;
    DateTime? DOB;
    String? Paperless;
    String? DisplayName;
    String? DisableLogin;
    RecurringInvoiceSettings? RecurringInvoiceSettings;
    List<SubscriberFormField>? FormFields;
    List<AttributeItem>? Attributes;
    List<Chapter>? GroupList;

    Member({this.ClassName,this.UniqueId,this.CreatedDateTime,this.ClientId,this.GroupId,this.UserId,this.AlternateUserId,this.BhUserId,this.FirstName,this.LastName,this.MiddleName,this.PreferredEmailAddress,this.OtherEmailAddress,this.PreferredPhoneNumber,this.PreferredAddress1,this.PreferredAddress2,this.PreferredCity,this.PreferredState,this.PreferredZip,this.PreferredCountry,this.AccessLevel,this.MemberStatus,this.MemberTypeClient,this.BillingType,this.FiscalYear,this.WorkLocation,this.DOB,this.Paperless,this.DisplayName,this.DisableLogin,this.RecurringInvoiceSettings,this.FormFields,this.Attributes,this.GroupList});
    Member.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ClassName = json['ClassName'];
        UniqueId = json['UniqueId'];
        CreatedDateTime = JsonConverters.fromJson(json['CreatedDateTime'],'DateTime',context!);
        ClientId = json['ClientId'];
        GroupId = json['GroupId'];
        UserId = json['UserId'];
        AlternateUserId = json['AlternateUserId'];
        BhUserId = json['BhUserId'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        MiddleName = json['MiddleName'];
        PreferredEmailAddress = json['PreferredEmailAddress'];
        OtherEmailAddress = json['OtherEmailAddress'];
        PreferredPhoneNumber = json['PreferredPhoneNumber'];
        PreferredAddress1 = json['PreferredAddress1'];
        PreferredAddress2 = json['PreferredAddress2'];
        PreferredCity = json['PreferredCity'];
        PreferredState = json['PreferredState'];
        PreferredZip = json['PreferredZip'];
        PreferredCountry = json['PreferredCountry'];
        AccessLevel = json['AccessLevel'];
        MemberStatus = json['MemberStatus'];
        MemberTypeClient = json['MemberTypeClient'];
        BillingType = json['BillingType'];
        FiscalYear = json['FiscalYear'];
        WorkLocation = json['WorkLocation'];
        DOB = JsonConverters.fromJson(json['DOB'],'DateTime',context!);
        Paperless = json['Paperless'];
        DisplayName = json['DisplayName'];
        DisableLogin = json['DisableLogin'];
        RecurringInvoiceSettings = JsonConverters.fromJson(json['RecurringInvoiceSettings'],'RecurringInvoiceSettings',context!);
        FormFields = JsonConverters.fromJson(json['FormFields'],'List<SubscriberFormField>',context!);
        Attributes = JsonConverters.fromJson(json['Attributes'],'List<AttributeItem>',context!);
        GroupList = JsonConverters.fromJson(json['GroupList'],'List<Chapter>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ClassName': ClassName,
        'UniqueId': UniqueId,
        'CreatedDateTime': JsonConverters.toJson(CreatedDateTime,'DateTime',context!),
        'ClientId': ClientId,
        'GroupId': GroupId,
        'UserId': UserId,
        'AlternateUserId': AlternateUserId,
        'BhUserId': BhUserId,
        'FirstName': FirstName,
        'LastName': LastName,
        'MiddleName': MiddleName,
        'PreferredEmailAddress': PreferredEmailAddress,
        'OtherEmailAddress': OtherEmailAddress,
        'PreferredPhoneNumber': PreferredPhoneNumber,
        'PreferredAddress1': PreferredAddress1,
        'PreferredAddress2': PreferredAddress2,
        'PreferredCity': PreferredCity,
        'PreferredState': PreferredState,
        'PreferredZip': PreferredZip,
        'PreferredCountry': PreferredCountry,
        'AccessLevel': AccessLevel,
        'MemberStatus': MemberStatus,
        'MemberTypeClient': MemberTypeClient,
        'BillingType': BillingType,
        'FiscalYear': FiscalYear,
        'WorkLocation': WorkLocation,
        'DOB': JsonConverters.toJson(DOB,'DateTime',context!),
        'Paperless': Paperless,
        'DisplayName': DisplayName,
        'DisableLogin': DisableLogin,
        'RecurringInvoiceSettings': JsonConverters.toJson(RecurringInvoiceSettings,'RecurringInvoiceSettings',context!),
        'FormFields': JsonConverters.toJson(FormFields,'List<SubscriberFormField>',context!),
        'Attributes': JsonConverters.toJson(Attributes,'List<AttributeItem>',context!),
        'GroupList': JsonConverters.toJson(GroupList,'List<Chapter>',context!)
    };

    getTypeName() => "Member";
    TypeContext? context = _ctx;
}

class MemberCollection implements IConvertible
{
    List<Member>? Members;

    MemberCollection({this.Members});
    MemberCollection.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Members = JsonConverters.fromJson(json['Members'],'List<Member>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Members': JsonConverters.toJson(Members,'List<Member>',context!)
    };

    getTypeName() => "MemberCollection";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
    'MemberReply': TypeInfo(TypeOf.Class, create:() => MemberReply()),
    'MemberReplyCollection': TypeInfo(TypeOf.Class, create:() => MemberReplyCollection()),
    'List<MemberReply>': TypeInfo(TypeOf.Class, create:() => <MemberReply>[]),
    'RecurringInvoiceSettings': TypeInfo(TypeOf.Class, create:() => RecurringInvoiceSettings()),
    'SubscriberFormField': TypeInfo(TypeOf.Class, create:() => SubscriberFormField()),
    'AttributeItem': TypeInfo(TypeOf.Class, create:() => AttributeItem()),
    'Chapter': TypeInfo(TypeOf.Class, create:() => Chapter()),
    'Member': TypeInfo(TypeOf.Class, create:() => Member()),
    'List<SubscriberFormField>': TypeInfo(TypeOf.Class, create:() => <SubscriberFormField>[]),
    'List<AttributeItem>': TypeInfo(TypeOf.Class, create:() => <AttributeItem>[]),
    'List<Chapter>': TypeInfo(TypeOf.Class, create:() => <Chapter>[]),
    'MemberCollection': TypeInfo(TypeOf.Class, create:() => MemberCollection()),
    'List<Member>': TypeInfo(TypeOf.Class, create:() => <Member>[]),
});

Dart MemberCollection DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /members HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Members: 
	[
		{
			ClassName: String,
			UniqueId: String,
			CreatedDateTime: 0001-01-01,
			ClientId: 0,
			GroupId: String,
			UserId: String,
			AlternateUserId: String,
			BhUserId: 0,
			FirstName: String,
			LastName: String,
			MiddleName: String,
			PreferredEmailAddress: String,
			OtherEmailAddress: String,
			PreferredPhoneNumber: String,
			PreferredAddress1: String,
			PreferredAddress2: String,
			PreferredCity: String,
			PreferredState: String,
			PreferredZip: String,
			PreferredCountry: String,
			AccessLevel: String,
			MemberStatus: String,
			MemberTypeClient: String,
			BillingType: String,
			FiscalYear: 0,
			WorkLocation: String,
			DOB: 0001-01-01,
			Paperless: String,
			DisplayName: String,
			DisableLogin: String,
			RecurringInvoiceSettings: 
			{
				DonationAmount: String
			},
			FormFields: 
			[
				{
					Name: String,
					Value: String
				}
			],
			Attributes: 
			[
				{
					Name: String,
					Value: String
				}
			],
			GroupList: 
			[
				{
					GroupId: String
				}
			]
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	MemberReply: 
	[
		{
			ClassName: String,
			UniqueId: String,
			CreatedDateTime: 0001-01-01,
			ClientId: 0,
			ErrorCode: 0,
			ErrorMessage: String,
			BillhighwayuserId: 0,
			UserId: String,
			GroupId: String
		}
	],
	IsError: False
}