encode<V> static method
Implementation
static V encode<V>(
IssuingTransactionCreateForceCaptureOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeInt(
'amount',
instance.amount,
);
container.encodeString(
'card',
instance.card,
);
if (instance.currency != null) {
container.encodeString(
'currency',
instance.currency!,
);
}
if (instance.expand != null) {
container.encodeList(
'expand',
(container) =>
instance.expand!.forEach((el) => container.encodeString(el)),
);
}
if (instance.merchantData != null) {
AuthorizationMerchantData.encode(
instance.merchantData!,
container.nestedSingleValueContainer('merchant_data').encoder,
);
}
if (instance.purchaseDetails != null) {
AuthorizationPurchaseDetails.encode(
instance.purchaseDetails!,
container.nestedSingleValueContainer('purchase_details').encoder,
);
}
return container.value;
}