All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.paypal.sdk.models.SetupTokenRequestCard 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;
import com.paypal.sdk.utilities.JsonValue;

/**
 * This is a model class for SetupTokenRequestCard type.
 */
public class SetupTokenRequestCard {
    private String name;
    private String number;
    private String expiry;
    private String securityCode;
    private CardBrand brand;
    private Address billingAddress;
    private String verificationMethod;
    private SetupTokenCardExperienceContext experienceContext;
    private JsonValue networkTransactionReference;

    /**
     * Default constructor.
     */
    public SetupTokenRequestCard() {
    }

    /**
     * Initialization constructor.
     * @param  name  String value for name.
     * @param  number  String value for number.
     * @param  expiry  String value for expiry.
     * @param  securityCode  String value for securityCode.
     * @param  brand  CardBrand value for brand.
     * @param  billingAddress  Address value for billingAddress.
     * @param  verificationMethod  String value for verificationMethod.
     * @param  experienceContext  SetupTokenCardExperienceContext value for experienceContext.
     * @param  networkTransactionReference  JsonValue value for networkTransactionReference.
     */
    public SetupTokenRequestCard(
            String name,
            String number,
            String expiry,
            String securityCode,
            CardBrand brand,
            Address billingAddress,
            String verificationMethod,
            SetupTokenCardExperienceContext experienceContext,
            JsonValue networkTransactionReference) {
        this.name = name;
        this.number = number;
        this.expiry = expiry;
        this.securityCode = securityCode;
        this.brand = brand;
        this.billingAddress = billingAddress;
        this.verificationMethod = verificationMethod;
        this.experienceContext = experienceContext;
        this.networkTransactionReference = networkTransactionReference;
    }

    /**
     * Getter for Name.
     * The card holder's name as it appears on the card.
     * @return Returns the String
     */
    @JsonGetter("name")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getName() {
        return name;
    }

    /**
     * Setter for Name.
     * The card holder's name as it appears on the card.
     * @param name Value for String
     */
    @JsonSetter("name")
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Getter for Number.
     * The primary account number (PAN) for the payment card.
     * @return Returns the String
     */
    @JsonGetter("number")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getNumber() {
        return number;
    }

    /**
     * Setter for Number.
     * The primary account number (PAN) for the payment card.
     * @param number Value for String
     */
    @JsonSetter("number")
    public void setNumber(String number) {
        this.number = number;
    }

    /**
     * Getter for Expiry.
     * The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time
     * format](https://tools.ietf.org/html/rfc3339#section-5.6).
     * @return Returns the String
     */
    @JsonGetter("expiry")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getExpiry() {
        return expiry;
    }

    /**
     * Setter for Expiry.
     * The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time
     * format](https://tools.ietf.org/html/rfc3339#section-5.6).
     * @param expiry Value for String
     */
    @JsonSetter("expiry")
    public void setExpiry(String expiry) {
        this.expiry = expiry;
    }

    /**
     * Getter for SecurityCode.
     * The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or
     * CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
     * @return Returns the String
     */
    @JsonGetter("security_code")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getSecurityCode() {
        return securityCode;
    }

    /**
     * Setter for SecurityCode.
     * The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or
     * CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
     * @param securityCode Value for String
     */
    @JsonSetter("security_code")
    public void setSecurityCode(String securityCode) {
        this.securityCode = securityCode;
    }

    /**
     * Getter for Brand.
     * The card network or brand. Applies to credit, debit, gift, and payment cards.
     * @return Returns the CardBrand
     */
    @JsonGetter("brand")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public CardBrand getBrand() {
        return brand;
    }

    /**
     * Setter for Brand.
     * The card network or brand. Applies to credit, debit, gift, and payment cards.
     * @param brand Value for CardBrand
     */
    @JsonSetter("brand")
    public void setBrand(CardBrand brand) {
        this.brand = brand;
    }

    /**
     * Getter for BillingAddress.
     * The portable international postal address. Maps to
     * [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata)
     * and HTML 5.1 [Autofilling form controls: the autocomplete
     * attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).
     * @return Returns the Address
     */
    @JsonGetter("billing_address")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Address getBillingAddress() {
        return billingAddress;
    }

    /**
     * Setter for BillingAddress.
     * The portable international postal address. Maps to
     * [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata)
     * and HTML 5.1 [Autofilling form controls: the autocomplete
     * attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).
     * @param billingAddress Value for Address
     */
    @JsonSetter("billing_address")
    public void setBillingAddress(Address billingAddress) {
        this.billingAddress = billingAddress;
    }

    /**
     * Getter for VerificationMethod.
     * The verification method of the card.
     * @return Returns the String
     */
    @JsonGetter("verification_method")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getVerificationMethod() {
        return verificationMethod;
    }

    /**
     * Setter for VerificationMethod.
     * The verification method of the card.
     * @param verificationMethod Value for String
     */
    @JsonSetter("verification_method")
    public void setVerificationMethod(String verificationMethod) {
        this.verificationMethod = verificationMethod;
    }

