| POST | /integrations/api/{integrationType}/heldpayment/chargerefund |
|---|
import 'package:servicestack/servicestack.dart';
class HeldPaymentGatewaySaleResponse implements IConvertible
{
String? FailureType;
bool? IsDuplicate;
bool? IsSuccessful;
String? ErrorCode;
String? Message;
int? GatewayId;
String? ConfirmationNumber;
String? NetworkTransactionId;
HeldPaymentGatewaySaleResponse({this.FailureType,this.IsDuplicate,this.IsSuccessful,this.ErrorCode,this.Message,this.GatewayId,this.ConfirmationNumber,this.NetworkTransactionId});
HeldPaymentGatewaySaleResponse.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() => "HeldPaymentGatewaySaleResponse";
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 HeldPaymentCreditCardChargeDetails implements IConvertible
{
String? CardType;
int? ExpMonth;
int? ExpYear;
String? Last4;
CreditCardBillingAddressItem? Address;
CreditCardChargeVerificationResult? VerificationResult;
HeldPaymentCreditCardChargeDetails({this.CardType,this.ExpMonth,this.ExpYear,this.Last4,this.Address,this.VerificationResult});
HeldPaymentCreditCardChargeDetails.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() => "HeldPaymentCreditCardChargeDetails";
TypeContext? context = _ctx;
}
class AchChargeVerificationResult implements IConvertible
{
bool? NetworkVerificationAttempted;
String? Result;
AchChargeVerificationResult({this.NetworkVerificationAttempted,this.Result});
AchChargeVerificationResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
NetworkVerificationAttempted = json['NetworkVerificationAttempted'];
Result = json['Result'];
return this;
}
Map<String, dynamic> toJson() => {
'NetworkVerificationAttempted': NetworkVerificationAttempted,
'Result': Result
};
getTypeName() => "AchChargeVerificationResult";
TypeContext? context = _ctx;
}
class HeldPaymentAchChargeDetails implements IConvertible
{
String? AccountType;
String? RoutingNumber;
String? AccountNumberLast4;
String? BankName;
AchChargeVerificationResult? VerificationResult;
HeldPaymentAchChargeDetails({this.AccountType,this.RoutingNumber,this.AccountNumberLast4,this.BankName,this.VerificationResult});
HeldPaymentAchChargeDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AccountType = json['AccountType'];
RoutingNumber = json['RoutingNumber'];
AccountNumberLast4 = json['AccountNumberLast4'];
BankName = json['BankName'];
VerificationResult = JsonConverters.fromJson(json['VerificationResult'],'AchChargeVerificationResult',context!);
return this;
}
Map<String, dynamic> toJson() => {
'AccountType': AccountType,
'RoutingNumber': RoutingNumber,
'AccountNumberLast4': AccountNumberLast4,
'BankName': BankName,
'VerificationResult': JsonConverters.toJson(VerificationResult,'AchChargeVerificationResult',context!)
};
getTypeName() => "HeldPaymentAchChargeDetails";
TypeContext? context = _ctx;
}
class HeldPaymentChargeDetails implements IConvertible
{
String? PaymentType;
double? Amount;
String? IntegrationType;
String? Currency;
HeldPaymentCreditCardChargeDetails? CardDetails;
HeldPaymentAchChargeDetails? AchDetails;
HeldPaymentChargeDetails({this.PaymentType,this.Amount,this.IntegrationType,this.Currency,this.CardDetails,this.AchDetails});
HeldPaymentChargeDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PaymentType = json['PaymentType'];
Amount = JsonConverters.toDouble(json['Amount']);
IntegrationType = json['IntegrationType'];
Currency = json['Currency'];
CardDetails = JsonConverters.fromJson(json['CardDetails'],'HeldPaymentCreditCardChargeDetails',context!);
AchDetails = JsonConverters.fromJson(json['AchDetails'],'HeldPaymentAchChargeDetails',context!);
return this;
}
Map<String, dynamic> toJson() => {
'PaymentType': PaymentType,
'Amount': Amount,
'IntegrationType': IntegrationType,
'Currency': Currency,
'CardDetails': JsonConverters.toJson(CardDetails,'HeldPaymentCreditCardChargeDetails',context!),
'AchDetails': JsonConverters.toJson(AchDetails,'HeldPaymentAchChargeDetails',context!)
};
getTypeName() => "HeldPaymentChargeDetails";
TypeContext? context = _ctx;
}
class HeldPaymentChargeRefundRs implements IConvertible
{
int? NationalId;
int? ChapterId;
String? IntegrationType;
int? ContextIntegrationPartnerId;
int? CallerIntegrationPartnerId;
HeldPaymentGatewaySaleResponse? GatewayResponse;
HeldPaymentChargeDetails? ChargeDetails;
HeldPaymentChargeRefundRs({this.NationalId,this.ChapterId,this.IntegrationType,this.ContextIntegrationPartnerId,this.CallerIntegrationPartnerId,this.GatewayResponse,this.ChargeDetails});
HeldPaymentChargeRefundRs.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
NationalId = json['NationalId'];
ChapterId = json['ChapterId'];
IntegrationType = json['IntegrationType'];
ContextIntegrationPartnerId = json['ContextIntegrationPartnerId'];
CallerIntegrationPartnerId = json['CallerIntegrationPartnerId'];
GatewayResponse = JsonConverters.fromJson(json['GatewayResponse'],'HeldPaymentGatewaySaleResponse',context!);
ChargeDetails = JsonConverters.fromJson(json['ChargeDetails'],'HeldPaymentChargeDetails',context!);
return this;
}
Map<String, dynamic> toJson() => {
'NationalId': NationalId,
'ChapterId': ChapterId,
'IntegrationType': IntegrationType,
'ContextIntegrationPartnerId': ContextIntegrationPartnerId,
'CallerIntegrationPartnerId': CallerIntegrationPartnerId,
'GatewayResponse': JsonConverters.toJson(GatewayResponse,'HeldPaymentGatewaySaleResponse',context!),
'ChargeDetails': JsonConverters.toJson(ChargeDetails,'HeldPaymentChargeDetails',context!)
};
getTypeName() => "HeldPaymentChargeRefundRs";
TypeContext? context = _ctx;
}
class HeldPaymentCreditCardChargeRefundDetails implements IConvertible
{
String? CardRef;
int? ExpMonth;
int? ExpYear;
String? CVV;
String? CardType;
String? NameOnCard;
String? Address1;
String? Address2;
String? City;
String? State;
String? PostalCode;
String? Country;
HeldPaymentCreditCardChargeRefundDetails({this.CardRef,this.ExpMonth,this.ExpYear,this.CVV,this.CardType,this.NameOnCard,this.Address1,this.Address2,this.City,this.State,this.PostalCode,this.Country});
HeldPaymentCreditCardChargeRefundDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CardRef = json['CardRef'];
ExpMonth = json['ExpMonth'];
ExpYear = json['ExpYear'];
CVV = json['CVV'];
CardType = json['CardType'];
NameOnCard = json['NameOnCard'];
Address1 = json['Address1'];
Address2 = json['Address2'];
City = json['City'];
State = json['State'];
PostalCode = json['PostalCode'];
Country = json['Country'];
return this;
}
Map<String, dynamic> toJson() => {
'CardRef': CardRef,
'ExpMonth': ExpMonth,
'ExpYear': ExpYear,
'CVV': CVV,
'CardType': CardType,
'NameOnCard': NameOnCard,
'Address1': Address1,
'Address2': Address2,
'City': City,
'State': State,
'PostalCode': PostalCode,
'Country': Country
};
getTypeName() => "HeldPaymentCreditCardChargeRefundDetails";
TypeContext? context = _ctx;
}
class HeldPaymentChargeRefundRq implements IConvertible
{
String? integrationType;
int? NationalId;
int? ChapterId;
int? UserId;
int? ContextIntegrationPartnerId;
int? CallerIntegrationPartnerId;
int? AuthenticationId;
double? Amount;
String? Description;
String? GatewayConfirmation;
HeldPaymentCreditCardChargeRefundDetails? CardInfo;
HeldPaymentChargeRefundRq({this.integrationType,this.NationalId,this.ChapterId,this.UserId,this.ContextIntegrationPartnerId,this.CallerIntegrationPartnerId,this.AuthenticationId,this.Amount,this.Description,this.GatewayConfirmation,this.CardInfo});
HeldPaymentChargeRefundRq.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
integrationType = json['integrationType'];
NationalId = json['NationalId'];
ChapterId = json['ChapterId'];
UserId = json['UserId'];
ContextIntegrationPartnerId = json['ContextIntegrationPartnerId'];
CallerIntegrationPartnerId = json['CallerIntegrationPartnerId'];
AuthenticationId = json['AuthenticationId'];
Amount = JsonConverters.toDouble(json['Amount']);
Description = json['Description'];
GatewayConfirmation = json['GatewayConfirmation'];
CardInfo = JsonConverters.fromJson(json['CardInfo'],'HeldPaymentCreditCardChargeRefundDetails',context!);
return this;
}
Map<String, dynamic> toJson() => {
'integrationType': integrationType,
'NationalId': NationalId,
'ChapterId': ChapterId,
'UserId': UserId,
'ContextIntegrationPartnerId': ContextIntegrationPartnerId,
'CallerIntegrationPartnerId': CallerIntegrationPartnerId,
'AuthenticationId': AuthenticationId,
'Amount': Amount,
'Description': Description,
'GatewayConfirmation': GatewayConfirmation,
'CardInfo': JsonConverters.toJson(CardInfo,'HeldPaymentCreditCardChargeRefundDetails',context!)
};
getTypeName() => "HeldPaymentChargeRefundRq";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'HeldPaymentGatewaySaleResponse': TypeInfo(TypeOf.Class, create:() => HeldPaymentGatewaySaleResponse()),
'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()),
'HeldPaymentCreditCardChargeDetails': TypeInfo(TypeOf.Class, create:() => HeldPaymentCreditCardChargeDetails()),
'AchChargeVerificationResult': TypeInfo(TypeOf.Class, create:() => AchChargeVerificationResult()),
'HeldPaymentAchChargeDetails': TypeInfo(TypeOf.Class, create:() => HeldPaymentAchChargeDetails()),
'HeldPaymentChargeDetails': TypeInfo(TypeOf.Class, create:() => HeldPaymentChargeDetails()),
'HeldPaymentChargeRefundRs': TypeInfo(TypeOf.Class, create:() => HeldPaymentChargeRefundRs()),
'HeldPaymentCreditCardChargeRefundDetails': TypeInfo(TypeOf.Class, create:() => HeldPaymentCreditCardChargeRefundDetails()),
'HeldPaymentChargeRefundRq': TypeInfo(TypeOf.Class, create:() => HeldPaymentChargeRefundRq()),
});
Dart HeldPaymentChargeRefundRq DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /integrations/api/{integrationType}/heldpayment/chargerefund HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<HeldPaymentChargeRefundRq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.HeldPayments.Api.Request">
<Amount>0</Amount>
<AuthenticationId>0</AuthenticationId>
<CallerIntegrationPartnerId>0</CallerIntegrationPartnerId>
<CardInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.HeldPayments.Api">
<d2p1:Address1>String</d2p1:Address1>
<d2p1:Address2>String</d2p1:Address2>
<d2p1:CVV>String</d2p1:CVV>
<d2p1:CardRef>String</d2p1:CardRef>
<d2p1:CardType>String</d2p1:CardType>
<d2p1:City>String</d2p1:City>
<d2p1:Country>String</d2p1:Country>
<d2p1:ExpMonth>0</d2p1:ExpMonth>
<d2p1:ExpYear>0</d2p1:ExpYear>
<d2p1:NameOnCard>String</d2p1:NameOnCard>
<d2p1:PostalCode>String</d2p1:PostalCode>
<d2p1:State>String</d2p1:State>
</CardInfo>
<ChapterId>0</ChapterId>
<ContextIntegrationPartnerId>0</ContextIntegrationPartnerId>
<Description>String</Description>
<GatewayConfirmation>String</GatewayConfirmation>
<NationalId>0</NationalId>
<UserId>0</UserId>
<integrationType>String</integrationType>
</HeldPaymentChargeRefundRq>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<HeldPaymentChargeRefundRs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.HeldPayments.Api.Response">
<CallerIntegrationPartnerId>0</CallerIntegrationPartnerId>
<ChapterId>0</ChapterId>
<ChargeDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.HeldPayments.Api">
<d2p1:AchDetails>
<d2p1:_x003C_AccountNumberLast4_x003E_k__BackingField>String</d2p1:_x003C_AccountNumberLast4_x003E_k__BackingField>
<d2p1:_x003C_AccountType_x003E_k__BackingField>String</d2p1:_x003C_AccountType_x003E_k__BackingField>
<d2p1:_x003C_BankName_x003E_k__BackingField>String</d2p1:_x003C_BankName_x003E_k__BackingField>
<d2p1:_x003C_RoutingNumber_x003E_k__BackingField>String</d2p1:_x003C_RoutingNumber_x003E_k__BackingField>
<d2p1:_x003C_VerificationResult_x003E_k__BackingField xmlns:d4p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.Charges.Api">
<d4p1:_x003C_NetworkVerificationAttempted_x003E_k__BackingField>false</d4p1:_x003C_NetworkVerificationAttempted_x003E_k__BackingField>
<d4p1:_x003C_Result_x003E_k__BackingField>String</d4p1:_x003C_Result_x003E_k__BackingField>
</d2p1:_x003C_VerificationResult_x003E_k__BackingField>
</d2p1:AchDetails>
<d2p1:Amount>0</d2p1:Amount>
<d2p1:CardDetails>
<d2p1:_x003C_Address_x003E_k__BackingField xmlns:d4p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.Charges.Api">
<d4p1:Address1>String</d4p1:Address1>
<d4p1:Address2>String</d4p1:Address2>
<d4p1:Attributes xmlns:d5p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO">
<d5p1:AttributeItem>
<d5p1:Name>String</d5p1:Name>
<d5p1:Value>String</d5p1:Value>
</d5p1:AttributeItem>
</d4p1:Attributes>
<d4p1:City>String</d4p1:City>
<d4p1:Country>String</d4p1:Country>
<d4p1:PostalCode>String</d4p1:PostalCode>
<d4p1:Region>String</d4p1:Region>
</d2p1:_x003C_Address_x003E_k__BackingField>
<d2p1:_x003C_CardType_x003E_k__BackingField>String</d2p1:_x003C_CardType_x003E_k__BackingField>
<d2p1:_x003C_ExpMonth_x003E_k__BackingField>0</d2p1:_x003C_ExpMonth_x003E_k__BackingField>
<d2p1:_x003C_ExpYear_x003E_k__BackingField>0</d2p1:_x003C_ExpYear_x003E_k__BackingField>
<d2p1:_x003C_Last4_x003E_k__BackingField>String</d2p1:_x003C_Last4_x003E_k__BackingField>
<d2p1:_x003C_VerificationResult_x003E_k__BackingField xmlns:d4p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.Charges.Api">
<d4p1:_x003C_AddressVerificationResult_x003E_k__BackingField>String</d4p1:_x003C_AddressVerificationResult_x003E_k__BackingField>
<d4p1:_x003C_CvvVerificationResult_x003E_k__BackingField>String</d4p1:_x003C_CvvVerificationResult_x003E_k__BackingField>
<d4p1:_x003C_NetworkVerificationAttempted_x003E_k__BackingField>false</d4p1:_x003C_NetworkVerificationAttempted_x003E_k__BackingField>
<d4p1:_x003C_PostalCodeVerificationResult_x003E_k__BackingField>String</d4p1:_x003C_PostalCodeVerificationResult_x003E_k__BackingField>
</d2p1:_x003C_VerificationResult_x003E_k__BackingField>
</d2p1:CardDetails>
<d2p1:Currency>String</d2p1:Currency>
<d2p1:IntegrationType>String</d2p1:IntegrationType>
<d2p1:PaymentType>String</d2p1:PaymentType>
</ChargeDetails>
<ContextIntegrationPartnerId>0</ContextIntegrationPartnerId>
<GatewayResponse xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.HeldPayments">
<d2p1:_x003C_ConfirmationNumber_x003E_k__BackingField>String</d2p1:_x003C_ConfirmationNumber_x003E_k__BackingField>
<d2p1:_x003C_ErrorCode_x003E_k__BackingField>String</d2p1:_x003C_ErrorCode_x003E_k__BackingField>
<d2p1:_x003C_FailureType_x003E_k__BackingField>String</d2p1:_x003C_FailureType_x003E_k__BackingField>
<d2p1:_x003C_GatewayId_x003E_k__BackingField>0</d2p1:_x003C_GatewayId_x003E_k__BackingField>
<d2p1:_x003C_IsDuplicate_x003E_k__BackingField>false</d2p1:_x003C_IsDuplicate_x003E_k__BackingField>
<d2p1:_x003C_IsSuccessful_x003E_k__BackingField>false</d2p1:_x003C_IsSuccessful_x003E_k__BackingField>
<d2p1:_x003C_Message_x003E_k__BackingField>String</d2p1:_x003C_Message_x003E_k__BackingField>
<d2p1:_x003C_NetworkTransactionId_x003E_k__BackingField>String</d2p1:_x003C_NetworkTransactionId_x003E_k__BackingField>
</GatewayResponse>
<IntegrationType>String</IntegrationType>
<NationalId>0</NationalId>
</HeldPaymentChargeRefundRs>