Billhighway Cloud API

<back to all web services

CoreChargeDonationRq

The following routes are available for this service:
POST/integrations/api/{integrationType}/core/donationcharge
import 'package:servicestack/servicestack.dart';

class CoreChargeGatewaySaleResponse implements IConvertible
{
    String? FailureType;
    bool? IsDuplicate;
    bool? IsSuccessful;
    String? ErrorCode;
    String? Message;
    int? GatewayId;
    String? ConfirmationNumber;
    String? NetworkTransactionId;

    CoreChargeGatewaySaleResponse({this.FailureType,this.IsDuplicate,this.IsSuccessful,this.ErrorCode,this.Message,this.GatewayId,this.ConfirmationNumber,this.NetworkTransactionId});
    CoreChargeGatewaySaleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        FailureType = json['FailureType'];
        IsDuplicate = json['IsDuplicate'];
        IsSuccessful = json['IsSuccessful'];
        ErrorCode = json['ErrorCode'];
        Message = json['Message'];
        GatewayId = json['GatewayId'];
        ConfirmationNumber = json['ConfirmationNumber'];
        NetworkTransactionId = json['NetworkTransactionId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'FailureType': FailureType,
        'IsDuplicate': IsDuplicate,
        'IsSuccessful': IsSuccessful,
        'ErrorCode': ErrorCode,
        'Message': Message,
        'GatewayId': GatewayId,
        'ConfirmationNumber': ConfirmationNumber,
        'NetworkTransactionId': NetworkTransactionId
    };

