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

com.paypal.sdk.models.PayPalWalletExperienceContext 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 PayPalWalletExperienceContext type.
 */
public class PayPalWalletExperienceContext {
    private String brandName;
    private String locale;
    private ShippingPreference shippingPreference;
    private String returnUrl;
    private String cancelUrl;
    private PayPalExperienceLandingPage landingPage;
    private PayPalExperienceUserAction userAction;
    private PayeePaymentMethodPreference paymentMethodPreference;

    /**
     * Default constructor.
     */
    public PayPalWalletExperienceContext() {
        shippingPreference = ShippingPreference.GET_FROM_FILE;
        landingPage = PayPalExperienceLandingPage.NO_PREFERENCE;
        userAction = PayPalExperienceUserAction.CONTINUE;
        paymentMethodPreference = PayeePaymentMethodPreference.UNRESTRICTED;
    }

    /**
     * Initialization constructor.
     * @param  brandName  String value for brandName.
     * @param  locale  String value for locale.
     * @param  shippingPreference  ShippingPreference value for shippingPreference.
     * @param  returnUrl  String value for returnUrl.
     * @param  cancelUrl  String value for cancelUrl.
     * @param  landingPage  PayPalExperienceLandingPage value for landingPage.
     * @param  userAction  PayPalExperienceUserAction value for userAction.
     * @param  paymentMethodPreference  PayeePaymentMethodPreference value for
     *         paymentMethodPreference.
     */
    public PayPalWalletExperienceContext(
            String brandName,
            String locale,
            ShippingPreference shippingPreference,
            String returnUrl,
            String cancelUrl,
            PayPalExperienceLandingPage landingPage,
            PayPalExperienceUserAction userAction,
            PayeePaymentMethodPreference paymentMethodPreference) {
        this.brandName = brandName;
        this.locale = locale;
        this.shippingPreference = shippingPreference;
        this.returnUrl = returnUrl;
        this.cancelUrl = cancelUrl;
        this.landingPage = landingPage;
        this.userAction = userAction;
        this.paymentMethodPreference = paymentMethodPreference;
    }

    /**
     * Getter for BrandName.
     * The label that overrides the business name in the PayPal account on the PayPal site. The
     * pattern is defined by an external party and supports Unicode.
     * @return Returns the String
     */
    @JsonGetter("brand_name")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getBrandName() {
        return brandName;
    }

    /**
     * Setter for BrandName.
     * The label that overrides the business name in the PayPal account on the PayPal site. The
     * pattern is defined by an external party and supports Unicode.
     * @param brandName Value for String
     */
    @JsonSetter("brand_name")
    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    /**
     * Getter for Locale.
     * The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to
     * localize the error-related strings, such as messages, issues, and suggested actions. The tag
     * is made up of the [ISO 639-2 language
     * code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924
     * script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2
     * country code](/api/rest/reference/country-codes/) or [M49 region
     * code](https://unstats.un.org/unsd/methodology/m49/).
     * @return Returns the String
     */
    @JsonGetter("locale")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getLocale() {
        return locale;
    }

    /**
     * Setter for Locale.
     * The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to
     * localize the error-related strings, such as messages, issues, and suggested actions. The tag
     * is made up of the [ISO 639-2 language
     * code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924
     * script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2
     * country code](/api/rest/reference/country-codes/) or [M49 region
     * code](https://unstats.un.org/unsd/methodology/m49/).
     * @param locale Value for String
     */
    @JsonSetter("locale")
    public void setLocale(String locale) {
        this.locale = locale;
    }

    /**
     * Getter for ShippingPreference.
     * The location from which the shipping address is derived.
     * @return Returns the ShippingPreference
     */
    @JsonGetter("shipping_preference")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public ShippingPreference getShippingPreference() {
        return shippingPreference;
    }

    /**
     * Setter for ShippingPreference.
     * The location from which the shipping address is derived.
     * @param shippingPreference Value for ShippingPreference
     */
    @JsonSetter("shipping_preference")
    public void setShippingPreference(ShippingPreference shippingPreference) {
        this.shippingPreference = shippingPreference;
    }

