Required role: | REGISUserRole |
POST | /Beanstream/Payment/{uuid}/CreditCard/Create |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class BeanstreamCreditCardCompletionResponse implements IConvertible
{
String? uuid;
String? id;
bool? approved;
String? message;
String? order_number;
BeanstreamCreditCardCompletionResponse({this.uuid,this.id,this.approved,this.message,this.order_number});
BeanstreamCreditCardCompletionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
uuid = json['uuid'];
id = json['id'];
approved = json['approved'];
message = json['message'];
order_number = json['order_number'];
return this;
}
Map<String, dynamic> toJson() => {
'uuid': uuid,
'id': id,
'approved': approved,
'message': message,
'order_number': order_number
};
getTypeName() => "BeanstreamCreditCardCompletionResponse";
TypeContext? context = _ctx;
}
class BeanstreamCreditCardPaymentRequest 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? card_number;
String? card_name;
String? expiry_month;
String? expiry_year;
String? cvd;
BeanstreamCreditCardPaymentRequest({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.card_number,this.card_name,this.expiry_month,this.expiry_year,this.cvd});
BeanstreamCreditCardPaymentRequest.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'];
card_number = json['card_number'];
card_name = json['card_name'];
expiry_month = json['expiry_month'];
expiry_year = json['expiry_year'];
cvd = json['cvd'];
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,
'card_number': card_number,
'card_name': card_name,
'expiry_month': expiry_month,
'expiry_year': expiry_year,
'cvd': cvd
};
getTypeName() => "BeanstreamCreditCardPaymentRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'BeanstreamCreditCardCompletionResponse': TypeInfo(TypeOf.Class, create:() => BeanstreamCreditCardCompletionResponse()),
'BeanstreamCreditCardPaymentRequest': TypeInfo(TypeOf.Class, create:() => BeanstreamCreditCardPaymentRequest()),
});
Dart BeanstreamCreditCardPaymentRequest 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 /Beanstream/Payment/{uuid}/CreditCard/Create HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<BeanstreamCreditCardPaymentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<addr1>String</addr1>
<addr2>String</addr2>
<amount>0</amount>
<card_name>String</card_name>
<card_number>String</card_number>
<city>String</city>
<code>String</code>
<country>String</country>
<customer_ip>String</customer_ip>
<cvd>String</cvd>
<department>String</department>
<email>String</email>
<expiry_month>String</expiry_month>
<expiry_year>String</expiry_year>
<item>String</item>
<name>String</name>
<phone>String</phone>
<state>String</state>
<uuid>String</uuid>
</BeanstreamCreditCardPaymentRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <BeanstreamCreditCardCompletionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses"> <approved>false</approved> <id>String</id> <message>String</message> <order_number>String</order_number> <uuid>String</uuid> </BeanstreamCreditCardCompletionResponse>