encode<V> static method
V
encode<
V>( - SessionCard instance,
- Encoder<V> encoder
)
Implementation
static V encode<V>(
SessionCard instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.installments != null) {
CheckoutCardInstallmentsOptions.encode(
instance.installments!,
container.nestedSingleValueContainer('installments').encoder,
);
}
if (instance.requestThreeDSecure != null) {
CheckoutCardPaymentMethodOptionsRequestThreeDSecure.encode(
instance.requestThreeDSecure!,
container.nestedSingleValueContainer('request_three_d_secure').encoder,
);
}
if (instance.setupFutureUsage != null) {
SessionSetupFutureUsage.encode(
instance.setupFutureUsage!,
container.nestedSingleValueContainer('setup_future_usage').encoder,
);
}
if (instance.statementDescriptorSuffixKana != null) {
container.encodeString(
'statement_descriptor_suffix_kana',
instance.statementDescriptorSuffixKana!,
);
}
if (instance.statementDescriptorSuffixKanji != null) {
container.encodeString(
'statement_descriptor_suffix_kanji',
instance.statementDescriptorSuffixKanji!,
);
}
return container.value;
}