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

com.paypal.sdk.models.AuthorizationsCaptureInput 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 AuthorizationsCaptureInput type.
 */
public class AuthorizationsCaptureInput {
    private String authorizationId;
    private String contentType;
    private String payPalRequestId;
    private String prefer;
    private CaptureRequest body;

    /**
     * Default constructor.
     */
    public AuthorizationsCaptureInput() {
        contentType = "application/json";
        prefer = "return=minimal";
    }

    /**
     * Initialization constructor.
     * @param  authorizationId  String value for authorizationId.
     * @param  contentType  String value for contentType.
     * @param  payPalRequestId  String value for payPalRequestId.
     * @param  prefer  String value for prefer.
     * @param  body  CaptureRequest value for body.
     */
    public AuthorizationsCaptureInput(
            String authorizationId,
            String contentType,
            String payPalRequestId,
            String prefer,
            CaptureRequest body) {
        this.authorizationId = authorizationId;
        this.contentType = contentType;
        this.payPalRequestId = payPalRequestId;
        this.prefer = prefer;
        this.body = body;
    }

    /**
     * Getter for AuthorizationId.
     * The PayPal-generated ID for the authorized payment to capture.
     * @return Returns the String
     */
    @JsonGetter("authorization_id")
    public String getAuthorizationId() {
        return authorizationId;
    }

    /**
     * Setter for AuthorizationId.
     * The PayPal-generated ID for the authorized payment to capture.
     * @param authorizationId Value for String
     */
    @JsonSetter("authorization_id")
    public void setAuthorizationId(String authorizationId) {
        this.authorizationId = authorizationId;
    }

    /**
     * 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 PayPalRequestId.
     * The server stores keys for 45 days.
     * @return Returns the String
     */
    @JsonGetter("PayPal-Request-Id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getPayPalRequestId() {
        return payPalRequestId;
    }

    /**
     * Setter for PayPalRequestId.
     * The server stores keys for 45 days.
     * @param payPalRequestId Value for String
     */
    @JsonSetter("PayPal-Request-Id")
    public void setPayPalRequestId(String payPalRequestId) {
        this.payPalRequestId = payPalRequestId;
    }

    /**
     * Getter for Prefer.
     * The preferred server response upon successful completion of the request. Value
     * is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize
     * communication between the API caller and the server. A minimal response includes the
     * <code>id</code>, <code>status</code> and HATEOAS
     * links.</li><li><code>return=representation</code>. The server returns a complete resource
     * representation, including the current state of the resource.</li></ul>
     * @return Returns the String
     */
    @JsonGetter("Prefer")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getPrefer() {
        return prefer;
    }

    /**
     * Setter for Prefer.
     * The preferred server response upon successful completion of the request. Value
     * is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize
     * communication between the API caller and the server. A minimal response includes the
     * <code>id</code>, <code>status</code> and HATEOAS
     * links.</li><li><code>return=representation</code>. The server returns a complete resource
     * representation, including the current state of the resource.</li></ul>
     * @param prefer Value for String
     */
    @JsonSetter("Prefer")
    public void setPrefer(String prefer) {
        this.prefer = prefer;
    }

    /**
     * Getter for Body.
     * @return Returns the CaptureRequest
     */
    @JsonGetter("body")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public CaptureRequest getBody() {
        return body;
    }

    /**
     * Setter for Body.
     * @param body Value for CaptureRequest
     */
    @JsonSetter("body")
    public void setBody(CaptureRequest body) {
        this.body = body;
    }

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

    /**
     * Builds a new {@link AuthorizationsCaptureInput.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link AuthorizationsCaptureInput.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder(authorizationId, contentType)
                .payPalRequestId(getPayPalRequestId())
                .prefer(getPrefer())
                .body(getBody());
        return builder;
    }

    /**
     * Class to build instances of {@link AuthorizationsCaptureInput}.
     */
    public static class Builder {
        private String authorizationId;
        private String contentType = "application/json";
        private String payPalRequestId;
        private String prefer = "return=minimal";
        private CaptureRequest body;

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

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

        /**
         * Setter for authorizationId.
         * @param  authorizationId  String value for authorizationId.
         * @return Builder
         */
        public Builder authorizationId(String authorizationId) {
            this.authorizationId = authorizationId;
            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 payPalRequestId.
         * @param  payPalRequestId  String value for payPalRequestId.
         * @return Builder
         */
        public Builder payPalRequestId(String payPalRequestId) {
            this.payPalRequestId = payPalRequestId;
            return this;
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy