encode<V> static method
Implementation
static V encode<V>(
TreasuryInboundTransferCreateOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeInt(
'amount',
instance.amount,
);
container.encodeString(
'currency',
instance.currency,
);
if (instance.description != null) {
container.encodeString(
'description',
instance.description!,
);
}
if (instance.expand != null) {
container.encodeList(
'expand',
(container) =>
instance.expand!.forEach((el) => container.encodeString(el)),
);
}
container.encodeString(
'financial_account',
instance.financialAccount,
);
if (instance.metadata != null) {
container.encodeMap(
'metadata',
(container) => instance.metadata!.forEach((
key,
value,
) =>
container.encodeString(
key,
value,
)),
);
}
container.encodeString(
'origin_payment_method',
instance.originPaymentMethod,
);
if (instance.statementDescriptor != null) {
container.encodeString(
'statement_descriptor',
instance.statementDescriptor!,
);
}
return container.value;
}