encode<V> static method
Implementation
static V encode<V>(
PaymentMethodCardWalletVisaCheckout instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.billingAddress != null) {
Address.encode(
instance.billingAddress!,
container.nestedSingleValueContainer('billing_address').encoder,
);
}
if (instance.email != null) {
container.encodeString(
'email',
instance.email!,
);
}
if (instance.name != null) {
container.encodeString(
'name',
instance.name!,
);
}
if (instance.shippingAddress != null) {
Address.encode(
instance.shippingAddress!,
container.nestedSingleValueContainer('shipping_address').encoder,
);
}
return container.value;
}