/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2013 - 2017 PayinTech
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package io.payintech.wallet.entity;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * WalletApiService.
 *
 * @author Jean-Pierre Boudic
 * @version 16.08.11
 * @since 16.08.11
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class PaymentRequestEntity implements Serializable {

    /**
     * The total amount of order.
     *
     * @since 16.08.11
     */
    private final Long amount;

    /**
     * The URL to redirect user after payment done.
     *
     * @since 16.08.11
     */
    private final String redirectionUrl;

    /**
     * The reason of payment.
     * (Message display in transaction details of wallet).
     *
     * @since 16.08.11
     */
    private final String message;

    /**
     * Instantiates a new process entity.
     *
     * @param amount         the total amount
     * @param redirectionUrl the URL to redirect
     * @param message        The message to display in ledger
     * @since 16.08.11
     */
    @JsonCreator
    public PaymentRequestEntity(@JsonProperty(value = "amount", required = true) final Long amount,
                                @JsonProperty(value = "redirectionUrl", required = true) final String redirectionUrl,
                                @JsonProperty(value = "message", required = true) final String message) {
        this.amount = amount;
        this.redirectionUrl = redirectionUrl;
        this.message = message;
    }

    /**
     * The total amount of order.
     *
     * @return The total amount
     * @since 16.08.11
     */
    public Long getAmount() {
        return this.amount;
    }

    /**
     * The URL to redirect user after payment done.
     *
     * @return The URL to redirect
     * @since 16.08.11
     */
    public String getRedirectionUrl() {
        return this.redirectionUrl;
    }

    /**
     * The reason of payment.
     * (Message display in transaction details of wallet).
     *
     * @return The message
     * @since 16.08.11
     */
    public String getMessage() {
        return this.message;
    }
}
