Skip to content

Receipt product type is missing description #300

@yavuz1205

Description

@yavuz1205

Hi, we noticed that the receipt product type in @sumup/sdk does not include description, but this field is present in the actual receipt payload.

In transaction_data.products[], we receive description at runtime and use it in our integration, but TypeScript complains because it is not part of the generated SDK type.

Right now we have to work around it locally like this:

type SdkReceiptTransaction = NonNullable<SumUpSdkReceipt["transaction_data"]>;
type SdkReceiptProduct = NonNullable<SdkReceiptTransaction["products"]>[number];

type ReceiptProduct = SdkReceiptProduct & {
  description?: string;
};

Would it be possible to add description to the generated ReceiptTransaction.products[] type?

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