com.cardpay.sdk.model.PaymentRequestCardAccount Maven / Gradle / Ivy
The newest version!
/*
* CardPay REST API
* Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.
*
* OpenAPI spec version: 3.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.cardpay.sdk.model;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
@Data
public class PaymentRequestCardAccount {
@SerializedName("billing_address")
private BillingAddress billingAddress = null;
@SerializedName("card")
private PaymentRequestCard card = null;
@SerializedName("encrypted_card_data")
private String encryptedCardData = null;
@SerializedName("recipient_info")
private String recipientInfo = null;
@SerializedName("token")
private String token = null;
public void setBillingAddress(BillingAddress billingAddress) {
this.billingAddress = billingAddress;
}
/**
* @param billingAddress Billing Address
* @return bean instance
**/
public PaymentRequestCardAccount billingAddress(BillingAddress billingAddress) {
this.billingAddress = billingAddress;
return this;
}
public void setCard(PaymentRequestCard card) {
this.card = card;
}
/**
* @param card Represents a payment card data. Card section shouldn't be present if element 'token' was presented. Shouldn't be used in Payment Page mode. For recurring: all card elements should presented only for first recurring payment.
* @return bean instance
**/
public PaymentRequestCardAccount card(PaymentRequestCard card) {
this.card = card;
return this;
}
public void setEncryptedCardData(String encryptedCardData) {
this.encryptedCardData = encryptedCardData;
}
/**
* @param encryptedCardData Encrypted card data. The field includes: pan, security_code, expiration. Only for Gateway mode.
* @return bean instance
**/
public PaymentRequestCardAccount encryptedCardData(String encryptedCardData) {
this.encryptedCardData = encryptedCardData;
return this;
}
public void setRecipientInfo(String recipientInfo) {
this.recipientInfo = recipientInfo;
}
/**
* @param recipientInfo Recipient full name. Property `recipient_info` may be required by Bank. In most cases it's Cardholder's name, contact Unlimit manager for requirements. Mandatory only for money transfer operation.
* @return bean instance
**/
public PaymentRequestCardAccount recipientInfo(String recipientInfo) {
this.recipientInfo = recipientInfo;
return this;
}
public void setToken(String token) {
this.token = token;
}
/**
* @param token Card token value used instead of card information, except 'card.security_code' (it's mandatory). For payment: see PaymentRequestPaymentData for token generation. For recurring: this attribute is valid only for first recurring payment. It isn't valid for continue recurring payments (with filing id), see RecurringRequestRecurringData for token generation.
* @return bean instance
**/
public PaymentRequestCardAccount token(String token) {
this.token = token;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("PaymentRequestCardAccount( ");
if (billingAddress != null) sb.append("billingAddress=").append(billingAddress.toString()).append("; ");
if (card != null) sb.append("card=").append(card.toString()).append("; ");
if (encryptedCardData != null) sb.append("encryptedCardData=").append(encryptedCardData.toString()).append("; ");
if (recipientInfo != null) sb.append("recipientInfo=").append(recipientInfo.toString()).append("; ");
if (token != null) sb.append("token=").append(token.toString()).append("; ");
sb.append(")");
return sb.toString();
}
}