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

com.paypal.sdk.models.AuthorizationStatusDetails 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 AuthorizationStatusDetails type.
 */
public class AuthorizationStatusDetails {
    private AuthorizationIncompleteReason reason;

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

    /**
     * Initialization constructor.
     * @param  reason  AuthorizationIncompleteReason value for reason.
     */
    public AuthorizationStatusDetails(
            AuthorizationIncompleteReason reason) {
        this.reason = reason;
    }

    /**
     * Getter for Reason.
     * The reason why the authorized status is `PENDING`.
     * @return Returns the AuthorizationIncompleteReason
     */
    @JsonGetter("reason")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public AuthorizationIncompleteReason getReason() {
        return reason;
    }

    /**
     * Setter for Reason.
     * The reason why the authorized status is `PENDING`.
     * @param reason Value for AuthorizationIncompleteReason
     */
    @JsonSetter("reason")
    public void setReason(AuthorizationIncompleteReason reason) {
        this.reason = reason;
    }

    /**
     * Converts this AuthorizationStatusDetails into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "AuthorizationStatusDetails [" + "reason=" + reason + "]";
    }

    /**
     * Builds a new {@link AuthorizationStatusDetails.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link AuthorizationStatusDetails.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .reason(getReason());
        return builder;
    }

    /**
     * Class to build instances of {@link AuthorizationStatusDetails}.
     */
    public static class Builder {
        private AuthorizationIncompleteReason reason;



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

        /**
         * Builds a new {@link AuthorizationStatusDetails} object using the set fields.
         * @return {@link AuthorizationStatusDetails}
         */
        public AuthorizationStatusDetails build() {
            return new AuthorizationStatusDetails(reason);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy