Billhighway Cloud API

<back to all web services

CancelMemberSubscription

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

class CancelMemberSubscription implements IConvertible
{
    String? UniqueId;
    int? ClientId;
    String? GroupId;
    int? SubscriptionID;
    int? PIN;
    int? COID;
    int? OrderID;
    int? MSN;
    DateTime? StartDate;
    DateTime? EndDate;
    int? SubscriptionInvoiceID;
    int? ChapMemPayID;
    int? FrequencyID;
    bool? AutoRenew;

    CancelMemberSubscription({this.UniqueId,this.ClientId,this.GroupId,this.SubscriptionID,this.PIN,this.COID,this.OrderID,this.MSN,this.StartDate,this.EndDate,this.SubscriptionInvoiceID,this.ChapMemPayID,this.FrequencyID,this.AutoRenew});
    CancelMemberSubscription.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        UniqueId = json['UniqueId'];
        ClientId = json['ClientId'];
        GroupId = json['GroupId'];
        SubscriptionID = json['SubscriptionID'];
        PIN = json['PIN'];
        COID = json['COID'];
        OrderID = json['OrderID'];
        MSN = json['MSN'];
        StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!);
        EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!);
        SubscriptionInvoiceID = json['SubscriptionInvoiceID'];
        ChapMemPayID = json['ChapMemPayID'];
        FrequencyID = json['FrequencyID'];
        AutoRenew = json['AutoRenew'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'UniqueId': UniqueId,
        'ClientId': ClientId,
        'GroupId': GroupId,
        'SubscriptionID': SubscriptionID,
        'PIN': PIN,
        'COID': COID,
        'OrderID': OrderID,
        'MSN': MSN,
        'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!),
        'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!),
        'SubscriptionInvoiceID': SubscriptionInvoiceID,
        'ChapMemPayID': ChapMemPayID,
        'FrequencyID': FrequencyID,
        'AutoRenew': AutoRenew
    };

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

class CancelMemberSubscriptionReply implements IConvertible
{
    String? UniqueId;
    int? ErrorCode;
    String? ErrorMessage;

    CancelMemberSubscriptionReply({this.UniqueId,this.ErrorCode,this.ErrorMessage});
    CancelMemberSubscriptionReply.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'UniqueId': UniqueId,
        'ErrorCode': ErrorCode,
        'ErrorMessage': ErrorMessage
    };

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

TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
    'CancelMemberSubscription': TypeInfo(TypeOf.Class, create:() => CancelMemberSubscription()),
    'CancelMemberSubscriptionReply': TypeInfo(TypeOf.Class, create:() => CancelMemberSubscriptionReply()),
});

Dart CancelMemberSubscription 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 /subscription/cancel HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	UniqueId: String,
	ClientId: 0,
	GroupId: String,
	SubscriptionID: 0,
	PIN: 0,
	COID: 0,
	OrderID: 0,
	MSN: 0,
	StartDate: 0001-01-01,
	EndDate: 0001-01-01,
	SubscriptionInvoiceID: 0,
	ChapMemPayID: 0,
	FrequencyID: 0,
	AutoRenew: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	UniqueId: String,
	ErrorCode: 0,
	ErrorMessage: String
}