Class CardProvisionResponse.ProvisioningPayload
-
- All Implemented Interfaces:
public final class CardProvisionResponse.ProvisioningPayloadBase64 encoded JSON payload representing a payment card that can be passed to a device's digital wallet. Applies to Google and Samsung Pay wallets.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceCardProvisionResponse.ProvisioningPayload.VisitorAn interface that defines how to map each variant of ProvisioningPayload to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>string()Base64 encoded JSON payload representing a payment card that can be passed to a device's digital wallet. final Optional<ProvisionResponse>provisionResponse()Object containing the fields required to add a card to Apple Pay. final BooleanisString()final BooleanisProvisionResponse()final StringasString()Base64 encoded JSON payload representing a payment card that can be passed to a device's digital wallet. final ProvisionResponseasProvisionResponse()Object containing the fields required to add a card to Apple Pay. final Optional<JsonValue>_json()final <T extends Any> Taccept(CardProvisionResponse.ProvisioningPayload.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final CardProvisionResponse.ProvisioningPayloadvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CardProvisionResponse.ProvisioningPayloadofString(String string)Base64 encoded JSON payload representing a payment card that can be passed to a device's digital wallet. final static CardProvisionResponse.ProvisioningPayloadofProvisionResponse(ProvisionResponse provisionResponse)Object containing the fields required to add a card to Apple Pay. -
-
Method Detail
-
string
final Optional<String> string()
Base64 encoded JSON payload representing a payment card that can be passed to a device's digital wallet. Applies to Google and Samsung Pay wallets.
-
provisionResponse
final Optional<ProvisionResponse> provisionResponse()
Object containing the fields required to add a card to Apple Pay. Applies only to Apple Pay wallet.
-
isProvisionResponse
final Boolean isProvisionResponse()
-
asString
final String asString()
Base64 encoded JSON payload representing a payment card that can be passed to a device's digital wallet. Applies to Google and Samsung Pay wallets.
-
asProvisionResponse
final ProvisionResponse asProvisionResponse()
Object containing the fields required to add a card to Apple Pay. Applies only to Apple Pay wallet.
-
accept
final <T extends Any> T accept(CardProvisionResponse.ProvisioningPayload.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 = provisioningPayload.accept(new ProvisioningPayload.Visitor<Optional<String>>() { @Override public Optional<String> visitString(String string) { return Optional.of(string.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final CardProvisionResponse.ProvisioningPayload 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.
-
ofString
final static CardProvisionResponse.ProvisioningPayload ofString(String string)
Base64 encoded JSON payload representing a payment card that can be passed to a device's digital wallet. Applies to Google and Samsung Pay wallets.
-
ofProvisionResponse
final static CardProvisionResponse.ProvisioningPayload ofProvisionResponse(ProvisionResponse provisionResponse)
Object containing the fields required to add a card to Apple Pay. Applies only to Apple Pay wallet.
-
-
-
-