Skip to content

Commit fc64ae0

Browse files
authored
feat(payment-stripe): add optional custom unit amount support in price creation (#213)
1 parent dbf4bdc commit fc64ae0

File tree

1 file changed

+11
-1
lines changed
  • microservices/payment-stripe/src/methods/price

1 file changed

+11
-1
lines changed

microservices/payment-stripe/src/methods/price/create.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,17 @@ class PriceCreateInput {
1515
userId: string;
1616

1717
@IsNumber()
18-
unitAmount: number;
18+
@IsOptional()
19+
unitAmount?: number;
20+
21+
@IsObject()
22+
@IsOptional()
23+
customUnitAmount?: {
24+
enabled: boolean;
25+
preset?: number;
26+
minimum?: number;
27+
maximum?: number;
28+
};
1929

2030
@IsObject()
2131
@IsOptional()

0 commit comments

Comments
 (0)