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

com.paypal.sdk.models.CardExperienceContext 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 CardExperienceContext type.
 */
public class CardExperienceContext {
    private String returnUrl;
    private String cancelUrl;

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

    /**
     * Initialization constructor.
     * @param  returnUrl  String value for returnUrl.
     * @param  cancelUrl  String value for cancelUrl.
     */
    public CardExperienceContext(
            String returnUrl,
            String cancelUrl) {
        this.returnUrl = returnUrl;
        this.cancelUrl = cancelUrl;
    }

    /**
     * Getter for ReturnUrl.
     * Describes the URL.
     * @return Returns the String
     */
    @JsonGetter("return_url")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getReturnUrl() {
        return returnUrl;
    }

    /**
     * Setter for ReturnUrl.
     * Describes the URL.
     * @param returnUrl Value for String
     */
    @JsonSetter("return_url")
    public void setReturnUrl(String returnUrl) {
        this.returnUrl = returnUrl;
    }

    /**
     * Getter for CancelUrl.
     * Describes the URL.
     * @return Returns the String
     */
    @JsonGetter("cancel_url")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getCancelUrl() {
        return cancelUrl;
    }

    /**
     * Setter for CancelUrl.
     * Describes the URL.
     * @param cancelUrl Value for String
     */
    @JsonSetter("cancel_url")
    public void setCancelUrl(String cancelUrl) {
        this.cancelUrl = cancelUrl;
    }

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

    /**
     * Builds a new {@link CardExperienceContext.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link CardExperienceContext.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .returnUrl(getReturnUrl())
                .cancelUrl(getCancelUrl());
        return builder;
    }

    /**
     * Class to build instances of {@link CardExperienceContext}.
     */
    public static class Builder {
        private String returnUrl;
        private String cancelUrl;



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

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

        /**
         * Builds a new {@link CardExperienceContext} object using the set fields.
         * @return {@link CardExperienceContext}
         */
        public CardExperienceContext build() {
            return new CardExperienceContext(returnUrl, cancelUrl);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy