Package com.lithic.api.models
Class AccountHolderCreateParams.Body
-
- All Implemented Interfaces:
public final class AccountHolderCreateParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAccountHolderCreateParams.Body.VisitorAn interface that defines how to map each variant of Body to a value of type T.
public final classAccountHolderCreateParams.Body.KybDelegated
-
Method Summary
-
-
Method Detail
-
kybDelegated
final Optional<AccountHolderCreateParams.Body.KybDelegated> kybDelegated()
-
isKybDelegated
final Boolean isKybDelegated()
-
isKycExempt
final Boolean isKycExempt()
-
asKybDelegated
final AccountHolderCreateParams.Body.KybDelegated asKybDelegated()
-
asKycExempt
final KycExempt asKycExempt()
-
accept
final <T extends Any> T accept(AccountHolderCreateParams.Body.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.lithic.api.core.JsonValue; import java.util.Optional; Optional<String> result = body.accept(new Body.Visitor<Optional<String>>() { @Override public Optional<String> visitKyb(Kyb kyb) { return Optional.of(kyb.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final AccountHolderCreateParams.Body validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofKyb
final static AccountHolderCreateParams.Body ofKyb(Kyb kyb)
-
ofKybDelegated
final static AccountHolderCreateParams.Body ofKybDelegated(AccountHolderCreateParams.Body.KybDelegated kybDelegated)
-
ofKyc
final static AccountHolderCreateParams.Body ofKyc(Kyc kyc)
-
ofKycExempt
final static AccountHolderCreateParams.Body ofKycExempt(KycExempt kycExempt)
-
-
-
-