/* Options: Date: 2026-11-08 12:02:23 Version: 5.140 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://devapi.billhighway.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: DonationCreditCardRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:collection */ import 'package:servicestack/servicestack.dart'; import 'dart:collection'; class DonationDonorInfo implements IConvertible { /** * Name of donor. Maximum 100 characters. Format must be Firstname {space} Lastname. */ // @ApiMember(Description="Name of donor. Maximum 100 characters. Format must be Firstname {space} Lastname.", IsRequired=true, Name="FullName") String? FullName; /** * Billing address. Maximum 100 characters. */ // @ApiMember(Description="Billing address. Maximum 100 characters.", IsRequired=true, Name="Address") String? Address; /** * Billing city. Maximum 100 characters. */ // @ApiMember(Description="Billing city. Maximum 100 characters.", IsRequired=true, Name="City") String? City; /** * Billing state. Two characters, must match valid US state code. */ // @ApiMember(Description="Billing state. Two characters, must match valid US state code.", IsRequired=true, Name="State") String? State; /** * Credit Card billing address postal code. Maximum 10 characters. */ // @ApiMember(Description="Credit Card billing address postal code. Maximum 10 characters.", IsRequired=true, Name="PostalCode") String? PostalCode; /** * Email address of donor. Maximum 100 characters. If provided, must be valid email format. */ // @ApiMember(Description="Email address of donor. Maximum 100 characters. If provided, must be valid email format.", Name="EmailAddress") String? EmailAddress; /** * Preferred phone number. Maximum 12 characters. */ // @ApiMember(Description="Preferred phone number. Maximum 12 characters.", Name="Phone") String? Phone; DonationDonorInfo({this.FullName,this.Address,this.City,this.State,this.PostalCode,this.EmailAddress,this.Phone}); DonationDonorInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { FullName = json['FullName']; Address = json['Address']; City = json['City']; State = json['State']; PostalCode = json['PostalCode']; EmailAddress = json['EmailAddress']; Phone = json['Phone']; return this; } Map toJson() => { 'FullName': FullName, 'Address': Address, 'City': City, 'State': State, 'PostalCode': PostalCode, 'EmailAddress': EmailAddress, 'Phone': Phone }; getTypeName() => "DonationDonorInfo"; TypeContext? context = _ctx; } class DonationMemberInfo implements IConvertible { // @ApiMember(IsRequired=true) int? BhUserId; DonationMemberInfo({this.BhUserId}); DonationMemberInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { BhUserId = json['BhUserId']; return this; } Map toJson() => { 'BhUserId': BhUserId }; getTypeName() => "DonationMemberInfo"; TypeContext? context = _ctx; } class DonationRecurringInfo implements IConvertible { /** * How often donation is collected automatically */ // @ApiMember(Description="How often donation is collected automatically", IsRequired=true, Name="Frequency") String? Frequency; /** * Number of recurring donation cycles. */ // @ApiMember(Description="Number of recurring donation cycles.", IsRequired=true, Name="NumberOfOccurrences") int? NumberOfOccurrences; /** * Allows the submitter to set a future date for the donation */ // @ApiMember(Description="Allows the submitter to set a future date for the donation", Name="FutureDonationDate") DateTime? FutureDonationDate; DonationRecurringInfo({this.Frequency,this.NumberOfOccurrences,this.FutureDonationDate}); DonationRecurringInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Frequency = json['Frequency']; NumberOfOccurrences = json['NumberOfOccurrences']; FutureDonationDate = JsonConverters.fromJson(json['FutureDonationDate'],'DateTime',context!); return this; } Map toJson() => { 'Frequency': Frequency, 'NumberOfOccurrences': NumberOfOccurrences, 'FutureDonationDate': JsonConverters.toJson(FutureDonationDate,'DateTime',context!) }; getTypeName() => "DonationRecurringInfo"; TypeContext? context = _ctx; } class JsonObject extends Map implements IConvertible { JsonObject(); JsonObject.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "JsonObject"; TypeContext? context = _ctx; } class DonationRequestBase implements IConvertible { /** * Client value for Group. String must already be configured in Billhighway system. */ // @ApiMember(Description="Client value for Group. String must already be configured in Billhighway system.", IsRequired=true, Name="GroupID") String? GroupId; /** * Amount of the payment. Must be an amount less than $10,000,000.00. */ // @ApiMember(Description="Amount of the payment. Must be an amount less than $10,000,000.00.", IsRequired=true, Name="Amount") double? Amount; /** * The currency the payment is being made in. Three digit currency code (see ISO 4217) for a valid currency supported by Billhighway. Defaults to USD */ // @ApiMember(Description="The currency the payment is being made in. Three digit currency code (see ISO 4217) for a valid currency supported by Billhighway. Defaults to USD", ExcludeInSchema=true, Name="CurrencyCode") String? CurrencyCode; /** * Notes about the donation. Maximum 70 characters. */ // @ApiMember(Description="Notes about the donation. Maximum 70 characters.", Name="Memo") String? Memo; // @ApiMember() DonationRecurringInfo? DonationRecurringInfo; /** * Custom fields */ // @ApiMember(Description="Custom fields", Name="MetaData") JsonObject? MetaData; DonationRequestBase({this.GroupId,this.Amount,this.CurrencyCode,this.Memo,this.DonationRecurringInfo,this.MetaData}); DonationRequestBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { GroupId = json['GroupId']; Amount = JsonConverters.toDouble(json['Amount']); CurrencyCode = json['CurrencyCode']; Memo = json['Memo']; DonationRecurringInfo = JsonConverters.fromJson(json['DonationRecurringInfo'],'DonationRecurringInfo',context!); MetaData = JsonConverters.fromJson(json['MetaData'],'JsonObject',context!); return this; } Map toJson() => { 'GroupId': GroupId, 'Amount': Amount, 'CurrencyCode': CurrencyCode, 'Memo': Memo, 'DonationRecurringInfo': JsonConverters.toJson(DonationRecurringInfo,'DonationRecurringInfo',context!), 'MetaData': JsonConverters.toJson(MetaData,'JsonObject',context!) }; getTypeName() => "DonationRequestBase"; TypeContext? context = _ctx; } abstract class IDonationRequestWithDonorInfo { DonationDonorInfo? DonorInfo; DonationMemberInfo? MemberInfo; String? GroupId; } abstract class IHaveErrorField { bool? IsError; } abstract class IHaveErrorField { bool? IsError; } class DonationCreditCardResponse implements IHaveErrorField, IConvertible { /** * Legacy ErrorCode */ // @ApiMember(Description="Legacy ErrorCode", ExcludeInSchema=true) // @Ignore() int? ErrorCode; String? ErrorMessage; bool? IsError; /** * Donation Transaction ID */ // @ApiMember(Description="Donation Transaction ID") String? TransactionId; String? CardRef; DonationCreditCardResponse({this.ErrorCode,this.ErrorMessage,this.IsError,this.TransactionId,this.CardRef}); DonationCreditCardResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ErrorCode = json['ErrorCode']; ErrorMessage = json['ErrorMessage']; IsError = json['IsError']; TransactionId = json['TransactionId']; CardRef = json['CardRef']; return this; } Map toJson() => { 'ErrorCode': ErrorCode, 'ErrorMessage': ErrorMessage, 'IsError': IsError, 'TransactionId': TransactionId, 'CardRef': CardRef }; getTypeName() => "DonationCreditCardResponse"; TypeContext? context = _ctx; } // @Route("/donations/creditcard", "POST") class DonationCreditCardRequest extends DonationRequestBase implements IReturn, IDonationRequestWithDonorInfo, IConvertible { /** * Not required if MemberInfo is present on request */ // @ApiMember(Description="Not required if MemberInfo is present on request") DonationDonorInfo? DonorInfo; /** * Not required if DonorInfo is present on request */ // @ApiMember(Description="Not required if DonorInfo is present on request") DonationMemberInfo? MemberInfo; /** * Campaign to track donation against and to define fund allocation. Use GET /campaigns to retreive valid list of campaignIDs */ // @ApiMember(Description="Campaign to track donation against and to define fund allocation. Use GET /campaigns to retreive valid list of campaignIDs") int? CampaignId; /** * CardRef returned from client-side tokenization. Also handles raw card number if your servers are PCI-DSS-compliant, and in that case this must be a valid card number for the CardType indicated. */ // @ApiMember(Description="CardRef returned from client-side tokenization. Also handles raw card number if your servers are PCI-DSS-compliant, and in that case this must be a valid card number for the CardType indicated.", IsRequired=true, Name="CardReferenceOrCardNumber") String? CardReferenceOrCardNumber; String? CardType; /** * Credit Card Validation value. If Visa, Master Card or Discover, must be 3 digits. If AmEx, must be 4 digits. */ // @ApiMember(Description="Credit Card Validation value. If Visa, Master Card or Discover, must be 3 digits. If AmEx, must be 4 digits.", Name="Cvv") String? Cvv; // @ApiMember(IsRequired=true) // @ApiMember(Description="Credit Card expiration month. Valid Values 1-12.", IsRequired=true, Name="ExpirationMonth") int? ExpirationMonth; /** * Credit Card expiration year. Four-digit Year. Value cannot be less than current year or more than 20 years in the future. ExpMonth + ExpYear must not be in the past. */ // @ApiMember(Description="Credit Card expiration year. Four-digit Year. Value cannot be less than current year or more than 20 years in the future. ExpMonth + ExpYear must not be in the past.", IsRequired=true, Name="ExpirationYear") int? ExpirationYear; DonationCreditCardRequest({this.DonorInfo,this.MemberInfo,this.CampaignId,this.CardReferenceOrCardNumber,this.CardType,this.Cvv,this.ExpirationMonth,this.ExpirationYear}); DonationCreditCardRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); DonorInfo = JsonConverters.fromJson(json['DonorInfo'],'DonationDonorInfo',context!); MemberInfo = JsonConverters.fromJson(json['MemberInfo'],'DonationMemberInfo',context!); CampaignId = json['CampaignId']; CardReferenceOrCardNumber = json['CardReferenceOrCardNumber']; CardType = json['CardType']; Cvv = json['Cvv']; ExpirationMonth = json['ExpirationMonth']; ExpirationYear = json['ExpirationYear']; return this; } Map toJson() => super.toJson()..addAll({ 'DonorInfo': JsonConverters.toJson(DonorInfo,'DonationDonorInfo',context!), 'MemberInfo': JsonConverters.toJson(MemberInfo,'DonationMemberInfo',context!), 'CampaignId': CampaignId, 'CardReferenceOrCardNumber': CardReferenceOrCardNumber, 'CardType': CardType, 'Cvv': Cvv, 'ExpirationMonth': ExpirationMonth, 'ExpirationYear': ExpirationYear }); createResponse() => DonationCreditCardResponse(); getResponseTypeName() => "DonationCreditCardResponse"; getTypeName() => "DonationCreditCardRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: { 'DonationDonorInfo': TypeInfo(TypeOf.Class, create:() => DonationDonorInfo()), 'DonationMemberInfo': TypeInfo(TypeOf.Class, create:() => DonationMemberInfo()), 'DonationRecurringInfo': TypeInfo(TypeOf.Class, create:() => DonationRecurringInfo()), 'JsonObject': TypeInfo(TypeOf.Class, create:() => JsonObject()), 'DonationRequestBase': TypeInfo(TypeOf.Class, create:() => DonationRequestBase()), 'IDonationRequestWithDonorInfo': TypeInfo(TypeOf.Interface), 'IHaveErrorField': TypeInfo(TypeOf.Interface), 'DonationCreditCardResponse': TypeInfo(TypeOf.Class, create:() => DonationCreditCardResponse()), 'DonationCreditCardRequest': TypeInfo(TypeOf.Class, create:() => DonationCreditCardRequest()), });