| POST | /api/creditcard/refund | Performs a credit card refund | Perform a partial, or full low level credit card charge reversal WITHOUT recording debit. This should be used only in conjunction with code that records the debit. |
|---|
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 RefundResponse extends CreditCardCloudServiceResponse implements IConvertible
{
bool? IsOverpayment;
bool? PaymentNotFound;
RefundResponse({this.IsOverpayment,this.PaymentNotFound});
RefundResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
IsOverpayment = json['IsOverpayment'];
PaymentNotFound = json['PaymentNotFound'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'IsOverpayment': IsOverpayment,
'PaymentNotFound': PaymentNotFound
});
getTypeName() => "RefundResponse";
TypeContext? context = _ctx;
}
class CreditCardRefund extends CreditCardRefund implements IConvertible
{
CreditCardRefund();
CreditCardRefund.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() => "CreditCardRefund";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'CreditCardCloudServiceResponse': TypeInfo(TypeOf.Class, create:() => CreditCardCloudServiceResponse()),
'RefundResponse': TypeInfo(TypeOf.Class, create:() => RefundResponse()),
'CreditCardRefund': TypeInfo(TypeOf.Class, create:() => CreditCardRefund()),
});
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/refund HTTP/1.1
Host: devapi.billhighway.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
UserId: 0,
GroupId: 0,
Location: String,
CurrencyCode: String,
GatewayConfirmationNumber: String,
RefundAmount: 0,
Memo: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
IsOverpayment: False,
PaymentNotFound: False,
IsDuplicate: False,
IsSuccessful: False,
ErrorCode: String,
Message: String,
GatewayId: 0,
ConfirmationNumber: String,
NetworkTransactionId: String,
IsError: True
}