You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Description
The BillingPlanDto currently does not support a yearly billing plan properly. The frequency field is a simple string without validation for allowed values, and amount is incorrectly validated as a string instead of a number.
Steps to Reproduce
Attempt to create a billing plan with frequency: 'yearly'.
The request is accepted, but there's no validation ensuring only "monthly" or "yearly" are allowed.
The amount field expects a string instead of a number, which could cause unintended behavior in the system.
Expected Behavior
The frequency field should only accept "monthly" or "yearly" to prevent invalid values.
The amount field should be validated as a number instead of a string.
Current Behavior
The frequency field accepts any string value, leading to potential incorrect configurations.
The amount field is treated as a string, which might cause issues when performing calculations.
The frequency field only supports monthly as a value.
Attempting to use yearly results in validation errors.
Screenshots/Logs
Feature not bug
Environment
OS: Windows/macOS/Linux
Browser/Device: Postman, Chrome, Firefox
Version: Current version of the application.
Possible Solution
Use @isin(['monthly', 'yearly']) for the frequency field to restrict allowed values.
Change @IsNumberString() to @IsNumber() for the amount field to ensure proper type validation.
Additional Context
This issue affects the ability to create and manage billing plans effectively.
Proper validation would improve system stability and prevent misconfigurations.
This feature will provide more flexibility for users and align with common billing practices.
Expected Json Response for both Monthly and Yearly
The text was updated successfully, but these errors were encountered:
AndreD17
changed the title
[CHORE] Feature
[FEAT] Add Endpoint to Delete Product Comments #1266
Mar 1, 2025
AndreD17
changed the title
[FEAT] Add Endpoint to Delete Product Comments #1266
[FEAT] Add A Yearly plan option to billings and validate billing.
Mar 1, 2025
AndreD17
changed the title
[FEAT] Add A Yearly plan option to billings and validate billing.
[FEAT] Add A Yearly plan option to billings and validate billing.
Mar 1, 2025
Feature Description
The BillingPlanDto currently does not support a yearly billing plan properly. The frequency field is a simple string without validation for allowed values, and amount is incorrectly validated as a string instead of a number.
Steps to Reproduce
Attempt to create a billing plan with frequency: 'yearly'.
The request is accepted, but there's no validation ensuring only "monthly" or "yearly" are allowed.
The amount field expects a string instead of a number, which could cause unintended behavior in the system.
Expected Behavior
The frequency field should only accept "monthly" or "yearly" to prevent invalid values.
The amount field should be validated as a number instead of a string.
Current Behavior
The frequency field accepts any string value, leading to potential incorrect configurations.
The amount field is treated as a string, which might cause issues when performing calculations.
The frequency field only supports monthly as a value.
Attempting to use yearly results in validation errors.
Screenshots/Logs
Feature not bug
Environment
OS: Windows/macOS/Linux
Browser/Device: Postman, Chrome, Firefox
Version: Current version of the application.
Possible Solution
Use @isin(['monthly', 'yearly']) for the frequency field to restrict allowed values.
Change @IsNumberString() to @IsNumber() for the amount field to ensure proper type validation.
Additional Context
This issue affects the ability to create and manage billing plans effectively.
Proper validation would improve system stability and prevent misconfigurations.
This feature will provide more flexibility for users and align with common billing practices.
Expected Json Response for both Monthly and Yearly
[
{
"name": "Free",
"description": "Free",
"frequency": "monthly",
"amount": 0,
"is_active": true
},
{
"name": "Premium",
"description": "Premium yearly plan",
"frequency": "yearly",
"amount": 100,
"is_active": true
}
]
The text was updated successfully, but these errors were encountered: