| Required role: | REGISUserRole |
| POST | /Beanstream/Payment/{uuid}/CreditCard/Token/Create |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class BeanstreamCreditCardTokenPaymentRequest
{
public String uuid = null;
public String department = null;
public String item = null;
public BigDecimal amount = null;
public String name = null;
public String customer_ip = null;
public String email = null;
public String addr1 = null;
public String addr2 = null;
public String city = null;
public String state = null;
public String country = null;
public String code = null;
public String phone = null;
public String token = null;
public String card_type = null;
public String token_last_four = null;
public String card_name = null;
public String getUuid() { return uuid; }
public BeanstreamCreditCardTokenPaymentRequest setUuid(String value) { this.uuid = value; return this; }
public String getDepartment() { return department; }
public BeanstreamCreditCardTokenPaymentRequest setDepartment(String value) { this.department = value; return this; }
public String getItem() { return item; }
public BeanstreamCreditCardTokenPaymentRequest setItem(String value) { this.item = value; return this; }
public BigDecimal getAmount() { return amount; }
public BeanstreamCreditCardTokenPaymentRequest setAmount(BigDecimal value) { this.amount = value; return this; }
public String getName() { return name; }
public BeanstreamCreditCardTokenPaymentRequest setName(String value) { this.name = value; return this; }
public String getCustomerIp() { return customer_ip; }
public BeanstreamCreditCardTokenPaymentRequest setCustomerIp(String value) { this.customer_ip = value; return this; }
public String getEmail() { return email; }
public BeanstreamCreditCardTokenPaymentRequest setEmail(String value) { this.email = value; return this; }
public String getAddr1() { return addr1; }
public BeanstreamCreditCardTokenPaymentRequest setAddr1(String value) { this.addr1 = value; return this; }
public String getAddr2() { return addr2; }
public BeanstreamCreditCardTokenPaymentRequest setAddr2(String value) { this.addr2 = value; return this; }
public String getCity() { return city; }
public BeanstreamCreditCardTokenPaymentRequest setCity(String value) { this.city = value; return this; }
public String getState() { return state; }
public BeanstreamCreditCardTokenPaymentRequest setState(String value) { this.state = value; return this; }
public String getCountry() { return country; }
public BeanstreamCreditCardTokenPaymentRequest setCountry(String value) { this.country = value; return this; }
public String getCode() { return code; }
public BeanstreamCreditCardTokenPaymentRequest setCode(String value) { this.code = value; return this; }
public String getPhone() { return phone; }
public BeanstreamCreditCardTokenPaymentRequest setPhone(String value) { this.phone = value; return this; }
public String getToken() { return token; }
public BeanstreamCreditCardTokenPaymentRequest setToken(String value) { this.token = value; return this; }
public String getCardType() { return card_type; }
public BeanstreamCreditCardTokenPaymentRequest setCardType(String value) { this.card_type = value; return this; }
public String getTokenLastFour() { return token_last_four; }
public BeanstreamCreditCardTokenPaymentRequest setTokenLastFour(String value) { this.token_last_four = value; return this; }
public String getCardName() { return card_name; }
public BeanstreamCreditCardTokenPaymentRequest setCardName(String value) { this.card_name = value; return this; }
}
public static class BeanstreamCreditCardCompletionResponse
{
public String uuid = null;
public String id = null;
public Boolean approved = null;
public String message_id = null;
public String message = null;
public String order_number = null;
public String payment_method = null;
public String card_type = null;
public String card_last_four = null;
public String getUuid() { return uuid; }
public BeanstreamCreditCardCompletionResponse setUuid(String value) { this.uuid = value; return this; }
public String getId() { return id; }
public BeanstreamCreditCardCompletionResponse setId(String value) { this.id = value; return this; }
public Boolean isApproved() { return approved; }
public BeanstreamCreditCardCompletionResponse setApproved(Boolean value) { this.approved = value; return this; }
public String getMessageId() { return message_id; }
public BeanstreamCreditCardCompletionResponse setMessageId(String value) { this.message_id = value; return this; }
public String getMessage() { return message; }
public BeanstreamCreditCardCompletionResponse setMessage(String value) { this.message = value; return this; }
public String getOrderNumber() { return order_number; }
public BeanstreamCreditCardCompletionResponse setOrderNumber(String value) { this.order_number = value; return this; }
public String getPaymentMethod() { return payment_method; }
public BeanstreamCreditCardCompletionResponse setPaymentMethod(String value) { this.payment_method = value; return this; }
public String getCardType() { return card_type; }
public BeanstreamCreditCardCompletionResponse setCardType(String value) { this.card_type = value; return this; }
public String getCardLastFour() { return card_last_four; }
public BeanstreamCreditCardCompletionResponse setCardLastFour(String value) { this.card_last_four = value; return this; }
}
}
Java BeanstreamCreditCardTokenPaymentRequest 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/Token/Create HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<BeanstreamCreditCardTokenPaymentRequest 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_type>String</card_type>
<city>String</city>
<code>String</code>
<country>String</country>
<customer_ip>String</customer_ip>
<department>String</department>
<email>String</email>
<item>String</item>
<name>String</name>
<phone>String</phone>
<state>String</state>
<token>String</token>
<token_last_four>String</token_last_four>
<uuid>String</uuid>
</BeanstreamCreditCardTokenPaymentRequest>
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> <card_last_four>String</card_last_four> <card_type>String</card_type> <id>String</id> <message>String</message> <message_id>String</message_id> <order_number>String</order_number> <payment_method>String</payment_method> <uuid>String</uuid> </BeanstreamCreditCardCompletionResponse>