| POST | /api/CreditCard/Payment/Refund | Performs a credit card payment refund against | Performs a credit card payment refund. |
|---|
import 'package:servicestack/servicestack.dart';
class CreditCardCloudServiceResponse implements IHaveErrorField, IConvertible
{
bool? IsDuplicate;
bool? IsSuccessful;
String? ErrorCode;
String? Message;
int? GatewayId;
String? ConfirmationNumber;
String? NetworkTransactionId;
bool? IsError;
CreditCardCloudServiceResponse({this.IsDuplicate,this.IsSuccessful,this.ErrorCode,this.Message,this.GatewayId,this.ConfirmationNumber,this.NetworkTransactionId,this.IsError});
CreditCardCloudServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
IsDuplicate = json['IsDuplicate'];
IsSuccessful = json['IsSuccessful'];
ErrorCode = json['ErrorCode'];
Message = json['Message'];
GatewayId = json['GatewayId'];
ConfirmationNumber = json['ConfirmationNumber'];
NetworkTransactionId = json['NetworkTransactionId'];
IsError = json['IsError'];
return this;
}
Map<String, dynamic> toJson() => {
'IsDuplicate': IsDuplicate,
'IsSuccessful': IsSuccessful,
'ErrorCode': ErrorCode,
'Message': Message,
'GatewayId': GatewayId,
'ConfirmationNumber': ConfirmationNumber,
'NetworkTransactionId': NetworkTransactionId,
'IsError': IsError
};
getTypeName() => "CreditCardCloudServiceResponse";
TypeContext? context = _ctx;
}
class PaymentFailureType
{
static const PaymentFailureType None = const PaymentFailureType._(0);
static const PaymentFailureType Gateway = const PaymentFailureType._(1);
static const PaymentFailureType PaymentTransaction = const PaymentFailureType._(2);
static const PaymentFailureType KeyProcurment = const PaymentFailureType._(3);
static const PaymentFailureType CardVerification = const PaymentFailureType._(4);
final int _value;
const PaymentFailureType._(this._value);
int get value => _value;
static List<PaymentFailureType> get values => const [None,Gateway,PaymentTransaction,KeyProcurment,CardVerification];
}
class CreditCardPaymentRefundResult extends CreditCardCloudServiceResponse implements IConvertible
{
int? TransactionRecordID;
PaymentFailureType? FailureType;
bool? IsOverpayment;
bool? PaymentNotFound;
CreditCardPaymentRefundResult({this.TransactionRecordID,this.FailureType,this.IsOverpayment,this.PaymentNotFound});
CreditCardPaymentRefundResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
TransactionRecordID = json['TransactionRecordID'];
FailureType = JsonConverters.fromJson(json['FailureType'],'PaymentFailureType',context!);
IsOverpayment = json['IsOverpayment'];
PaymentNotFound = json['PaymentNotFound'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'TransactionRecordID': TransactionRecordID,
'FailureType': JsonConverters.toJson(FailureType,'PaymentFailureType',context!),
'IsOverpayment': IsOverpayment,
'PaymentNotFound': PaymentNotFound
});
getTypeName() => "CreditCardPaymentRefundResult";
TypeContext? context = _ctx;
}
class CreditCardPaymentRefund extends CreditCardPaymentRefund implements IConvertible
{
CreditCardPaymentRefund();
CreditCardPaymentRefund.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "CreditCardPaymentRefund";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'CreditCardCloudServiceResponse': TypeInfo(TypeOf.Class, create:() => CreditCardCloudServiceResponse()),
'PaymentFailureType': TypeInfo(TypeOf.Enum, enumValues:PaymentFailureType.values),
'CreditCardPaymentRefundResult': TypeInfo(TypeOf.Class, create:() => CreditCardPaymentRefundResult()),
'CreditCardPaymentRefund': TypeInfo(TypeOf.Class, create:() => CreditCardPaymentRefund()),
});
Dart CreditCardPaymentRefund DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/CreditCard/Payment/Refund HTTP/1.1
Host: devapi.billhighway.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Header:
{
ClientId: 0,
Referrer: String,
IpAddress: String,
LoggedInUserId: 0,
GroupId: 0,
Task: String,
Machine: String,
Location: String,
CreatedBy: 0,
CampaignId: 0,
ReCaptchaScore: 0
},
RefundInfo:
{
CurrencyCode: String,
GatewayTransactionId: String,
Amount: 0,
Memo: String,
MemberPaymentId: 0,
Type: 0,
ReasonId: 0,
UserId: 0
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
TransactionRecordID: 0,
FailureType: 0,
IsOverpayment: False,
PaymentNotFound: False,
IsDuplicate: False,
IsSuccessful: False,
ErrorCode: String,
Message: String,
GatewayId: 0,
ConfirmationNumber: String,
NetworkTransactionId: String,
IsError: True
}