    /**
     * 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;
    }

    /**
     * Getter for LandingPage.
     * The type of landing page to show on the PayPal site for customer checkout.
     * @return Returns the PayPalExperienceLandingPage
     */
    @JsonGetter("landing_page")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public PayPalExperienceLandingPage getLandingPage() {
        return landingPage;
    }

    /**
     * Setter for LandingPage.
     * The type of landing page to show on the PayPal site for customer checkout.
     * @param landingPage Value for PayPalExperienceLandingPage
     */
    @JsonSetter("landing_page")
    public void setLandingPage(PayPalExperienceLandingPage landingPage) {
        this.landingPage = landingPage;
    }

    /**
     * Getter for UserAction.
     * Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout flow.
     * @return Returns the PayPalExperienceUserAction
     */
    @JsonGetter("user_action")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public PayPalExperienceUserAction getUserAction() {
        return userAction;
    }

    /**
     * Setter for UserAction.
     * Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout flow.
     * @param userAction Value for PayPalExperienceUserAction
     */
    @JsonSetter("user_action")
    public void setUserAction(PayPalExperienceUserAction userAction) {
        this.userAction = userAction;
    }

    /**
     * Getter for PaymentMethodPreference.
     * The merchant-preferred payment methods.
     * @return Returns the PayeePaymentMethodPreference
     */
    @JsonGetter("payment_method_preference")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public PayeePaymentMethodPreference getPaymentMethodPreference() {
        return paymentMethodPreference;
    }

    /**
     * Setter for PaymentMethodPreference.
     * The merchant-preferred payment methods.
     * @param paymentMethodPreference Value for PayeePaymentMethodPreference
     */
    @JsonSetter("payment_method_preference")
    public void setPaymentMethodPreference(PayeePaymentMethodPreference paymentMethodPreference) {
        this.paymentMethodPreference = paymentMethodPreference;
    }

    /**
     * Converts this PayPalWalletExperienceContext into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "PayPalWalletExperienceContext [" + "brandName=" + brandName + ", locale=" + locale
                + ", shippingPreference=" + shippingPreference + ", returnUrl=" + returnUrl
                + ", cancelUrl=" + cancelUrl + ", landingPage=" + landingPage + ", userAction="
                + userAction + ", paymentMethodPreference=" + paymentMethodPreference + "]";
    }

    /**
     * Builds a new {@link PayPalWalletExperienceContext.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link PayPalWalletExperienceContext.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .brandName(getBrandName())
                .locale(getLocale())
                .shippingPreference(getShippingPreference())
                .returnUrl(getReturnUrl())
                .cancelUrl(getCancelUrl())
                .landingPage(getLandingPage())
                .userAction(getUserAction())
                .paymentMethodPreference(getPaymentMethodPreference());
        return builder;
    }

    /**
     * Class to build instances of {@link PayPalWalletExperienceContext}.
     */
    public static class Builder {
        private String brandName;
        private String locale;
        private ShippingPreference shippingPreference = ShippingPreference.GET_FROM_FILE;
        private String returnUrl;
        private String cancelUrl;
        private PayPalExperienceLandingPage landingPage = PayPalExperienceLandingPage.NO_PREFERENCE;
        private PayPalExperienceUserAction userAction = PayPalExperienceUserAction.CONTINUE;
        private PayeePaymentMethodPreference paymentMethodPreference =
                PayeePaymentMethodPreference.UNRESTRICTED;



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

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

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

        /**
         * 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;
        }

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

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

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

        /**
         * Builds a new {@link PayPalWalletExperienceContext} object using the set fields.
         * @return {@link PayPalWalletExperienceContext}
         */
        public PayPalWalletExperienceContext build() {
            return new PayPalWalletExperienceContext(brandName, locale, shippingPreference,
                    returnUrl, cancelUrl, landingPage, userAction, paymentMethodPreference);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy