RazorpayAuthorizationToken constructor

  1. @JsonSerializable(includeIfNull: false)
const RazorpayAuthorizationToken({
  1. required String method,
  2. EmandateAuthTypeToken? auth_type,
  3. int? max_amount,
  4. int? expire_at,
  5. IMap? notes,
  6. RazorpayBankAccount? bank_account,
  7. int? first_payment_amount,
  8. NachInfo? nach,
  9. dynamic recurring_status,
  10. dynamic failure_reason,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory RazorpayAuthorizationToken({
  // Response specific fields from d.ts
  required String
      method, // e.g., 'emandate', 'nach', 'card', required String currency, // Added based on typical token responses, // Base fields (mostly from Emandate)
  EmandateAuthTypeToken? auth_type,
  int? max_amount,
  int? expire_at,
  IMap<dynamic>? notes,
  // bank_account in response uses the full BankAccount model
  RazorpayBankAccount? bank_account, // Changed from Base request type
  int? first_payment_amount,

  // Nach specific info (if applicable)
  NachInfo? nach,
  dynamic
      recurring_status, // Define enum if possible, 'active', 'pending', etc.
  dynamic failure_reason, // String or specific error object?
}) = _RazorpayAuthorizationToken;