/* Options: Date: 2026-11-08 12:02:45 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: DonationAchRequest.* //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 DonationAchResponse 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; DonationAchResponse({this.ErrorCode,this.ErrorMessage,this.IsError,this.TransactionId}); DonationAchResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ErrorCode = json['ErrorCode']; ErrorMessage = json['ErrorMessage']; IsError = json['IsError']; TransactionId = json['TransactionId']; return this; } Map toJson() => { 'ErrorCode': ErrorCode, 'ErrorMessage': ErrorMessage, 'IsError': IsError, 'TransactionId': TransactionId }; getTypeName() => "DonationAchResponse"; TypeContext? context = _ctx; } // @Route("/donations/ach", "POST") class DonationAchRequest 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; /** * Use GET /campaigns to retreive valid list of campaignIDs */ // @ApiMember(Description="Use GET /campaigns to retreive valid list of campaignIDs") int? CampaignId; /** * RoutingNumber and AccountNumber are not required if AchRef is provided */ // @ApiMember(Description="RoutingNumber and AccountNumber are not required if AchRef is provided") String? AchRef; /** * Required if AchRef is not provided */ // @ApiMember(Description="Required if AchRef is not provided") String? RoutingNumber; /** * Required if AchRef is not provided */ // @ApiMember(Description="Required if AchRef is not provided") String? AccountNumber; DonationAchRequest({this.DonorInfo,this.MemberInfo,this.CampaignId,this.AchRef,this.RoutingNumber,this.AccountNumber}); DonationAchRequest.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']; AchRef = json['AchRef']; RoutingNumber = json['RoutingNumber']; AccountNumber = json['AccountNumber']; return this; } Map toJson() => super.toJson()..addAll({ 'DonorInfo': JsonConverters.toJson(DonorInfo,'DonationDonorInfo',context!), 'MemberInfo': JsonConverters.toJson(MemberInfo,'DonationMemberInfo',context!), 'CampaignId': CampaignId, 'AchRef': AchRef, 'RoutingNumber': RoutingNumber, 'AccountNumber': AccountNumber }); createResponse() => DonationAchResponse(); getResponseTypeName() => "DonationAchResponse"; getTypeName() => "DonationAchRequest"; 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), 'DonationAchResponse': TypeInfo(TypeOf.Class, create:() => DonationAchResponse()), 'DonationAchRequest': TypeInfo(TypeOf.Class, create:() => DonationAchRequest()), });