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

com.paypal.sdk.models.OrdersTrackCreateInput 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 OrdersTrackCreateInput type.
 */
public class OrdersTrackCreateInput {
    private String id;
    private String contentType;
    private OrderTrackerRequest body;
    private String payPalAuthAssertion;

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

    /**
     * Initialization constructor.
     * @param  id  String value for id.
     * @param  contentType  String value for contentType.
     * @param  body  OrderTrackerRequest value for body.
     * @param  payPalAuthAssertion  String value for payPalAuthAssertion.
     */
    public OrdersTrackCreateInput(
            String id,
            String contentType,
            OrderTrackerRequest body,
            String payPalAuthAssertion) {
        this.id = id;
        this.contentType = contentType;
        this.body = body;
        this.payPalAuthAssertion = payPalAuthAssertion;
    }

    /**
     * Getter for Id.
     * The ID of the order that the tracking information is associated with.
     * @return Returns the String
     */
    @JsonGetter("id")
    public String getId() {
        return id;
    }

    /**
     * Setter for Id.
     * The ID of the order that the tracking information is associated with.
     * @param id Value for String
     */
    @JsonSetter("id")
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 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.
     * @return Returns the OrderTrackerRequest
     */
    @JsonGetter("body")
    public OrderTrackerRequest getBody() {
        return body;
    }

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

    /**
     * Getter for PayPalAuthAssertion.
     * An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For
     * details, see <a
     * href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>.
     * @return Returns the String
     */
    @JsonGetter("PayPal-Auth-Assertion")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getPayPalAuthAssertion() {
        return payPalAuthAssertion;
    }

    /**
     * Setter for PayPalAuthAssertion.
     * An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For
     * details, see <a
     * href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>.
     * @param payPalAuthAssertion Value for String
     */
    @JsonSetter("PayPal-Auth-Assertion")
    public void setPayPalAuthAssertion(String payPalAuthAssertion) {
        this.payPalAuthAssertion = payPalAuthAssertion;
    }

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

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

    /**
     * Class to build instances of {@link OrdersTrackCreateInput}.
     */
    public static class Builder {
        private String id;
        private String contentType = "application/json";
        private OrderTrackerRequest body;
        private String payPalAuthAssertion;

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy