encode<V> static method

V encode<V>(
  1. PaymentMethodDetailsFpx instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  PaymentMethodDetailsFpx instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.accountHolderType != null) {
    InboundTransfersPaymentMethodDetailsUsBankAccountAccountHolderType.encode(
      instance.accountHolderType!,
      container.nestedSingleValueContainer('account_holder_type').encoder,
    );
  }
  container.encodeString(
    'bank',
    instance.bank,
  );
  if (instance.transactionId != null) {
    container.encodeString(
      'transaction_id',
      instance.transactionId!,
    );
  }
  return container.value;
}