encode<V> static method
Implementation
static V encode<V>(
SourceTypeSepaCreditTransfer instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.bankName != null) {
container.encodeString(
'bank_name',
instance.bankName!,
);
}
if (instance.bic != null) {
container.encodeString(
'bic',
instance.bic!,
);
}
if (instance.iban != null) {
container.encodeString(
'iban',
instance.iban!,
);
}
if (instance.refundAccountHolderAddressCity != null) {
container.encodeString(
'refund_account_holder_address_city',
instance.refundAccountHolderAddressCity!,
);
}
if (instance.refundAccountHolderAddressCountry != null) {
container.encodeString(
'refund_account_holder_address_country',
instance.refundAccountHolderAddressCountry!,
);
}
if (instance.refundAccountHolderAddressLine1 != null) {
container.encodeString(
'refund_account_holder_address_line1',
instance.refundAccountHolderAddressLine1!,
);
}
if (instance.refundAccountHolderAddressLine2 != null) {
container.encodeString(
'refund_account_holder_address_line2',
instance.refundAccountHolderAddressLine2!,
);
}
if (instance.refundAccountHolderAddressPostalCode != null) {
container.encodeString(
'refund_account_holder_address_postal_code',
instance.refundAccountHolderAddressPostalCode!,
);
}
if (instance.refundAccountHolderAddressState != null) {
container.encodeString(
'refund_account_holder_address_state',
instance.refundAccountHolderAddressState!,
);
}
if (instance.refundAccountHolderName != null) {
container.encodeString(
'refund_account_holder_name',
instance.refundAccountHolderName!,
);
}
if (instance.refundIban != null) {
container.encodeString(
'refund_iban',
instance.refundIban!,
);
}
return container.value;
}