encode<V> static method

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

Implementation

static V encode<V>(
  BankConnectionsResourceTransactionRefresh instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'id',
    instance.id,
  );
  container.encodeDateTime(
    'last_attempted_at',
    instance.lastAttemptedAt,
  );
  if (instance.nextRefreshAvailableAt != null) {
    container.encodeDateTime(
      'next_refresh_available_at',
      instance.nextRefreshAvailableAt!,
    );
  }
  BankConnectionsResourceBalanceRefreshStatus.encode(
    instance.status,
    container.nestedSingleValueContainer('status').encoder,
  );
  return container.value;
}