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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<CreditCardPaymentCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <CreditCardPaymentList>
    <CreditCardPayment>
      <Address1>String</Address1>
      <Address2>String</Address2>
      <Amount>String</Amount>
      <AutoPay>false</AutoPay>
      <BhUserId>0</BhUserId>
      <BillingCity>String</BillingCity>
      <BillingState>String</BillingState>
      <CardReferenceOrCardNumber>String</CardReferenceOrCardNumber>
      <CardType>String</CardType>
      <ClassName>String</ClassName>
      <ClientId>0</ClientId>
      <Country>String</Country>
      <CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
      <CurrencyType>String</CurrencyType>
      <Cvv>String</Cvv>
      <ExpMonth>0</ExpMonth>
      <ExpYear>0</ExpYear>
      <GroupId>String</GroupId>
      <InvoiceList>
        <SalesForceMemberPaymentInvoiceDetail>
          <AmountPaid>String</AmountPaid>
          <ClassName>String</ClassName>
          <ClientId>0</ClientId>
          <CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
          <Invoice>0</Invoice>
          <UniqueId>String</UniqueId>
        </SalesForceMemberPaymentInvoiceDetail>
      </InvoiceList>
      <Location>String</Location>
      <Memo>String</Memo>
      <NameOnCard>String</NameOnCard>
      <OpportunityId>String</OpportunityId>
      <PostalCode>String</PostalCode>
      <PreferredEmailAddress>String</PreferredEmailAddress>
      <StoreCardInfo>false</StoreCardInfo>
      <UniqueId>String</UniqueId>
      <UserId>String</UserId>
    </CreditCardPayment>
  </CreditCardPaymentList>
</CreditCardPaymentCollection>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CreditCardPaymentReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <ClassName>String</ClassName>
  <ClientId>0</ClientId>
  <CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage>String</ErrorMessage>
  <TransactionId>String</TransactionId>
  <UniqueId>String</UniqueId>
</CreditCardPaymentReply>