Skip to content

Item validator rejects negative unitPrice contrary to documentation #48

Description

@dontobsu

Hello! The Item validator currently enforces a minimum value of 0 for unitPrice.

export class Item {
  @IsNotEmpty()
  @IsNumber()
  @Min(0)
  public unitPrice: number
  ...
}

However, according to the Paytrail documentation, the allowed range for unitPrice is:

Maximum value is 2147483647, minimum value is -2147483648.

It is currently not possible to create payments with discount line items, which have a negative unitPrice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions