Represents user input for creating a new payment intent. This class is used to validate the data before creating a payment intent with Stripe.
amount
currency
description
surveyCount
The class uses the following decorators:- `@Field()`: exposes the property in the GraphQL schema (via type-graphql).- `@IsNumber()`: ensures the amount is a number.- `@IsPositive()`: ensures the amount is positive.- `@IsString()`: ensures the currency is a string.- `@Length()`: ensures the string length is within the specified bounds. Copy
The class uses the following decorators:- `@Field()`: exposes the property in the GraphQL schema (via type-graphql).- `@IsNumber()`: ensures the amount is a number.- `@IsPositive()`: ensures the amount is positive.- `@IsString()`: ensures the currency is a string.- `@Length()`: ensures the string length is within the specified bounds.
Represents user input for creating a new payment intent. This class is used to validate the data before creating a payment intent with Stripe.
Description
amount
: the amount to charge in cents, must be a positive number.currency
: the currency code (e.g., 'eur'), must be a string of 3 characters.description
: a description of the payment, must be between 3 and 255 characters.surveyCount
: the number of surveys that will be added to the user's quota, must be a positive number.Example