encode<V> static method

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

Implementation

static V encode<V>(
  DisputeMerchandiseNotAsDescribed instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.additionalDocumentation != null) {
    container.encodeString(
      'additional_documentation',
      instance.additionalDocumentation!,
    );
  }
  if (instance.explanation != null) {
    container.encodeString(
      'explanation',
      instance.explanation!,
    );
  }
  if (instance.receivedAt != null) {
    container.encodeDateTime(
      'received_at',
      instance.receivedAt!,
    );
  }
  if (instance.returnDescription != null) {
    container.encodeString(
      'return_description',
      instance.returnDescription!,
    );
  }
  if (instance.returnStatus != null) {
    DisputeReturnStatus.encode(
      instance.returnStatus!,
      container.nestedSingleValueContainer('return_status').encoder,
    );
  }
  if (instance.returnedAt != null) {
    container.encodeDateTime(
      'returned_at',
      instance.returnedAt!,
    );
  }
  return container.value;
}