Class DocumentRetreiveResponse

  • All Implemented Interfaces:

    
    public final class DocumentRetreiveResponse
    
                        

    A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • w42020

         final Optional<W42020> w42020()

        A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

      • w42005

         final Optional<W42005> w42005()

        A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

      • asW42020

         final W42020 asW42020()

        A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

      • asW42005

         final W42005 asW42005()

        A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

      • accept

         final <T extends Any> T accept(DocumentRetreiveResponse.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 = documentRetreiveResponse.accept(new DocumentRetreiveResponse.Visitor<Optional<String>>() {
            @Override
            public Optional<String> visitW42020(W42020 w42020) {
                return Optional.of(w42020.toString());
            }
        
            // ...
        
            @Override
            public Optional<String> unknown(JsonValue json) {
                // Or inspect the `json`.
                return Optional.empty();
            }
        });
      • validate

         final DocumentRetreiveResponse 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.

      • ofW42020

         final static DocumentRetreiveResponse ofW42020(W42020 w42020)

        A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

      • ofW42005

         final static DocumentRetreiveResponse ofW42005(W42005 w42005)

        A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.