GET | /sales/members/{MemberId}/status | Get customer's billing status |
---|
import 'package:servicestack/servicestack.dart';
class ApiDtoBase implements IConvertible
{
String? ApiKey;
int? StoreId;
int? ChainId;
ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId});
ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
return this;
}
Map<String, dynamic> toJson() => {
'ApiKey': ApiKey,
'StoreId': StoreId,
'ChainId': ChainId
};
getTypeName() => "ApiDtoBase";
TypeContext? context = _ctx;
}
class GetBillingStatusRequestDto extends ApiDtoBase implements IConvertible
{
int? MemberId;
GetBillingStatusRequestDto({this.MemberId});
GetBillingStatusRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
MemberId = json['MemberId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'MemberId': MemberId
});
getTypeName() => "GetBillingStatusRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class GetBillingStatusRequest extends GetBillingStatusRequestDto implements IRestrictedApiRequest, IConvertible
{
/**
* Api Key - grants access to resources
*/
// @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
String? ApiKey;
/**
* Store ID # member belongs to
*/
// @ApiMember(DataType="integer", Description="Store ID # member belongs to", IsRequired=true, Name="StoreId", ParameterType="query")
int? StoreId;
/**
* ID of the member to lookup
*/
// @ApiMember(DataType="integer", Description="ID of the member to lookup", IsRequired=true, Name="MemberId", ParameterType="path")
int? MemberId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
GetBillingStatusRequest({this.ApiKey,this.StoreId,this.MemberId,this.RestrictedId,this.RestrictedResourceType});
GetBillingStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
MemberId = json['MemberId'];
RestrictedId = json['RestrictedId'];
RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ApiKey': ApiKey,
'StoreId': StoreId,
'MemberId': MemberId,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "GetBillingStatusRequest";
TypeContext? context = _ctx;
}
// @DataContract
class GetMemberBillingStatus_Result implements IConvertible
{
// @DataMember
String? FullName;
// @DataMember
String? MemberStatus;
// @DataMember
String? HomeClub;
// @DataMember
double? BalanceDue;
// @DataMember
int? StoreID;
GetMemberBillingStatus_Result({this.FullName,this.MemberStatus,this.HomeClub,this.BalanceDue,this.StoreID});
GetMemberBillingStatus_Result.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FullName = json['FullName'];
MemberStatus = json['MemberStatus'];
HomeClub = json['HomeClub'];
BalanceDue = JsonConverters.toDouble(json['BalanceDue']);
StoreID = json['StoreID'];
return this;
}
Map<String, dynamic> toJson() => {
'FullName': FullName,
'MemberStatus': MemberStatus,
'HomeClub': HomeClub,
'BalanceDue': BalanceDue,
'StoreID': StoreID
};
getTypeName() => "GetMemberBillingStatus_Result";
TypeContext? context = _ctx;
}
class MemberBillingStatusInvoice implements IConvertible
{
int? InvoiceId;
String? Status;
int? StatusId;
double? AmountDue;
double? SalesTaxDue;
DateTime? PaymentDue;
DateTime? PaymentMade;
String? PackageName;
MemberBillingStatusInvoice({this.InvoiceId,this.Status,this.StatusId,this.AmountDue,this.SalesTaxDue,this.PaymentDue,this.PaymentMade,this.PackageName});
MemberBillingStatusInvoice.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
InvoiceId = json['InvoiceId'];
Status = json['Status'];
StatusId = json['StatusId'];
AmountDue = JsonConverters.toDouble(json['AmountDue']);
SalesTaxDue = JsonConverters.toDouble(json['SalesTaxDue']);
PaymentDue = JsonConverters.fromJson(json['PaymentDue'],'DateTime',context!);
PaymentMade = JsonConverters.fromJson(json['PaymentMade'],'DateTime',context!);
PackageName = json['PackageName'];
return this;
}
Map<String, dynamic> toJson() => {
'InvoiceId': InvoiceId,
'Status': Status,
'StatusId': StatusId,
'AmountDue': AmountDue,
'SalesTaxDue': SalesTaxDue,
'PaymentDue': JsonConverters.toJson(PaymentDue,'DateTime',context!),
'PaymentMade': JsonConverters.toJson(PaymentMade,'DateTime',context!),
'PackageName': PackageName
};
getTypeName() => "MemberBillingStatusInvoice";
TypeContext? context = _ctx;
}
class MemberBillingStatus extends GetMemberBillingStatus_Result implements IConvertible
{
List<MemberBillingStatusInvoice>? Invoices;
int? UserTypeId;
String? UserTypeName;
int? NewUserId;
MemberBillingStatus({this.Invoices,this.UserTypeId,this.UserTypeName,this.NewUserId});
MemberBillingStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Invoices = JsonConverters.fromJson(json['Invoices'],'List<MemberBillingStatusInvoice>',context!);
UserTypeId = json['UserTypeId'];
UserTypeName = json['UserTypeName'];
NewUserId = json['NewUserId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Invoices': JsonConverters.toJson(Invoices,'List<MemberBillingStatusInvoice>',context!),
'UserTypeId': UserTypeId,
'UserTypeName': UserTypeName,
'NewUserId': NewUserId
});
getTypeName() => "MemberBillingStatus";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'GetBillingStatusRequestDto': TypeInfo(TypeOf.Class, create:() => GetBillingStatusRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'GetBillingStatusRequest': TypeInfo(TypeOf.Class, create:() => GetBillingStatusRequest()),
'GetMemberBillingStatus_Result': TypeInfo(TypeOf.Class, create:() => GetMemberBillingStatus_Result()),
'MemberBillingStatusInvoice': TypeInfo(TypeOf.Class, create:() => MemberBillingStatusInvoice()),
'MemberBillingStatus': TypeInfo(TypeOf.Class, create:() => MemberBillingStatus()),
'List<MemberBillingStatusInvoice>': TypeInfo(TypeOf.Class, create:() => <MemberBillingStatusInvoice>[]),
});
Dart GetBillingStatusRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /sales/members/{MemberId}/status HTTP/1.1 Host: clubready.com Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Invoices: [ { InvoiceId: 0, Status: String, StatusId: 0, AmountDue: 0, SalesTaxDue: 0, PaymentDue: 0001-01-01, PaymentMade: 0001-01-01, PackageName: String } ], UserTypeId: 0, UserTypeName: String, NewUserId: 0, FullName: String, MemberStatus: String, HomeClub: String, BalanceDue: 0, StoreID: 0 }