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

tech.carpentum.sdk.payment.model.DuitNowPayMethodResponse Maven / Gradle / Ivy

There is a newer version: 2.1021.0
Show newest version
//THE FILE IS GENERATED, DO NOT MODIFY IT MANUALLY!!!
package tech.carpentum.sdk.payment.model;

import com.squareup.moshi.JsonClass;
import java.util.Objects;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import tech.carpentum.sdk.payment.internal.generated.model.*;
import tech.carpentum.sdk.payment.model.*;

/** 
 *
 * 
 *
 * 
 *
 * The model class is immutable.
 * Use static {@link #builder} method to create a new {@link Builder} instance to build the model class instance.
 *
 */
@JsonClass(generateAdapter = false)
public interface DuitNowPayMethodResponse extends PayinMethodResponse {
    /** A discriminator value of property {@link #getPaymentMethodCode}. The model class extends {@link PayinMethodResponse}. */
    PayinMethodResponse.PaymentMethodCode PAYMENT_METHOD_CODE = PayinMethodResponse.PaymentMethodCode.DUITNOW;

    @NotNull IdPayin getIdPayin();

    @NotNull IdPayment getIdPayment();

    @NotNull Money getMoney();

    @NotNull Optional getMoneyRequired();

    @NotNull String getMerchantName();

    /** Reference number of transaction. */
    @NotNull String getReference();

    /** Name of the QR code image which is supposed to be scanned by the wallet or payment service compatible with this payment method. QR code of the image can be labeled by this qrName to increase a clarity of the payment instruction.
If this parameter contains any value then show it to your customer in the payment instructions. */
    @NotNull String getQrName();

    /** URL to QR code image which is supposed to be scanned by the wallet or payment service compatible with this payment method. QR code encodes the payment instructions to make a payment.
If this parameter contains any value then show it to your customer in the payment instructions. */
    @NotNull String getQrCode();

    @NotNull Optional getPaymentOperator();

    /** This is the URL where the customers will be redirected after completing a payment.

The URL must be either IP or domain-based. */
    @NotNull String getReturnUrl();

    /** Date and time when payment was accepted. */
    @NotNull java.time.OffsetDateTime getAcceptedAt();

    /** Date and time of payment expiration. If no money has been transferred to this time, payment is considered failed and callback with status change event will shortly follow. */
    @NotNull java.time.OffsetDateTime getExpireAt();

    @NotNull static Builder builder(DuitNowPayMethodResponse copyOf) {
        Builder builder = builder();
        builder.idPayin(copyOf.getIdPayin());
        builder.idPayment(copyOf.getIdPayment());
        builder.money(copyOf.getMoney());
        builder.moneyRequired(copyOf.getMoneyRequired().orElse(null));
        builder.merchantName(copyOf.getMerchantName());
        builder.reference(copyOf.getReference());
        builder.qrName(copyOf.getQrName());
        builder.qrCode(copyOf.getQrCode());
        builder.paymentOperator(copyOf.getPaymentOperator().orElse(null));
        builder.returnUrl(copyOf.getReturnUrl());
        builder.acceptedAt(copyOf.getAcceptedAt());
        builder.expireAt(copyOf.getExpireAt());
        return builder;
    }

    @NotNull static Builder builder() {
        return new DuitNowPayMethodResponseImpl.BuilderImpl();
    }

    /** Builder for {@link DuitNowPayMethodResponse} model class. */
    interface Builder {

        /**
          * Set {@link DuitNowPayMethodResponse#getIdPayin} property.
          *
          * 
          */
        @NotNull Builder idPayin(IdPayin idPayin);


        /**
          * Set {@link DuitNowPayMethodResponse#getIdPayment} property.
          *
          * 
          */
        @NotNull Builder idPayment(IdPayment idPayment);


        /**
          * Set {@link DuitNowPayMethodResponse#getMoney} property.
          *
          * 
          */
        @NotNull Builder money(Money money);


        /**
          * Set {@link DuitNowPayMethodResponse#getMoneyRequired} property.
          *
          * 
          */
        @NotNull Builder moneyRequired(Money moneyRequired);


        /**
          * Set {@link DuitNowPayMethodResponse#getMerchantName} property.
          *
          * 
          */
        @NotNull Builder merchantName(String merchantName);


        /**
          * Set {@link DuitNowPayMethodResponse#getReference} property.
          *
          * Reference number of transaction.
          */
        @NotNull Builder reference(String reference);


        /**
          * Set {@link DuitNowPayMethodResponse#getQrName} property.
          *
          * Name of the QR code image which is supposed to be scanned by the wallet or payment service compatible with this payment method. QR code of the image can be labeled by this qrName to increase a clarity of the payment instruction.
If this parameter contains any value then show it to your customer in the payment instructions.
          */
        @NotNull Builder qrName(String qrName);


        /**
          * Set {@link DuitNowPayMethodResponse#getQrCode} property.
          *
          * URL to QR code image which is supposed to be scanned by the wallet or payment service compatible with this payment method. QR code encodes the payment instructions to make a payment.
If this parameter contains any value then show it to your customer in the payment instructions.
          */
        @NotNull Builder qrCode(String qrCode);


        /**
          * Set {@link DuitNowPayMethodResponse#getPaymentOperator} property.
          *
          * 
          */
        @NotNull Builder paymentOperator(PaymentOperatorIncoming paymentOperator);


        /**
          * Set {@link DuitNowPayMethodResponse#getReturnUrl} property.
          *
          * This is the URL where the customers will be redirected after completing a payment.

The URL must be either IP or domain-based.
          */
        @NotNull Builder returnUrl(String returnUrl);


        /**
          * Set {@link DuitNowPayMethodResponse#getAcceptedAt} property.
          *
          * Date and time when payment was accepted.
          */
        @NotNull Builder acceptedAt(java.time.OffsetDateTime acceptedAt);


        /**
          * Set {@link DuitNowPayMethodResponse#getExpireAt} property.
          *
          * Date and time of payment expiration. If no money has been transferred to this time, payment is considered failed and callback with status change event will shortly follow.
          */
        @NotNull Builder expireAt(java.time.OffsetDateTime expireAt);


        /**
         * Create new instance of {@link DuitNowPayMethodResponse} model class with the builder instance properties.
         *
         * @throws NullPointerException in case required properties are not specified.
         */
        @NotNull DuitNowPayMethodResponse build();

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy