Skip to content

Introduce KSerializer for enums in Response models #88

@StefMa

Description

@StefMa

See reason here: #80, specially here.

We should introduce a KSerializer for each enum that has a default value right now.
For example like this:

@SerialName(value = "receipt_type") val type: Type = Type.UNSUPPORTED,

There we should remove the default value and introduce a custom KSerializer like that:

private object ApiCancellationReasonSerializer : KSerializer<ApiCancellationReason?> {

TODOs:

  • Search for all default values in code (for enums)
  • Remove default values for enums
  • Introduce custom KSerializer for those

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions