We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a2131c commit 489cdfcCopy full SHA for 489cdfc
src/commercetools/testing/utils.py
@@ -89,6 +89,16 @@ def create_from_draft(draft: typing.Optional[_BaseType]):
89
for portion in draft.tax_portions
90
],
91
)
92
+ if isinstance(draft, models.ExternalTaxRateDraft):
93
+ return models.TaxRate(
94
+ id=str(uuid.uuid4()),
95
+ name=draft.name,
96
+ amount=draft.amount,
97
+ included_in_price=draft.included_in_price,
98
+ country=draft.country,
99
+ state=draft.state,
100
+ sub_rates=draft.sub_rates,
101
+ )
102
103
raise ValueError(f"Unsupported type {draft.__class__}")
104
0 commit comments