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

com.paypal.sdk.models.SetupTokensCreateInput 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.JsonSetter;

/**
 * This is a model class for SetupTokensCreateInput type.
 */
public class SetupTokensCreateInput {
    private String paypalRequestId;
    private String contentType;
    private SetupTokenRequest body;

    /**
     * Default constructor.
     */
    public SetupTokensCreateInput() {
        contentType = "application/json";
    }

    /**
     * Initialization constructor.
     * @param  paypalRequestId  String value for paypalRequestId.
     * @param  contentType  String value for contentType.
     * @param  body  SetupTokenRequest value for body.
     */
    public SetupTokensCreateInput(
            String paypalRequestId,
            String contentType,
            SetupTokenRequest body) {
        this.paypalRequestId = paypalRequestId;
        this.contentType = contentType;
        this.body = body;
    }

    /**
     * Getter for PaypalRequestId.
     * The server stores keys for 3 hours.
     * @return Returns the String
     */
    @JsonGetter("PayPal-Request-Id")
    public String getPaypalRequestId() {
        return paypalRequestId;
    }

    /**
     * Setter for PaypalRequestId.
     * The server stores keys for 3 hours.
     * @param paypalRequestId Value for String
     */
    @JsonSetter("PayPal-Request-Id")
    public void setPaypalRequestId(String paypalRequestId) {
        this.paypalRequestId = paypalRequestId;
    }

    /**
     * Getter for ContentType.
     * @return Returns the String
     */
    @JsonGetter("Content-Type")
    public String getContentType() {
        return contentType;
    }

    /**
     * Setter for ContentType.
     * @param contentType Value for String
     */
    @JsonSetter("Content-Type")
    private void setContentType(String contentType) {
        this.contentType = contentType;
    }

    /**
     * Getter for Body.
     * Setup Token creation with a instrument type optional financial instrument details and
     * customer_id.
     * @return Returns the SetupTokenRequest
     */
    @JsonGetter("body")
    public SetupTokenRequest getBody() {
        return body;
    }

    /**
     * Setter for Body.
     * Setup Token creation with a instrument type optional financial instrument details and
     * customer_id.
     * @param body Value for SetupTokenRequest
     */
    @JsonSetter("body")
    public void setBody(SetupTokenRequest body) {
        this.body = body;
    }

    /**
     * Converts this SetupTokensCreateInput into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "SetupTokensCreateInput [" + "paypalRequestId=" + paypalRequestId + ", contentType="
                + contentType + ", body=" + body + "]";
    }

    /**
     * Builds a new {@link SetupTokensCreateInput.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link SetupTokensCreateInput.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder(paypalRequestId, contentType, body);
        return builder;
    }

    /**
     * Class to build instances of {@link SetupTokensCreateInput}.
     */
    public static class Builder {
        private String paypalRequestId;
        private String contentType = "application/json";
        private SetupTokenRequest body;

        /**
         * Initialization constructor.
         */
        public Builder() {
        }

        /**
         * Initialization constructor.
         * @param  paypalRequestId  String value for paypalRequestId.
         * @param  contentType  String value for contentType.
         * @param  body  SetupTokenRequest value for body.
         */
        public Builder(String paypalRequestId, String contentType, SetupTokenRequest body) {
            this.paypalRequestId = paypalRequestId;
            this.contentType = contentType;
            this.body = body;
        }

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

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

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

        /**
         * Builds a new {@link SetupTokensCreateInput} object using the set fields.
         * @return {@link SetupTokensCreateInput}
         */
        public SetupTokensCreateInput build() {
            return new SetupTokensCreateInput(paypalRequestId, contentType, body);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy