/* Options: Date: 2026-11-08 11:52:33 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: ChargeTokenRq.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class ReferenceIdTypedAssociationItem implements IConvertible { String? Value; String? Type; ReferenceIdTypedAssociationItem({this.Value,this.Type}); ReferenceIdTypedAssociationItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Value = json['Value']; Type = json['Type']; return this; } Map toJson() => { 'Value': Value, 'Type': Type }; getTypeName() => "ReferenceIdTypedAssociationItem"; TypeContext? context = _ctx; } class ChargeTokenOptions implements IConvertible { int? Usages; int? Duration; ChargeTokenOptions({this.Usages,this.Duration}); ChargeTokenOptions.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Usages = json['Usages']; Duration = json['Duration']; return this; } Map toJson() => { 'Usages': Usages, 'Duration': Duration }; getTypeName() => "ChargeTokenOptions"; TypeContext? context = _ctx; } class AttributeItem implements IConvertible { String? Name; String? Value; AttributeItem({this.Name,this.Value}); AttributeItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Name = json['Name']; Value = json['Value']; return this; } Map 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? Attributes; CreditCardBillingAddressItem({this.Address1,this.Address2,this.City,this.PostalCode,this.Region,this.Country,this.Attributes}); CreditCardBillingAddressItem.fromJson(Map json) { fromMap(json); } fromMap(Map 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',context!); return this; } Map toJson() => { 'Address1': Address1, 'Address2': Address2, 'City': City, 'PostalCode': PostalCode, 'Region': Region, 'Country': Country, 'Attributes': JsonConverters.toJson(Attributes,'List',context!) }; getTypeName() => "CreditCardBillingAddressItem"; TypeContext? context = _ctx; } class CreditCardChargeItem implements IConvertible { String? NameOnCard; int? ExpMonth; int? ExpYear; String? CardNumber; String? Cvv; CreditCardBillingAddressItem? Address; CreditCardChargeItem({this.NameOnCard,this.ExpMonth,this.ExpYear,this.CardNumber,this.Cvv,this.Address}); CreditCardChargeItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { NameOnCard = json['NameOnCard']; ExpMonth = json['ExpMonth']; ExpYear = json['ExpYear']; CardNumber = json['CardNumber']; Cvv = json['Cvv']; Address = JsonConverters.fromJson(json['Address'],'CreditCardBillingAddressItem',context!); return this; } Map toJson() => { 'NameOnCard': NameOnCard, 'ExpMonth': ExpMonth, 'ExpYear': ExpYear, 'CardNumber': CardNumber, 'Cvv': Cvv, 'Address': JsonConverters.toJson(Address,'CreditCardBillingAddressItem',context!) }; getTypeName() => "CreditCardChargeItem"; TypeContext? context = _ctx; } class AchChargeItem implements IConvertible { String? AccountNumber; String? RoutingNumber; String? AccountType; String? AccountHolderName; AchChargeItem({this.AccountNumber,this.RoutingNumber,this.AccountType,this.AccountHolderName}); AchChargeItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AccountNumber = json['AccountNumber']; RoutingNumber = json['RoutingNumber']; AccountType = json['AccountType']; AccountHolderName = json['AccountHolderName']; return this; } Map toJson() => { 'AccountNumber': AccountNumber, 'RoutingNumber': RoutingNumber, 'AccountType': AccountType, 'AccountHolderName': AccountHolderName }; getTypeName() => "AchChargeItem"; TypeContext? context = _ctx; } abstract class ChargeTokenRqBase implements IChapterAuthorizationRequest, IApiResultErrorService { String? tokenType; int? Amount; String? Description; ChargeTokenOptions? Options; CreditCardChargeItem? CardInfo; AchChargeItem? AchInfo; List? ReferenceIds; ChargeTokenRqBase({this.tokenType,this.Amount,this.Description,this.Options,this.CardInfo,this.AchInfo,this.ReferenceIds}); ChargeTokenRqBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { tokenType = json['tokenType']; Amount = json['Amount']; Description = json['Description']; Options = JsonConverters.fromJson(json['Options'],'ChargeTokenOptions',context!); CardInfo = JsonConverters.fromJson(json['CardInfo'],'CreditCardChargeItem',context!); AchInfo = JsonConverters.fromJson(json['AchInfo'],'AchChargeItem',context!); ReferenceIds = JsonConverters.fromJson(json['ReferenceIds'],'List',context!); return this; } Map toJson() => { 'tokenType': tokenType, 'Amount': Amount, 'Description': Description, 'Options': JsonConverters.toJson(Options,'ChargeTokenOptions',context!), 'CardInfo': JsonConverters.toJson(CardInfo,'CreditCardChargeItem',context!), 'AchInfo': JsonConverters.toJson(AchInfo,'AchChargeItem',context!), 'ReferenceIds': JsonConverters.toJson(ReferenceIds,'List',context!) }; getTypeName() => "ChargeTokenRqBase"; TypeContext? context = _ctx; } abstract class IChapterAuthorizationRequest { } abstract class IApiResultErrorService { } class CreditCardChargeVerificationResult implements IConvertible { bool? NetworkVerificationAttempted; String? CvvVerificationResult; String? AddressVerificationResult; String? PostalCodeVerificationResult; CreditCardChargeVerificationResult({this.NetworkVerificationAttempted,this.CvvVerificationResult,this.AddressVerificationResult,this.PostalCodeVerificationResult}); CreditCardChargeVerificationResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { NetworkVerificationAttempted = json['NetworkVerificationAttempted']; CvvVerificationResult = json['CvvVerificationResult']; AddressVerificationResult = json['AddressVerificationResult']; PostalCodeVerificationResult = json['PostalCodeVerificationResult']; return this; } Map toJson() => { 'NetworkVerificationAttempted': NetworkVerificationAttempted, 'CvvVerificationResult': CvvVerificationResult, 'AddressVerificationResult': AddressVerificationResult, 'PostalCodeVerificationResult': PostalCodeVerificationResult }; getTypeName() => "CreditCardChargeVerificationResult"; TypeContext? context = _ctx; } class CreditCardChargeDetails implements IConvertible { String? CardType; int? ExpMonth; int? ExpYear; String? Last4; CreditCardBillingAddressItem? Address; CreditCardChargeVerificationResult? VerificationResult; CreditCardChargeDetails({this.CardType,this.ExpMonth,this.ExpYear,this.Last4,this.Address,this.VerificationResult}); CreditCardChargeDetails.fromJson(Map json) { fromMap(json); } fromMap(Map 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 toJson() => { 'CardType': CardType, 'ExpMonth': ExpMonth, 'ExpYear': ExpYear, 'Last4': Last4, 'Address': JsonConverters.toJson(Address,'CreditCardBillingAddressItem',context!), 'VerificationResult': JsonConverters.toJson(VerificationResult,'CreditCardChargeVerificationResult',context!) }; getTypeName() => "CreditCardChargeDetails"; TypeContext? context = _ctx; } class AchChargeVerificationResult implements IConvertible { bool? NetworkVerificationAttempted; String? Result; AchChargeVerificationResult({this.NetworkVerificationAttempted,this.Result}); AchChargeVerificationResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { NetworkVerificationAttempted = json['NetworkVerificationAttempted']; Result = json['Result']; return this; } Map toJson() => { 'NetworkVerificationAttempted': NetworkVerificationAttempted, 'Result': Result }; getTypeName() => "AchChargeVerificationResult"; TypeContext? context = _ctx; } class AchChargeDetails implements IConvertible { String? AccountType; String? RoutingNumber; String? AccountNumberLast4; String? BankName; AchChargeVerificationResult? VerificationResult; AchChargeDetails({this.AccountType,this.RoutingNumber,this.AccountNumberLast4,this.BankName,this.VerificationResult}); AchChargeDetails.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AccountType = json['AccountType']; RoutingNumber = json['RoutingNumber']; AccountNumberLast4 = json['AccountNumberLast4']; BankName = json['BankName']; VerificationResult = JsonConverters.fromJson(json['VerificationResult'],'AchChargeVerificationResult',context!); return this; } Map toJson() => { 'AccountType': AccountType, 'RoutingNumber': RoutingNumber, 'AccountNumberLast4': AccountNumberLast4, 'BankName': BankName, 'VerificationResult': JsonConverters.toJson(VerificationResult,'AchChargeVerificationResult',context!) }; getTypeName() => "AchChargeDetails"; TypeContext? context = _ctx; } class AttributeItem implements IConvertible { String? Name; String? Value; AttributeItem({this.Name,this.Value}); AttributeItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Name = json['Name']; Value = json['Value']; return this; } Map toJson() => { 'Name': Name, 'Value': Value }; getTypeName() => "AttributeItem"; TypeContext? context = _ctx; } class ChargeTokenRs implements IConvertible { String? Token; int? OrganizationId; int? ChapterId; int? Amount; String? TokenType; String? Description; DateTime? ExpiresOn; String? Currency; int? Usages; CreditCardChargeDetails? CardDetails; AchChargeDetails? AchDetails; ChargeTokenRs({this.Token,this.OrganizationId,this.ChapterId,this.Amount,this.TokenType,this.Description,this.ExpiresOn,this.Currency,this.Usages,this.CardDetails,this.AchDetails}); ChargeTokenRs.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Token = json['Token']; OrganizationId = json['OrganizationId']; ChapterId = json['ChapterId']; Amount = json['Amount']; TokenType = json['TokenType']; Description = json['Description']; ExpiresOn = JsonConverters.fromJson(json['ExpiresOn'],'DateTime',context!); Currency = json['Currency']; Usages = json['Usages']; CardDetails = JsonConverters.fromJson(json['CardDetails'],'CreditCardChargeDetails',context!); AchDetails = JsonConverters.fromJson(json['AchDetails'],'AchChargeDetails',context!); return this; } Map toJson() => { 'Token': Token, 'OrganizationId': OrganizationId, 'ChapterId': ChapterId, 'Amount': Amount, 'TokenType': TokenType, 'Description': Description, 'ExpiresOn': JsonConverters.toJson(ExpiresOn,'DateTime',context!), 'Currency': Currency, 'Usages': Usages, 'CardDetails': JsonConverters.toJson(CardDetails,'CreditCardChargeDetails',context!), 'AchDetails': JsonConverters.toJson(AchDetails,'AchChargeDetails',context!) }; getTypeName() => "ChargeTokenRs"; TypeContext? context = _ctx; } // @Route("/integrations/api/{tokenType}/charge/token", "POST") class ChargeTokenRq extends ChargeTokenRqBase implements IReturn, IConvertible { ChargeTokenRq(); ChargeTokenRq.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => ChargeTokenRs(); getResponseTypeName() => "ChargeTokenRs"; getTypeName() => "ChargeTokenRq"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: { 'ReferenceIdTypedAssociationItem': TypeInfo(TypeOf.Class, create:() => ReferenceIdTypedAssociationItem()), 'ChargeTokenOptions': TypeInfo(TypeOf.Class, create:() => ChargeTokenOptions()), 'AttributeItem': TypeInfo(TypeOf.Class, create:() => AttributeItem()), 'CreditCardBillingAddressItem': TypeInfo(TypeOf.Class, create:() => CreditCardBillingAddressItem()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreditCardChargeItem': TypeInfo(TypeOf.Class, create:() => CreditCardChargeItem()), 'AchChargeItem': TypeInfo(TypeOf.Class, create:() => AchChargeItem()), 'ChargeTokenRqBase': TypeInfo(TypeOf.AbstractClass), 'List': TypeInfo(TypeOf.Class, create:() => []), 'IChapterAuthorizationRequest': TypeInfo(TypeOf.Interface), 'IApiResultErrorService': TypeInfo(TypeOf.Interface), 'CreditCardChargeVerificationResult': TypeInfo(TypeOf.Class, create:() => CreditCardChargeVerificationResult()), 'CreditCardChargeDetails': TypeInfo(TypeOf.Class, create:() => CreditCardChargeDetails()), 'AchChargeVerificationResult': TypeInfo(TypeOf.Class, create:() => AchChargeVerificationResult()), 'AchChargeDetails': TypeInfo(TypeOf.Class, create:() => AchChargeDetails()), 'ChargeTokenRs': TypeInfo(TypeOf.Class, create:() => ChargeTokenRs()), 'ChargeTokenRq': TypeInfo(TypeOf.Class, create:() => ChargeTokenRq()), });