encode<V> static method
Implementation
static V encode<V>(
PaymentMethodDetailsPaypal instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.payerEmail != null) {
container.encodeString(
'payer_email',
instance.payerEmail!,
);
}
if (instance.payerId != null) {
container.encodeString(
'payer_id',
instance.payerId!,
);
}
if (instance.payerName != null) {
container.encodeString(
'payer_name',
instance.payerName!,
);
}
if (instance.sellerProtection != null) {
PaymentMethodDetailsPaypalSellerProtection.encode(
instance.sellerProtection!,
container.nestedSingleValueContainer('seller_protection').encoder,
);
}
if (instance.transactionId != null) {
container.encodeString(
'transaction_id',
instance.transactionId!,
);
}
return container.value;
}