| 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>[]),
});
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 /members HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<MemberCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<Members>
<Member>
<AccessLevel>String</AccessLevel>
<AlternateUserId>String</AlternateUserId>
<Attributes xmlns:d4p1="https://www.billhighway.com/api">
<d4p1:AttributeItem>
<d4p1:Name>String</d4p1:Name>
<d4p1:Value>String</d4p1:Value>
</d4p1:AttributeItem>
</Attributes>
<BhUserId>0</BhUserId>
<BillingType>String</BillingType>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<DOB>0001-01-01T00:00:00</DOB>
<DisableLogin>String</DisableLogin>
<DisplayName>String</DisplayName>
<FirstName>String</FirstName>
<FiscalYear>0</FiscalYear>
<FormFields>
<SubscriberFormField>
<_x003C_Name_x003E_k__BackingField>String</_x003C_Name_x003E_k__BackingField>
<_x003C_Value_x003E_k__BackingField>String</_x003C_Value_x003E_k__BackingField>
</SubscriberFormField>
</FormFields>
<GroupId>String</GroupId>
<GroupList xmlns:d4p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">
<d4p1:Chapter>
<d4p1:GroupId>String</d4p1:GroupId>
</d4p1:Chapter>
</GroupList>
<LastName>String</LastName>
<MemberStatus>String</MemberStatus>
<MemberTypeClient>String</MemberTypeClient>
<MiddleName>String</MiddleName>
<OtherEmailAddress>String</OtherEmailAddress>
<Paperless>String</Paperless>
<PreferredAddress1>String</PreferredAddress1>
<PreferredAddress2>String</PreferredAddress2>
<PreferredCity>String</PreferredCity>
<PreferredCountry>String</PreferredCountry>
<PreferredEmailAddress>String</PreferredEmailAddress>
<PreferredPhoneNumber>String</PreferredPhoneNumber>
<PreferredState>String</PreferredState>
<PreferredZip>String</PreferredZip>
<RecurringInvoiceSettings xmlns:d4p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO.Member">
<d4p1:DonationAmount>String</d4p1:DonationAmount>
</RecurringInvoiceSettings>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
<WorkLocation>String</WorkLocation>
</Member>
</Members>
</MemberCollection>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<MemberReplyCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<MemberReply>
<MemberReply>
<BillhighwayuserId>0</BillhighwayuserId>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<ErrorCode>0</ErrorCode>
<ErrorMessage>String</ErrorMessage>
<GroupId>String</GroupId>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
</MemberReply>
</MemberReply>
</MemberReplyCollection>