com.adyen.model.binlookup.ThreeDSAvailabilityRequest Maven / Gradle / Ivy
/*
* Adyen BinLookup API
*
* The version of the OpenAPI document: 54
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.binlookup;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* ThreeDSAvailabilityRequest
*/
@JsonPropertyOrder({
ThreeDSAvailabilityRequest.JSON_PROPERTY_ADDITIONAL_DATA,
ThreeDSAvailabilityRequest.JSON_PROPERTY_BRANDS,
ThreeDSAvailabilityRequest.JSON_PROPERTY_CARD_NUMBER,
ThreeDSAvailabilityRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
ThreeDSAvailabilityRequest.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
ThreeDSAvailabilityRequest.JSON_PROPERTY_SHOPPER_REFERENCE
})
public class ThreeDSAvailabilityRequest {
public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData";
private Map additionalData = null;
public static final String JSON_PROPERTY_BRANDS = "brands";
private List brands = null;
public static final String JSON_PROPERTY_CARD_NUMBER = "cardNumber";
private String cardNumber;
public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
private String merchantAccount;
public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
private String recurringDetailReference;
public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference";
private String shopperReference;
public ThreeDSAvailabilityRequest() {
}
public ThreeDSAvailabilityRequest additionalData(Map additionalData) {
this.additionalData = additionalData;
return this;
}
public ThreeDSAvailabilityRequest putAdditionalDataItem(String key, String additionalDataItem) {
if (this.additionalData == null) {
this.additionalData = new HashMap<>();
}
this.additionalData.put(key, additionalDataItem);
return this;
}
/**
* This field contains additional data, which may be required for a particular request. The `additionalData` object consists of entries, each of which includes the key and value.
* @return additionalData
**/
@ApiModelProperty(value = "This field contains additional data, which may be required for a particular request. The `additionalData` object consists of entries, each of which includes the key and value.")
@JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getAdditionalData() {
return additionalData;
}
/**
* This field contains additional data, which may be required for a particular request. The `additionalData` object consists of entries, each of which includes the key and value.
*
* @param additionalData
*/
@JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAdditionalData(Map additionalData) {
this.additionalData = additionalData;
}
public ThreeDSAvailabilityRequest brands(List brands) {
this.brands = brands;
return this;
}
public ThreeDSAvailabilityRequest addBrandsItem(String brandsItem) {
if (this.brands == null) {
this.brands = new ArrayList<>();
}
this.brands.add(brandsItem);
return this;
}
/**
* List of brands.
* @return brands
**/
@ApiModelProperty(value = "List of brands.")
@JsonProperty(JSON_PROPERTY_BRANDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getBrands() {
return brands;
}
/**
* List of brands.
*
* @param brands
*/
@JsonProperty(JSON_PROPERTY_BRANDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBrands(List brands) {
this.brands = brands;
}
public ThreeDSAvailabilityRequest cardNumber(String cardNumber) {
this.cardNumber = cardNumber;
return this;
}
/**
* Card number or BIN.
* @return cardNumber
**/
@ApiModelProperty(value = "Card number or BIN.")
@JsonProperty(JSON_PROPERTY_CARD_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCardNumber() {
return cardNumber;
}
/**
* Card number or BIN.
*
* @param cardNumber
*/
@JsonProperty(JSON_PROPERTY_CARD_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCardNumber(String cardNumber) {
this.cardNumber = cardNumber;
}
public ThreeDSAvailabilityRequest merchantAccount(String merchantAccount) {
this.merchantAccount = merchantAccount;
return this;
}
/**
* The merchant account identifier.
* @return merchantAccount
**/
@ApiModelProperty(required = true, value = "The merchant account identifier.")
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMerchantAccount() {
return merchantAccount;
}
/**
* The merchant account identifier.
*
* @param merchantAccount
*/
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMerchantAccount(String merchantAccount) {
this.merchantAccount = merchantAccount;
}
public ThreeDSAvailabilityRequest recurringDetailReference(String recurringDetailReference) {
this.recurringDetailReference = recurringDetailReference;
return this;
}
/**
* A recurring detail reference corresponding to a card.
* @return recurringDetailReference
**/
@ApiModelProperty(value = "A recurring detail reference corresponding to a card.")
@JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRecurringDetailReference() {
return recurringDetailReference;
}
/**
* A recurring detail reference corresponding to a card.
*
* @param recurringDetailReference
*/
@JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRecurringDetailReference(String recurringDetailReference) {
this.recurringDetailReference = recurringDetailReference;
}
public ThreeDSAvailabilityRequest shopperReference(String shopperReference) {
this.shopperReference = shopperReference;
return this;
}
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).
* @return shopperReference
**/
@ApiModelProperty(value = "The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).")
@JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getShopperReference() {
return shopperReference;
}
/**
* The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).
*
* @param shopperReference
*/
@JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShopperReference(String shopperReference) {
this.shopperReference = shopperReference;
}
/**
* Return true if this ThreeDSAvailabilityRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ThreeDSAvailabilityRequest threeDSAvailabilityRequest = (ThreeDSAvailabilityRequest) o;
return Objects.equals(this.additionalData, threeDSAvailabilityRequest.additionalData) &&
Objects.equals(this.brands, threeDSAvailabilityRequest.brands) &&
Objects.equals(this.cardNumber, threeDSAvailabilityRequest.cardNumber) &&
Objects.equals(this.merchantAccount, threeDSAvailabilityRequest.merchantAccount) &&
Objects.equals(this.recurringDetailReference, threeDSAvailabilityRequest.recurringDetailReference) &&
Objects.equals(this.shopperReference, threeDSAvailabilityRequest.shopperReference);
}
@Override
public int hashCode() {
return Objects.hash(additionalData, brands, cardNumber, merchantAccount, recurringDetailReference, shopperReference);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ThreeDSAvailabilityRequest {\n");
sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n");
sb.append(" brands: ").append(toIndentedString(brands)).append("\n");
sb.append(" cardNumber: ").append(toIndentedString(cardNumber)).append("\n");
sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
sb.append(" shopperReference: ").append(toIndentedString(shopperReference)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Create an instance of ThreeDSAvailabilityRequest given an JSON string
*
* @param jsonString JSON string
* @return An instance of ThreeDSAvailabilityRequest
* @throws JsonProcessingException if the JSON string is invalid with respect to ThreeDSAvailabilityRequest
*/
public static ThreeDSAvailabilityRequest fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, ThreeDSAvailabilityRequest.class);
}
/**
* Convert an instance of ThreeDSAvailabilityRequest to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}