encode<V> static method

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

Implementation

static V encode<V>(
  IssuingDisputeDuplicateEvidence instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.additionalDocumentation != null) {
    FileOrId.encode(
      instance.additionalDocumentation!,
      container
          .nestedSingleValueContainer('additional_documentation')
          .encoder,
    );
  }
  if (instance.cardStatement != null) {
    FileOrId.encode(
      instance.cardStatement!,
      container.nestedSingleValueContainer('card_statement').encoder,
    );
  }
  if (instance.cashReceipt != null) {
    FileOrId.encode(
      instance.cashReceipt!,
      container.nestedSingleValueContainer('cash_receipt').encoder,
    );
  }
  if (instance.checkImage != null) {
    FileOrId.encode(
      instance.checkImage!,
      container.nestedSingleValueContainer('check_image').encoder,
    );
  }
  if (instance.explanation != null) {
    container.encodeString(
      'explanation',
      instance.explanation!,
    );
  }
  if (instance.originalTransaction != null) {
    container.encodeString(
      'original_transaction',
      instance.originalTransaction!,
    );
  }
  return container.value;
}