    getTypeName() => "CoreChargeGatewaySaleResponse";
    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 CreditCardBillingAddressItem implements IConvertible
{
    String? Address1;
    String? Address2;
    String? City;
    String? PostalCode;
    String? Region;
    String? Country;
    List<AttributeItem>? Attributes;

    CreditCardBillingAddressItem({this.Address1,this.Address2,this.City,this.PostalCode,this.Region,this.Country,this.Attributes});
    CreditCardBillingAddressItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Address1 = json['Address1'];
        Address2 = json['Address2'];
        City = json['City'];
        PostalCode = json['PostalCode'];
        Region = json['Region'];
        Country = json['Country'];
        Attributes = JsonConverters.fromJson(json['Attributes'],'List<AttributeItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Address1': Address1,
        'Address2': Address2,
        'City': City,
        'PostalCode': PostalCode,
        'Region': Region,
        'Country': Country,
        'Attributes': JsonConverters.toJson(Attributes,'List<AttributeItem>',context!)
    };

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

class CreditCardChargeVerificationResult implements IConvertible
{
    bool? NetworkVerificationAttempted;
    String? CvvVerificationResult;
    String? AddressVerificationResult;
    String? PostalCodeVerificationResult;

    CreditCardChargeVerificationResult({this.NetworkVerificationAttempted,this.CvvVerificationResult,this.AddressVerificationResult,this.PostalCodeVerificationResult});
    CreditCardChargeVerificationResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        NetworkVerificationAttempted = json['NetworkVerificationAttempted'];
        CvvVerificationResult = json['CvvVerificationResult'];
        AddressVerificationResult = json['AddressVerificationResult'];
        PostalCodeVerificationResult = json['PostalCodeVerificationResult'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'NetworkVerificationAttempted': NetworkVerificationAttempted,
        'CvvVerificationResult': CvvVerificationResult,
        'AddressVerificationResult': AddressVerificationResult,
        'PostalCodeVerificationResult': PostalCodeVerificationResult
    };

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

class CoreCreditCardChargeDetails implements IConvertible
{
    String? CardType;
    int? ExpMonth;
    int? ExpYear;
    String? Last4;
    CreditCardBillingAddressItem? Address;
    CreditCardChargeVerificationResult? VerificationResult;

    CoreCreditCardChargeDetails({this.CardType,this.ExpMonth,this.ExpYear,this.Last4,this.Address,this.VerificationResult});
    CoreCreditCardChargeDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CardType = json['CardType'];
        ExpMonth = json['ExpMonth'];
        ExpYear = json['ExpYear'];
        Last4 = json['Last4'];
        Address = JsonConverters.fromJson(json['Address'],'CreditCardBillingAddressItem',context!);
        VerificationResult = JsonConverters.fromJson(json['VerificationResult'],'CreditCardChargeVerificationResult',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CardType': CardType,
        'ExpMonth': ExpMonth,
        'ExpYear': ExpYear,
        'Last4': Last4,
        'Address': JsonConverters.toJson(Address,'CreditCardBillingAddressItem',context!),
        'VerificationResult': JsonConverters.toJson(VerificationResult,'CreditCardChargeVerificationResult',context!)
    };

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

class CoreChargeDetails implements IConvertible
{
    String? PaymentType;
    int? Amount;
    String? IntegrationType;
    String? Currency;
    CoreCreditCardChargeDetails? CardDetails;

    CoreChargeDetails({this.PaymentType,this.Amount,this.IntegrationType,this.Currency,this.CardDetails});
    CoreChargeDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PaymentType = json['PaymentType'];
        Amount = json['Amount'];
        IntegrationType = json['IntegrationType'];
        Currency = json['Currency'];
        CardDetails = JsonConverters.fromJson(json['CardDetails'],'CoreCreditCardChargeDetails',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PaymentType': PaymentType,
        'Amount': Amount,
        'IntegrationType': IntegrationType,
        'Currency': Currency,
        'CardDetails': JsonConverters.toJson(CardDetails,'CoreCreditCardChargeDetails',context!)
    };

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

class CoreChargeDonationRs implements IConvertible
{
    String? TransactionId;
    int? StoredAccountId;
    int? NationalId;
    int? ChapterId;
    String? ChargeType;
    String? IntegrationType;
    int? ContextIntegrationPartnerId;
    int? CallerIntegrationPartnerId;
    CoreChargeGatewaySaleResponse? GatewayResponse;
    CoreChargeDetails? ChargeDetails;

    CoreChargeDonationRs({this.TransactionId,this.StoredAccountId,this.NationalId,this.ChapterId,this.ChargeType,this.IntegrationType,this.ContextIntegrationPartnerId,this.CallerIntegrationPartnerId,this.GatewayResponse,this.ChargeDetails});
    CoreChargeDonationRs.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TransactionId = json['TransactionId'];
        StoredAccountId = json['StoredAccountId'];
        NationalId = json['NationalId'];
        ChapterId = json['ChapterId'];
        ChargeType = json['ChargeType'];
        IntegrationType = json['IntegrationType'];
        ContextIntegrationPartnerId = json['ContextIntegrationPartnerId'];
        CallerIntegrationPartnerId = json['CallerIntegrationPartnerId'];
        GatewayResponse = JsonConverters.fromJson(json['GatewayResponse'],'CoreChargeGatewaySaleResponse',context!);
        ChargeDetails = JsonConverters.fromJson(json['ChargeDetails'],'CoreChargeDetails',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TransactionId': TransactionId,
        'StoredAccountId': StoredAccountId,
        'NationalId': NationalId,
        'ChapterId': ChapterId,
        'ChargeType': ChargeType,
        'IntegrationType': IntegrationType,
        'ContextIntegrationPartnerId': ContextIntegrationPartnerId,
        'CallerIntegrationPartnerId': CallerIntegrationPartnerId,
        'GatewayResponse': JsonConverters.toJson(GatewayResponse,'CoreChargeGatewaySaleResponse',context!),
        'ChargeDetails': JsonConverters.toJson(ChargeDetails,'CoreChargeDetails',context!)
    };

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

class EventItem implements IConvertible
{
    String? CustomerFeeItemTypeId;
    String? Quantity;

    EventItem({this.CustomerFeeItemTypeId,this.Quantity});
    EventItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CustomerFeeItemTypeId = json['CustomerFeeItemTypeId'];
        Quantity = json['Quantity'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CustomerFeeItemTypeId': CustomerFeeItemTypeId,
        'Quantity': Quantity
    };

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

class CoreChargeDonationRq implements IChargeRequest, IConvertible
{
    // @ApiMember(ParameterType="path")
    String? integrationType;

    int? NationalId;
    int? ChapterId;
    int? StoredAccountId;
    int? ContextIntegrationPartnerId;
    int? CallerIntegrationPartnerId;
    int? UserId;
    int? AuthenticationId;
    String? ChargeType;
    String? Token;
    // @ApiMember(Format="decimal", ParameterType="model")
    double? Amount;

    String? Description;
    int? CampaignId;
    int? CreatedById;
    int? TransactionId;
    String? PartnerReferenceId;
    List<EventItem>? EventItems;

    CoreChargeDonationRq({this.integrationType,this.NationalId,this.ChapterId,this.StoredAccountId,this.ContextIntegrationPartnerId,this.CallerIntegrationPartnerId,this.UserId,this.AuthenticationId,this.ChargeType,this.Token,this.Amount,this.Description,this.CampaignId,this.CreatedById,this.TransactionId,this.PartnerReferenceId,this.EventItems});
    CoreChargeDonationRq.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        integrationType = json['integrationType'];
        NationalId = json['NationalId'];
        ChapterId = json['ChapterId'];
        StoredAccountId = json['StoredAccountId'];
        ContextIntegrationPartnerId = json['ContextIntegrationPartnerId'];
        CallerIntegrationPartnerId = json['CallerIntegrationPartnerId'];
        UserId = json['UserId'];
        AuthenticationId = json['AuthenticationId'];
        ChargeType = json['ChargeType'];
        Token = json['Token'];
        Amount = JsonConverters.toDouble(json['Amount']);
        Description = json['Description'];
        CampaignId = json['CampaignId'];
        CreatedById = json['CreatedById'];
        TransactionId = json['TransactionId'];
        PartnerReferenceId = json['PartnerReferenceId'];
        EventItems = JsonConverters.fromJson(json['EventItems'],'List<EventItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'integrationType': integrationType,
        'NationalId': NationalId,
        'ChapterId': ChapterId,
        'StoredAccountId': StoredAccountId,
        'ContextIntegrationPartnerId': ContextIntegrationPartnerId,
        'CallerIntegrationPartnerId': CallerIntegrationPartnerId,
        'UserId': UserId,
        'AuthenticationId': AuthenticationId,
        'ChargeType': ChargeType,
        'Token': Token,
        'Amount': Amount,
        'Description': Description,
        'CampaignId': CampaignId,
        'CreatedById': CreatedById,
        'TransactionId': TransactionId,
        'PartnerReferenceId': PartnerReferenceId,
        'EventItems': JsonConverters.toJson(EventItems,'List<EventItem>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
    'CoreChargeGatewaySaleResponse': TypeInfo(TypeOf.Class, create:() => CoreChargeGatewaySaleResponse()),
    'AttributeItem': TypeInfo(TypeOf.Class, create:() => AttributeItem()),
    'CreditCardBillingAddressItem': TypeInfo(TypeOf.Class, create:() => CreditCardBillingAddressItem()),
    'List<AttributeItem>': TypeInfo(TypeOf.Class, create:() => <AttributeItem>[]),
    'CreditCardChargeVerificationResult': TypeInfo(TypeOf.Class, create:() => CreditCardChargeVerificationResult()),
    'CoreCreditCardChargeDetails': TypeInfo(TypeOf.Class, create:() => CoreCreditCardChargeDetails()),
    'CoreChargeDetails': TypeInfo(TypeOf.Class, create:() => CoreChargeDetails()),
    'CoreChargeDonationRs': TypeInfo(TypeOf.Class, create:() => CoreChargeDonationRs()),
    'EventItem': TypeInfo(TypeOf.Class, create:() => EventItem()),
    'CoreChargeDonationRq': TypeInfo(TypeOf.Class, create:() => CoreChargeDonationRq()),
    'List<EventItem>': TypeInfo(TypeOf.Class, create:() => <EventItem>[]),
});

Dart CoreChargeDonationRq 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 /integrations/api/{integrationType}/core/donationcharge HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	integrationType: String,
	NationalId: 0,
	ChapterId: 0,
	StoredAccountId: 0,
	ContextIntegrationPartnerId: 0,
	CallerIntegrationPartnerId: 0,
	UserId: 0,
	AuthenticationId: 0,
	ChargeType: String,
	Token: String,
	Amount: 0,
	Description: String,
	CampaignId: 0,
	CreatedById: 0,
	TransactionId: 0,
	PartnerReferenceId: String,
	EventItems: 
	[
		{
			CustomerFeeItemTypeId: String,
			Quantity: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	TransactionId: String,
	StoredAccountId: 0,
	NationalId: 0,
	ChapterId: 0,
	ChargeType: String,
	IntegrationType: String,
	ContextIntegrationPartnerId: 0,
	CallerIntegrationPartnerId: 0,
	GatewayResponse: 
	{
		FailureType: String,
		IsDuplicate: False,
		IsSuccessful: False,
		ErrorCode: String,
		Message: String,
		GatewayId: 0,
		ConfirmationNumber: String,
		NetworkTransactionId: String
	},
	ChargeDetails: 
	{
		PaymentType: String,
		Amount: 0,
		IntegrationType: String,
		Currency: String,
		CardDetails: 
		{
			CardType: String,
			ExpMonth: 0,
			ExpYear: 0,
			Last4: String,
			Address: 
			{
				Address1: String,
				Address2: String,
				City: String,
				PostalCode: String,
				Region: String,
				Country: String,
				Attributes: 
				[
					{
						Name: String,
						Value: String
					}
				]
			},
			VerificationResult: 
			{
				NetworkVerificationAttempted: False,
				CvvVerificationResult: String,
				AddressVerificationResult: String,
				PostalCodeVerificationResult: String
			}
		}
	}
}