RazorpayItem constructor

  1. @JsonSerializable(includeIfNull: false)
const RazorpayItem({
  1. required String id,
  2. required String name,
  3. required dynamic amount,
  4. required String currency,
  5. required int unit_amount,
  6. required String type,
  7. required int updated_at,
  8. int? unit,
  9. int? hsn_code,
  10. int? sac_code,
  11. int? tax_rate,
  12. String? tax_id,
  13. String? tax_group_id,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory RazorpayItem({
  required String id,
  required String name,
  required dynamic amount, // number | string
  required String currency,
  // Response specific fields
  required int unit_amount,
  required String type,
  required int
      updated_at, // Typically 'invoice', required bool tax_inclusive, required int created_at, required int updated_at, 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;