/* Options: Date: 2026-11-08 11:52:57 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: ChargeTokenV2Rq.* //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 CreditCardChargeDetailsV2 implements IConvertible { String? CardType; int? ExpMonth; int? ExpYear; String? Last4; CreditCardBillingAddressItem? Address; CreditCardChargeDetailsV2({this.CardType,this.ExpMonth,this.ExpYear,this.Last4,this.Address}); CreditCardChargeDetailsV2.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!); return this; } Map toJson() => { 'CardType': CardType, 'ExpMonth': ExpMonth, 'ExpYear': ExpYear, 'Last4': Last4, 'Address': JsonConverters.toJson(Address,'CreditCardBillingAddressItem',context!) }; getTypeName() => "CreditCardChargeDetailsV2"; TypeContext? context = _ctx; } class AchChargeDetailsV2 implements IConvertible { String? AccountType; String? RoutingNumber; String? AccountNumberLast4; String? BankName; AchChargeDetailsV2({this.AccountType,this.RoutingNumber,this.AccountNumberLast4,this.BankName}); AchChargeDetailsV2.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AccountType = json['AccountType']; RoutingNumber = json['RoutingNumber']; AccountNumberLast4 = json['AccountNumberLast4']; BankName = json['BankName']; return this; } Map toJson() => { 'AccountType': AccountType, 'RoutingNumber': RoutingNumber, 'AccountNumberLast4': AccountNumberLast4, 'BankName': BankName }; getTypeName() => "AchChargeDetailsV2"; 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 ChargeTokenV2Rs implements IConvertible { String? Token; int? Amount; String? TokenType; String? Description; DateTime? ExpiresOn; String? Currency; int? Usages; CreditCardChargeDetailsV2? CardDetails; AchChargeDetailsV2? AchDetails; ChargeTokenV2Rs({this.Token,this.Amount,this.TokenType,this.Description,this.ExpiresOn,this.Currency,this.Usages,this.CardDetails,this.AchDetails}); ChargeTokenV2Rs.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Token = json['Token']; 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'],'CreditCardChargeDetailsV2',context!); AchDetails = JsonConverters.fromJson(json['AchDetails'],'AchChargeDetailsV2',context!); return this; } Map toJson() => { 'Token': Token, 'Amount': Amount, 'TokenType': TokenType, 'Description': Description, 'ExpiresOn': JsonConverters.toJson(ExpiresOn,'DateTime',context!), 'Currency': Currency, 'Usages': Usages, 'CardDetails': JsonConverters.toJson(CardDetails,'CreditCardChargeDetailsV2',context!), 'AchDetails': JsonConverters.toJson(AchDetails,'AchChargeDetailsV2',context!) }; getTypeName() => "ChargeTokenV2Rs"; TypeContext? context = _ctx; } // @Route("/integrations/api/v2/{tokenType}/charge/token", "POST") class ChargeTokenV2Rq extends ChargeTokenRqBase implements IReturn, IConvertible { ChargeTokenV2Rq(); ChargeTokenV2Rq.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => ChargeTokenV2Rs(); getResponseTypeName() => "ChargeTokenV2Rs"; getTypeName() => "ChargeTokenV2Rq"; 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), 'CreditCardChargeDetailsV2': TypeInfo(TypeOf.Class, create:() => CreditCardChargeDetailsV2()), 'AchChargeDetailsV2': TypeInfo(TypeOf.Class, create:() => AchChargeDetailsV2()), 'ChargeTokenV2Rs': TypeInfo(TypeOf.Class, create:() => ChargeTokenV2Rs()), 'ChargeTokenV2Rq': TypeInfo(TypeOf.Class, create:() => ChargeTokenV2Rq()), });