namespace ComplianceDAL.DTO.AdapterConfig; public class AdapterConfigDTO { public int AdapterConfigId { get; set; } public int GSPConfigId { get; set; } public string GSPName { get; set; } = string.Empty; public int SourceType { get; set; } // 1=GSTCafe, 2=MasterSuvidha, 3=ZATCA, 4=Peppol, 5=Direct public string Framework { get; set; } = string.Empty; public string GSTIN { get; set; } = string.Empty; // Legacy fields kept for the non-e-invoice adapter methods (e-way/returns) that still use them. public string AuthURL { get; set; } = string.Empty; public string BaseURL { get; set; } = string.Empty; public string ClientIdAPI { get; set; } = string.Empty; public string ClientSecret { get; set; } = string.Empty; public bool IsActive { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime? ModifiedOn { get; set; } // Raw/decrypted fields from MGSP/MGST (GET_ADAPTER_CONFIG_BY_GSTIN) — same fields GB4's // GSTGovtSwitchFrameDAL.GSPHeader builds into GSPCallDTO. AdapterConfigDAL decrypts ASPId/ // ASPSecret/ASPSource/GSPClientId/GSPClientSecret/EInvoicePassword/EWayPassword in place after // the query runs — ASPClientId (like GB4's CustomerId) is used raw, never decrypted. public int GSPId { get; set; } public string ASPClientId { get; set; } = string.Empty; public string ASPSecret { get; set; } = string.Empty; public string ASPId { get; set; } = string.Empty; public string ASPSource { get; set; } = string.Empty; public string GSPClientId { get; set; } = string.Empty; public string GSPClientSecret { get; set; } = string.Empty; public string EInvoiceSandboxBaseURL { get; set; } = string.Empty; public string EInvoiceProductionBaseURL { get; set; } = string.Empty; public int EInvoiceEnvironment { get; set; } public string EInvoiceUserId { get; set; } = string.Empty; public string EInvoicePassword { get; set; } = string.Empty; // Resolved by AdapterConfigDAL from EInvoiceEnvironment (0 = Sandbox, else Production) — same // as GB4's GSPCallDTO.EInvoiceUrl. GSTCafeAdapter builds the e-invoice generate/cancel URLs from this. public string EInvoiceUrl { get; set; } = string.Empty; public string EWaySandboxBaseURL { get; set; } = string.Empty; public string EWayProductionBaseURL { get; set; } = string.Empty; public int EWayEnvironment { get; set; } public string EWayUserId { get; set; } = string.Empty; public string EWayPassword { get; set; } = string.Empty; // Resolved by AdapterConfigDAL from EWayEnvironment (0 = Sandbox, else Production) — same as // GB4's GSPCallDTO.EWayUrl. GSTCafeAdapter builds the e-way generate/cancel URLs from this. public string EWayUrl { get; set; } = string.Empty; public string GSTSandboxBaseURL { get; set; } = string.Empty; public string GSTProductionBaseURL { get; set; } = string.Empty; public int GSTEnvironment { get; set; } public string GSTNUserId { get; set; } = string.Empty; // Resolved by AdapterConfigDAL from GSTEnvironment (0 = Sandbox, else Production) — same as // EInvoiceUrl/EWayUrl. GSTCafeAdapter builds every Returns URL from this; the legacy BaseURL field // is never populated by GET_ADAPTER_CONFIG_BY_GSTIN, so Returns calls must use this instead. public string GSTUrl { get; set; } = string.Empty; // Resolved via MADDRESS.STATEID = MSTATE.STATEID off the org unit's registered address — GB4's // GSTHeaderDTO.StateCode, sent as the "state-cd" header on every GST Returns call. Uses // MSTATE.GSTSTATECODE specifically (not MSTATE.STATECODE, a separate non-GST column). public string StateCode { get; set; } = string.Empty; public string PublicSearchURL { get; set; } = string.Empty; public int PublicSearchEnvironment { get; set; } }