Billhighway Cloud API

<back to all web services

CreditCardPaymentCollection

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

class CreditCardPaymentReply implements IConvertible
{
    String? ClassName;
    String? UniqueId;
    DateTime? CreatedDateTime;
    int? ClientId;
    String? TransactionId;
    int? ErrorCode;
    String? ErrorMessage;

    CreditCardPaymentReply({this.ClassName,this.UniqueId,this.CreatedDateTime,this.ClientId,this.TransactionId,this.ErrorCode,this.ErrorMessage});
    CreditCardPaymentReply.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'];
        TransactionId = json['TransactionId'];
        ErrorCode = json['ErrorCode'];
        ErrorMessage = json['ErrorMessage'];
        return this;
    }

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

    getTypeName() => "CreditCardPaymentReply";
    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 SubscriptionParameters implements IConvertible
{
    int? FormTemplateID;
    int? SubscriptionInvoiceID;
    String? ClientSubscriberId;
    int? SignupTypeID;
    int? FrequencyID;
    bool? AutoRenew;
    int? CompanyID;
    int? UserID;
    int? ChapMemPayID;
    int? MemberSubscriptionInvID;
    List<SubscriberFormField>? Fields;
    int? CreatedBy;
    int? UpdatedBy;
    int? AptifyUpdateType;
    int? RenewedMemberSubscriptionInvID;
    int? ChapId;

    SubscriptionParameters({this.FormTemplateID,this.SubscriptionInvoiceID,this.ClientSubscriberId,this.SignupTypeID,this.FrequencyID,this.AutoRenew,this.CompanyID,this.UserID,this.ChapMemPayID,this.MemberSubscriptionInvID,this.Fields,this.CreatedBy,this.UpdatedBy,this.AptifyUpdateType,this.RenewedMemberSubscriptionInvID,this.ChapId});
    SubscriptionParameters.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        FormTemplateID = json['FormTemplateID'];
        SubscriptionInvoiceID = json['SubscriptionInvoiceID'];
        ClientSubscriberId = json['ClientSubscriberId'];
        SignupTypeID = json['SignupTypeID'];
        FrequencyID = json['FrequencyID'];
        AutoRenew = json['AutoRenew'];
        CompanyID = json['CompanyID'];
        UserID = json['UserID'];
        ChapMemPayID = json['ChapMemPayID'];
        MemberSubscriptionInvID = json['MemberSubscriptionInvID'];
        Fields = JsonConverters.fromJson(json['Fields'],'List<SubscriberFormField>',context!);
        CreatedBy = json['CreatedBy'];
        UpdatedBy = json['UpdatedBy'];
        AptifyUpdateType = json['AptifyUpdateType'];
        RenewedMemberSubscriptionInvID = json['RenewedMemberSubscriptionInvID'];
        ChapId = json['ChapId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'FormTemplateID': FormTemplateID,
        'SubscriptionInvoiceID': SubscriptionInvoiceID,
        'ClientSubscriberId': ClientSubscriberId,
        'SignupTypeID': SignupTypeID,
        'FrequencyID': FrequencyID,
        'AutoRenew': AutoRenew,
        'CompanyID': CompanyID,
        'UserID': UserID,
        'ChapMemPayID': ChapMemPayID,
        'MemberSubscriptionInvID': MemberSubscriptionInvID,
        'Fields': JsonConverters.toJson(Fields,'List<SubscriberFormField>',context!),
        'CreatedBy': CreatedBy,
        'UpdatedBy': UpdatedBy,
        'AptifyUpdateType': AptifyUpdateType,
        'RenewedMemberSubscriptionInvID': RenewedMemberSubscriptionInvID,
        'ChapId': ChapId
    };

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

class CreditCardPayment extends CreditCardPayment implements IConvertible
{
    SubscriptionParameters? SubscriptionInfo;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'SubscriptionInfo': JsonConverters.toJson(SubscriptionInfo,'SubscriptionParameters',context!)
    });

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

class CreditCardPaymentCollection implements IConvertible
{
    List<CreditCardPayment>? CreditCardPaymentList;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
    'CreditCardPaymentReply': TypeInfo(TypeOf.Class, create:() => CreditCardPaymentReply()),
    'SubscriberFormField': TypeInfo(TypeOf.Class, create:() => SubscriberFormField()),
    'SubscriptionParameters': TypeInfo(TypeOf.Class, create:() => SubscriptionParameters()),
    'List<SubscriberFormField>': TypeInfo(TypeOf.Class, create:() => <SubscriberFormField>[]),
    'CreditCardPayment': TypeInfo(TypeOf.Class, create:() => CreditCardPayment()),
    'CreditCardPaymentCollection': TypeInfo(TypeOf.Class, create:() => CreditCardPaymentCollection()),
    'List<CreditCardPayment>': TypeInfo(TypeOf.Class, create:() => <CreditCardPayment>[]),
});

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

{
	CreditCardPaymentList: 
	[
		{
			ClassName: String,
			UniqueId: String,
			CreatedDateTime: 0001-01-01,
			ClientId: 0,
			GroupId: String,
			UserId: String,
			BhUserId: 0,
			Amount: String,
			AutoPay: False,
			CurrencyType: String,
			Country: String,
			CardReferenceOrCardNumber: String,
			StoreCardInfo: False,
			Address1: String,
			Address2: String,
			BillingCity: String,
			BillingState: String,
			PreferredEmailAddress: String,
			Memo: String,
			OpportunityId: String,
			ExpMonth: 0,
			ExpYear: 0,
			Cvv: String,
			PostalCode: String,
			Location: String,
			NameOnCard: String,
			CardType: String,
			InvoiceList: 
			[
				{
					ClassName: String,
					UniqueId: String,
					CreatedDateTime: 0001-01-01,
					ClientId: 0,
					Invoice: 0,
					AmountPaid: String
				}
			]
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ClassName: String,
	UniqueId: String,
	CreatedDateTime: 0001-01-01,
	ClientId: 0,
	TransactionId: String,
	ErrorCode: 0,
	ErrorMessage: String
}