    /**
     * Getter for ExperienceContext.
     * Customizes the Vault creation flow experience for your customers.
     * @return Returns the SetupTokenCardExperienceContext
     */
    @JsonGetter("experience_context")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public SetupTokenCardExperienceContext getExperienceContext() {
        return experienceContext;
    }

    /**
     * Setter for ExperienceContext.
     * Customizes the Vault creation flow experience for your customers.
     * @param experienceContext Value for SetupTokenCardExperienceContext
     */
    @JsonSetter("experience_context")
    public void setExperienceContext(SetupTokenCardExperienceContext experienceContext) {
        this.experienceContext = experienceContext;
    }

    /**
     * Getter for NetworkTransactionReference.
     * @return Returns the JsonValue
     */
    @JsonGetter("network_transaction_reference")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public JsonValue getNetworkTransactionReference() {
        return networkTransactionReference;
    }

    /**
     * Setter for NetworkTransactionReference.
     * @param networkTransactionReference Value for JsonValue
     */
    @JsonSetter("network_transaction_reference")
    public void setNetworkTransactionReference(JsonValue networkTransactionReference) {
        this.networkTransactionReference = networkTransactionReference;
    }

    /**
     * Converts this SetupTokenRequestCard into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "SetupTokenRequestCard [" + "name=" + name + ", number=" + number + ", expiry="
                + expiry + ", securityCode=" + securityCode + ", brand=" + brand
                + ", billingAddress=" + billingAddress + ", verificationMethod="
                + verificationMethod + ", experienceContext=" + experienceContext
                + ", networkTransactionReference=" + networkTransactionReference + "]";
    }

    /**
     * Builds a new {@link SetupTokenRequestCard.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link SetupTokenRequestCard.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .name(getName())
                .number(getNumber())
                .expiry(getExpiry())
                .securityCode(getSecurityCode())
                .brand(getBrand())
                .billingAddress(getBillingAddress())
                .verificationMethod(getVerificationMethod())
                .experienceContext(getExperienceContext())
                .networkTransactionReference(getNetworkTransactionReference());
        return builder;
    }

    /**
     * Class to build instances of {@link SetupTokenRequestCard}.
     */
    public static class Builder {
        private String name;
        private String number;
        private String expiry;
        private String securityCode;
        private CardBrand brand;
        private Address billingAddress;
        private String verificationMethod;
        private SetupTokenCardExperienceContext experienceContext;
        private JsonValue networkTransactionReference;



        /**
         * Setter for name.
         * @param  name  String value for name.
         * @return Builder
         */
        public Builder name(String name) {
            this.name = name;
            return this;
        }

        /**
         * Setter for number.
         * @param  number  String value for number.
         * @return Builder
         */
        public Builder number(String number) {
            this.number = number;
            return this;
        }

        /**
         * Setter for expiry.
         * @param  expiry  String value for expiry.
         * @return Builder
         */
        public Builder expiry(String expiry) {
            this.expiry = expiry;
            return this;
        }

        /**
         * Setter for securityCode.
         * @param  securityCode  String value for securityCode.
         * @return Builder
         */
        public Builder securityCode(String securityCode) {
            this.securityCode = securityCode;
            return this;
        }

        /**
         * Setter for brand.
         * @param  brand  CardBrand value for brand.
         * @return Builder
         */
        public Builder brand(CardBrand brand) {
            this.brand = brand;
            return this;
        }

        /**
         * Setter for billingAddress.
         * @param  billingAddress  Address value for billingAddress.
         * @return Builder
         */
        public Builder billingAddress(Address billingAddress) {
            this.billingAddress = billingAddress;
            return this;
        }

        /**
         * Setter for verificationMethod.
         * @param  verificationMethod  String value for verificationMethod.
         * @return Builder
         */
        public Builder verificationMethod(String verificationMethod) {
            this.verificationMethod = verificationMethod;
            return this;
        }

        /**
         * Setter for experienceContext.
         * @param  experienceContext  SetupTokenCardExperienceContext value for experienceContext.
         * @return Builder
         */
        public Builder experienceContext(SetupTokenCardExperienceContext experienceContext) {
            this.experienceContext = experienceContext;
            return this;
        }

        /**
         * Setter for networkTransactionReference.
         * @param  networkTransactionReference  JsonValue value for networkTransactionReference.
         * @return Builder
         */
        public Builder networkTransactionReference(JsonValue networkTransactionReference) {
            this.networkTransactionReference = networkTransactionReference;
            return this;
        }

        /**
         * Builds a new {@link SetupTokenRequestCard} object using the set fields.
         * @return {@link SetupTokenRequestCard}
         */
        public SetupTokenRequestCard build() {
            return new SetupTokenRequestCard(name, number, expiry, securityCode, brand,
                    billingAddress, verificationMethod, experienceContext,
                    networkTransactionReference);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy