wpint: No more than 5 line items on the CN22 declaration allowed
Otherwise the API will generate the following error: "items[0].contents: size must be between 0 and 5"
This commit is contained in:
parent
dd8b8d7320
commit
db0a0fb7ae
|
@ -222,6 +222,8 @@ class WarenpostInt(object):
|
||||||
raise ValueError('Maximum item gross weight is 2000g')
|
raise ValueError('Maximum item gross weight is 2000g')
|
||||||
if len(currency) != 3:
|
if len(currency) != 3:
|
||||||
raise ValueError('Currency must be expressed as 3-digit ISO-4217 code')
|
raise ValueError('Currency must be expressed as 3-digit ISO-4217 code')
|
||||||
|
if contents and len(contents) > 5:
|
||||||
|
raise ValueError('Custom Contents must not contain more than 5 lines')
|
||||||
ret = {
|
ret = {
|
||||||
'product': str(product),
|
'product': str(product),
|
||||||
'serviceLevel': 'STANDARD',
|
'serviceLevel': 'STANDARD',
|
||||||
|
|
Loading…
Reference in New Issue