Package com.tryfinch.api.models
Class PayStatementResponse.Body
-
- All Implemented Interfaces:
public final class PayStatementResponse.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfacePayStatementResponse.Body.VisitorAn interface that defines how to map each variant of Body to a value of type T.
public final classPayStatementResponse.Body.BatchError
-
Method Summary
-
-
Method Detail
-
payStatementResponse
final Optional<PayStatementResponseBody> payStatementResponse()
-
batchError
final Optional<PayStatementResponse.Body.BatchError> batchError()
-
payStatementDataSyncInProgress
final Optional<PayStatementDataSyncInProgress> payStatementDataSyncInProgress()
-
isPayStatementResponse
final Boolean isPayStatementResponse()
-
isBatchError
final Boolean isBatchError()
-
isPayStatementDataSyncInProgress
final Boolean isPayStatementDataSyncInProgress()
-
asPayStatementResponse
final PayStatementResponseBody asPayStatementResponse()
-
asBatchError
final PayStatementResponse.Body.BatchError asBatchError()
-
asPayStatementDataSyncInProgress
final PayStatementDataSyncInProgress asPayStatementDataSyncInProgress()
-
accept
final <T extends Any> T accept(PayStatementResponse.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.tryfinch.api.core.JsonValue; import java.util.Optional; Optional<String> result = body.accept(new Body.Visitor<Optional<String>>() { @Override public Optional<String> visitPayStatementResponse(PayStatementResponseBody payStatementResponse) { return Optional.of(payStatementResponse.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final PayStatementResponse.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.
-
ofPayStatementResponse
final static PayStatementResponse.Body ofPayStatementResponse(PayStatementResponseBody payStatementResponse)
-
ofBatchError
final static PayStatementResponse.Body ofBatchError(PayStatementResponse.Body.BatchError batchError)
-
ofPayStatementDataSyncInProgress
final static PayStatementResponse.Body ofPayStatementDataSyncInProgress(PayStatementDataSyncInProgress payStatementDataSyncInProgress)
-
-
-
-