tech.carpentum.sdk.payment.model.Payout Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of payment-client-v2 Show documentation
Show all versions of payment-client-v2 Show documentation
Carpentum Payment system Java SDK
The 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.*;
/** Payout
*
* For every payment method there is appropriate payment specific request object in `paymentMethod` attribute.
If you have used the [`POST /payins/!availablePaymentOptions`](#operations-Incoming_payments-availablePaymentOptions) API to get the list of the available payment options, then it is expected that you use the same input data here to make sure that the payment will be accepted.
*
*
*
* 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 Payout {
@NotNull PaymentRequested getPaymentRequested();
@NotNull PayoutMethod getPaymentMethod();
/** This is the URL where the system will send the transaction final status after payment has been completed.
The URL must be either IP or domain-based. */
@NotNull Optional getCallbackUrl();
/** The IP address of the customer making the payment in either the IPv4 or IPv6 format.
The IP address is used for validating against the IP address whitelists and blacklists from the merchant settings. */
@NotNull Optional getCustomerIp();
@NotNull static Builder builder(Payout copyOf) {
Builder builder = builder();
builder.paymentRequested(copyOf.getPaymentRequested());
builder.paymentMethod(copyOf.getPaymentMethod());
builder.callbackUrl(copyOf.getCallbackUrl().orElse(null));
builder.customerIp(copyOf.getCustomerIp().orElse(null));
return builder;
}
@NotNull static Builder builder() {
return new PayoutImpl.BuilderImpl();
}
/** Builder for {@link Payout} model class. */
interface Builder {
/**
* Set {@link Payout#getPaymentRequested} property.
*
*
*/
@NotNull Builder paymentRequested(PaymentRequested paymentRequested);
/**
* Set {@link Payout#getPaymentMethod} property.
*
*
*/
@NotNull Builder paymentMethod(PayoutMethod paymentMethod);
/**
* Set {@link Payout#getCallbackUrl} property.
*
* This is the URL where the system will send the transaction final status after payment has been completed.
The URL must be either IP or domain-based.
*/
@NotNull Builder callbackUrl(String callbackUrl);
/**
* Set {@link Payout#getCustomerIp} property.
*
* The IP address of the customer making the payment in either the IPv4 or IPv6 format.
The IP address is used for validating against the IP address whitelists and blacklists from the merchant settings.
*/
@NotNull Builder customerIp(String customerIp);
/**
* Create new instance of {@link Payout} model class with the builder instance properties.
*
* @throws NullPointerException in case required properties are not specified.
*/
@NotNull Payout build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy