com.paypal.sdk.models.Payee Maven / Gradle / Ivy
/*
* PaypalServerSDKLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.paypal.sdk.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for Payee type.
*/
public class Payee {
private String emailAddress;
private String merchantId;
/**
* Default constructor.
*/
public Payee() {
}
/**
* Initialization constructor.
* @param emailAddress String value for emailAddress.
* @param merchantId String value for merchantId.
*/
public Payee(
String emailAddress,
String merchantId) {
this.emailAddress = emailAddress;
this.merchantId = merchantId;
}
/**
* Getter for EmailAddress.
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters
* are allowed before and 255 characters are allowed after the <code>{@literal @}</code> sign. However, the
* generally accepted maximum length for an email address is 254 characters. The pattern
* verifies that an unquoted <code>{@literal @}</code> sign exists.</blockquote>
* @return Returns the String
*/
@JsonGetter("email_address")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getEmailAddress() {
return emailAddress;
}
/**
* Setter for EmailAddress.
* The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters
* are allowed before and 255 characters are allowed after the <code>{@literal @}</code> sign. However, the
* generally accepted maximum length for an email address is 254 characters. The pattern
* verifies that an unquoted <code>{@literal @}</code> sign exists.</blockquote>
* @param emailAddress Value for String
*/
@JsonSetter("email_address")
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
/**
* Getter for MerchantId.
* The account identifier for a PayPal account.
* @return Returns the String
*/
@JsonGetter("merchant_id")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getMerchantId() {
return merchantId;
}
/**
* Setter for MerchantId.
* The account identifier for a PayPal account.
* @param merchantId Value for String
*/
@JsonSetter("merchant_id")
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
/**
* Converts this Payee into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "Payee [" + "emailAddress=" + emailAddress + ", merchantId=" + merchantId + "]";
}
/**
* Builds a new {@link Payee.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link Payee.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.emailAddress(getEmailAddress())
.merchantId(getMerchantId());
return builder;
}
/**
* Class to build instances of {@link Payee}.
*/
public static class Builder {
private String emailAddress;
private String merchantId;
/**
* Setter for emailAddress.
* @param emailAddress String value for emailAddress.
* @return Builder
*/
public Builder emailAddress(String emailAddress) {
this.emailAddress = emailAddress;
return this;
}
/**
* Setter for merchantId.
* @param merchantId String value for merchantId.
* @return Builder
*/
public Builder merchantId(String merchantId) {
this.merchantId = merchantId;
return this;
}
/**
* Builds a new {@link Payee} object using the set fields.
* @return {@link Payee}
*/
public Payee build() {
return new Payee(emailAddress, merchantId);
}
}
}