| Required role: | REGISUserRole |
| POST | /Beanstream/Payment/{uuid}/CreditCard/Token/Create |
|---|
import 'package:servicestack/servicestack.dart';
class BeanstreamCreditCardCompletionResponse implements IConvertible
{
String? uuid;
String? id;
bool? approved;
String? message_id;
String? message;
String? order_number;
String? payment_method;
String? card_type;
String? card_last_four;
BeanstreamCreditCardCompletionResponse({this.uuid,this.id,this.approved,this.message_id,this.message,this.order_number,this.payment_method,this.card_type,this.card_last_four});
BeanstreamCreditCardCompletionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
uuid = json['uuid'];
id = json['id'];
approved = json['approved'];
message_id = json['message_id'];
message = json['message'];
order_number = json['order_number'];
payment_method = json['payment_method'];
card_type = json['card_type'];
card_last_four = json['card_last_four'];
return this;
}
Map<String, dynamic> toJson() => {
'uuid': uuid,
'id': id,
'approved': approved,
'message_id': message_id,
'message': message,
'order_number': order_number,
'payment_method': payment_method,
'card_type': card_type,
'card_last_four': card_last_four
};
getTypeName() => "BeanstreamCreditCardCompletionResponse";
TypeContext? context = _ctx;
}
class BeanstreamCreditCardTokenPaymentRequest implements IConvertible
{
String? uuid;
String? department;
String? item;
double? amount;
String? name;
String? customer_ip;
String? email;
String? addr1;
String? addr2;
String? city;
String? state;
String? country;
String? code;
String? phone;
String? token;
String? card_type;
String? token_last_four;
String? card_name;
BeanstreamCreditCardTokenPaymentRequest({this.uuid,this.department,this.item,this.amount,this.name,this.customer_ip,this.email,this.addr1,this.addr2,this.city,this.state,this.country,this.code,this.phone,this.token,this.card_type,this.token_last_four,this.card_name});
BeanstreamCreditCardTokenPaymentRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
uuid = json['uuid'];
department = json['department'];
item = json['item'];
amount = JsonConverters.toDouble(json['amount']);
name = json['name'];
customer_ip = json['customer_ip'];
email = json['email'];
addr1 = json['addr1'];
addr2 = json['addr2'];
city = json['city'];
state = json['state'];
country = json['country'];
code = json['code'];
phone = json['phone'];
token = json['token'];
card_type = json['card_type'];
token_last_four = json['token_last_four'];
card_name = json['card_name'];
return this;
}
Map<String, dynamic> toJson() => {
'uuid': uuid,
'department': department,
'item': item,
'amount': amount,
'name': name,
'customer_ip': customer_ip,
'email': email,
'addr1': addr1,
'addr2': addr2,
'city': city,
'state': state,
'country': country,
'code': code,
'phone': phone,
'token': token,
'card_type': card_type,
'token_last_four': token_last_four,
'card_name': card_name
};
getTypeName() => "BeanstreamCreditCardTokenPaymentRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'BeanstreamCreditCardCompletionResponse': TypeInfo(TypeOf.Class, create:() => BeanstreamCreditCardCompletionResponse()),
'BeanstreamCreditCardTokenPaymentRequest': TypeInfo(TypeOf.Class, create:() => BeanstreamCreditCardTokenPaymentRequest()),
});
Dart BeanstreamCreditCardTokenPaymentRequest 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 /Beanstream/Payment/{uuid}/CreditCard/Token/Create HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
uuid: String,
department: String,
item: String,
amount: 0,
name: String,
customer_ip: String,
email: String,
addr1: String,
addr2: String,
city: String,
state: String,
country: String,
code: String,
phone: String,
token: String,
card_type: String,
token_last_four: String,
card_name: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
uuid: String,
id: String,
approved: False,
message_id: String,
message: String,
order_number: String,
payment_method: String,
card_type: String,
card_last_four: String
}