encode<V> static method
Implementation
static V encode<V>(
SubscriptionCard instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.mandateOptions != null) {
SubscriptionMandateOptions.encode(
instance.mandateOptions!,
container.nestedSingleValueContainer('mandate_options').encoder,
);
}
if (instance.network != null) {
PaymentIntentNetwork.encode(
instance.network!,
container.nestedSingleValueContainer('network').encoder,
);
}
if (instance.requestThreeDSecure != null) {
CheckoutCardPaymentMethodOptionsRequestThreeDSecure.encode(
instance.requestThreeDSecure!,
container.nestedSingleValueContainer('request_three_d_secure').encoder,
);
}
return container.value;
}