encode<V> static method

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

Implementation

static V encode<V>(
  IssuingDisputeCanceledEvidence instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.additionalDocumentation != null) {
    FileOrId.encode(
      instance.additionalDocumentation!,
      container
          .nestedSingleValueContainer('additional_documentation')
          .encoder,
    );
  }
  if (instance.canceledAt != null) {
    container.encodeDateTime(
      'canceled_at',
      instance.canceledAt!,
    );
  }
  if (instance.cancellationPolicyProvided != null) {
    container.encodeBool(
      'cancellation_policy_provided',
      instance.cancellationPolicyProvided!,
    );
  }
  if (instance.cancellationReason != null) {
    container.encodeString(
      'cancellation_reason',
      instance.cancellationReason!,
    );
  }
  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) {
    container.encodeString(
      'product_type',
      instance.productType!,
    );
  }
  if (instance.returnStatus != null) {
    container.encodeString(
      'return_status',
      instance.returnStatus!,
    );
  }
  if (instance.returnedAt != null) {
    container.encodeDateTime(
      'returned_at',
      instance.returnedAt!,
    );
  }
  return container.value;
}