RazorpayItem constructor
- @JsonSerializable(includeIfNull: false)
const
RazorpayItem(
{ - required String id,
- required String name,
- required int amount,
- required String currency,
- required int unit_amount,
- required String type,
- @DateTimeConverter() required DateTime created_at,
- required bool tax_inclusive,
- required bool active,
- String? description,
- int? unit,
- int? hsn_code,
- int? sac_code,
- int? tax_rate,
- String? tax_id,
- String? tax_group_id,
})
Implementation
@JsonSerializable(includeIfNull: false)
const factory RazorpayItem({
required String id,
required String name,
required int amount, // number | string
required String currency,
// Response specific fields
required int unit_amount,
required String type,
@DateTimeConverter() required DateTime created_at, // Typically 'invoice',
required bool tax_inclusive,
required bool active,
String? description,
int? unit, // Nullable number
int? hsn_code, // Nullable number
int? sac_code, // Nullable number
int? tax_rate, // Nullable number
String? tax_id, // Nullable string
String? tax_group_id, // Nullable string
}) = _RazorpayItem;