regis

<back to all web services

BeanstreamCreditCardPaymentRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
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 .other suffix or ?format=other

HTTP + OTHER

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: text/jsonl
Content-Type: text/jsonl
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","card_number":"String","card_name":"String","expiry_month":"String","expiry_year":"String","cvd":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"uuid":"String","id":"String","approved":false,"message":"String","order_number":"String"}