encode<V> static method

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

Implementation

static V encode<V>(
  IssuingDisputeNotReceivedEvidence instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.additionalDocumentation != null) {
    FileOrId.encode(
      instance.additionalDocumentation!,
      container
          .nestedSingleValueContainer('additional_documentation')
          .encoder,
    );
  }
  if (instance.expectedAt != null) {
    container.encodeDateTime(
      'expected_at',
      instance.expectedAt!,
    );
  }
  if (instance.explanation != null) {
    container.encodeString(
      'explanation',
      instance.explanation!,
    );
  }
  if (instance.productDescription != null) {
    container.encodeString(
      'product_description',
      instance.productDescription!,
    );
  }
  if (instance.productType != null) {
    IssuingDisputeCanceledEvidenceProductType.encode(
      instance.productType!,
      container.nestedSingleValueContainer('product_type').encoder,
    );
  }
  return container.value;
}