encode<V> static method
Implementation
static V encode<V>(
IssuingNetworkTokenNetworkData instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.device != null) {
IssuingNetworkTokenDevice.encode(
instance.device!,
container.nestedSingleValueContainer('device').encoder,
);
}
if (instance.mastercard != null) {
IssuingNetworkTokenMastercard.encode(
instance.mastercard!,
container.nestedSingleValueContainer('mastercard').encoder,
);
}
IssuingTokenNetwork.encode(
instance.type,
container.nestedSingleValueContainer('type').encoder,
);
if (instance.visa != null) {
IssuingNetworkTokenVisa.encode(
instance.visa!,
container.nestedSingleValueContainer('visa').encoder,
);
}
if (instance.walletProvider != null) {
IssuingNetworkTokenWalletProvider.encode(
instance.walletProvider!,
container.nestedSingleValueContainer('wallet_provider').encoder,
);
}
return container.value;
}