mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-12-03 09:08:46 +00:00
feat: Add analytics, security, and currency SDK modules with comprehensive API endpoints across Elixir and Go SDKs
- Add AnalyticsAPI with churn prediction (predict, metrics, at-risk), market analytics (metrics, competitors, opportunities), predictive maintenance (metrics, assets, alerts, predict), and pricing optimization (metrics, optimize, elasticity) endpoints - Add SecurityAPI with fraud detection (analyze, alerts, update status, metrics, patterns) and SIM swap protection (verify, history) endpoints - Add CurrencyAPI with currency conversion (convert, exchange rates, rate
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
module TelecomSDK
|
||||
class SecurityAPI
|
||||
def initialize(http_client)
|
||||
@http_client = http_client
|
||||
end
|
||||
|
||||
# Fraud Detection
|
||||
|
||||
def analyze_transaction(transaction)
|
||||
@http_client.post("/api/v1/security/fraud/analyze", transaction)
|
||||
end
|
||||
|
||||
def get_fraud_alerts(filter: nil)
|
||||
payload = filter&.compact || {}
|
||||
@http_client.post("/api/v1/security/fraud/alerts", payload)
|
||||
end
|
||||
|
||||
def update_alert_status(alert_id:, status:, actions: [])
|
||||
@http_client.put("/api/v1/security/fraud/alerts/#{alert_id}", {
|
||||
status: status,
|
||||
actions: actions
|
||||
})
|
||||
end
|
||||
|
||||
def get_fraud_metrics(period: "monthly")
|
||||
@http_client.get("/api/v1/security/fraud/metrics", { period: period })
|
||||
end
|
||||
|
||||
def get_fraud_patterns
|
||||
@http_client.get("/api/v1/security/fraud/patterns")
|
||||
end
|
||||
|
||||
# SIM Swap Protection
|
||||
|
||||
def verify_sim_swap(profile_id:, msisdn:)
|
||||
@http_client.post("/api/v1/security/simswap/verify", {
|
||||
profile_id: profile_id,
|
||||
msisdn: msisdn
|
||||
})
|
||||
end
|
||||
|
||||
def get_sim_swap_history(profile_id)
|
||||
@http_client.get("/api/v1/security/simswap/history/#{profile_id}")
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user