encode<V> static method

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

Implementation

static V encode<V>(
  FundingInstructions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  FundingInstructionsBankTransfer.encode(
    instance.bankTransfer,
    container.nestedSingleValueContainer('bank_transfer').encoder,
  );
  container.encodeString(
    'currency',
    instance.currency,
  );
  container.encodeString(
    'funding_type',
    'bank_transfer',
  );
  container.encodeBool(
    'livemode',
    instance.livemode,
  );
  container.encodeString(
    'object',
    'funding_instructions',
  );
  return container.value;
}