encode<V> static method
Implementation
static V encode<V>(
CheckoutSessionConsentCollection instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.paymentMethodReuseAgreement != null) {
CheckoutSessionConsentCollectionPaymentMethodReuseAgreement.encode(
instance.paymentMethodReuseAgreement!,
container
.nestedSingleValueContainer('payment_method_reuse_agreement')
.encoder,
);
}
if (instance.promotions != null) {
container.encodeString(
'promotions',
instance.promotions!,
);
}
if (instance.termsOfService != null) {
container.encodeString(
'terms_of_service',
instance.termsOfService!,
);
}
return container.value;
}