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 - 2024 Weber Informatics LLC | Privacy Policy