RazorpayRefund constructor

  1. @JsonSerializable(includeIfNull: false)
const RazorpayRefund({
  1. required String id,
  2. required String entity,
  3. required String currency,
  4. required String payment_id,
  5. required int created_at,
  6. required RazorpayRefundStatus status,
  7. int? amount,
  8. IMap? notes,
  9. String? receipt,
  10. IMap? acquirer_data,
  11. String? batch_id,
  12. ProcessedSpeed? speed_processed,
  13. RefundSpeed? speed_requested,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory RazorpayRefund({
  required String id,
  required String entity,
  required String currency,
  required String payment_id,
  required int created_at,
  required RazorpayRefundStatus status,
  int?
      amount, // Use nullable int as amount might not be present in all contexts? d.ts shows optional
  IMap<dynamic>? notes, // IMap<string | number>
  String? receipt, // Nullable string

  // Response specific fields
  IMap<dynamic>? acquirer_data, // Use Map<String, dynamic> for flexibility
  String? batch_id, // Nullable string
  ProcessedSpeed? speed_processed, // Nullable enum
  RefundSpeed? speed_requested, // Nullable enum
}) = _RazorpayRefund;