encode<V> static method
Implementation
static V encode<V>(
PaymentLinkUpdateOptionsPaymentIntentData instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.description != null) {
container.encodeString(
'description',
instance.description!,
);
}
if (instance.metadata != null) {
container.encodeMap(
'metadata',
(container) => instance.metadata!.forEach((
key,
value,
) =>
container.encodeString(
key,
value,
)),
);
}
if (instance.statementDescriptor != null) {
container.encodeString(
'statement_descriptor',
instance.statementDescriptor!,
);
}
if (instance.statementDescriptorSuffix != null) {
container.encodeString(
'statement_descriptor_suffix',
instance.statementDescriptorSuffix!,
);
}
if (instance.transferGroup != null) {
container.encodeString(
'transfer_group',
instance.transferGroup!,
);
}
return container.value;
}