Files
nutcas3 ea20dfb302 docs: Add Ruby SDK README with comprehensive API documentation and implement modular architecture with HTTParty integration
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Refactor TelecomSDK::Client to use modular API clients (SubscriberAPI, UsageAPI, PaymentAPI, RatingPlanAPI, SystemAPI, GraphQLAPI)
- Add AuthProvider class with API key and JWT token support (generate_jwt_token, validate_jwt_token methods)
- Add HTTPClient base class with retry
2026-04-25 04:57:00 +03:00

39 lines
814 B
Ruby

module TelecomSDK
# API for subscriber management
class SubscriberAPI
def initialize(client)
@client = client
end
def get(id)
@client.get("/v1/subscribers/#{id}")
end
def list(page: 1, page_size: 50, status: nil)
params = { page: page, page_size: page_size }
params[:status] = status if status
@client.get("/v1/subscribers", params)
end
def create(request)
@client.post("/v1/subscribers", request)
end
def update(id, request)
@client.put("/v1/subscribers/#{id}", request)
end
def delete(id)
@client.delete("/v1/subscribers/#{id}")
end
def suspend(id)
@client.post("/v1/subscribers/#{id}/suspend")
end
def activate(id)
@client.post("/v1/subscribers/#{id}/activate")
end
end
end