encode<V> static method
Implementation
static V encode<V>(
PaymentLinksResourceConsentCollection 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) {
CheckoutSessionConsentCollectionPromotions.encode(
instance.promotions!,
container.nestedSingleValueContainer('promotions').encoder,
);
}
if (instance.termsOfService != null) {
CheckoutSessionConsentCollectionTermsOfService.encode(
instance.termsOfService!,
container.nestedSingleValueContainer('terms_of_service').encoder,
);
}
return container.value;
}