Class InetMacApiClient

java.lang.Object
org.bgerp.plugin.bgb.getolt.dao.InetMacApiClient

public class InetMacApiClient extends Object
HTTP client for BGBilling InetMac WebService API. Handles MAC address updates and session drops via JSON-RPC.
  • Constructor Details

    • InetMacApiClient

      public InetMacApiClient(BillingConfig config)
  • Method Details

    • getServicesByContractId

      public List<InetService> getServicesByContractId(int contractId)
      Get all internet services for a contract.
      Parameters:
      contractId - contract ID (cid)
      Returns:
      list of services
    • updateMacByContractId

      public MacUpdateResult updateMacByContractId(int contractId, String newMac)
      Update MAC address for contract (auto-selects service if only one exists).
      Parameters:
      contractId - contract ID (cid)
      newMac - new MAC address
      Returns:
      update result
    • updateMacAddress

      public MacUpdateResult updateMacAddress(int serviceId, String newMac)
      Update MAC address for specific service.
      Parameters:
      serviceId - service ID
      newMac - new MAC address
      Returns:
      update result
    • updateMacAddress

      public MacUpdateResult updateMacAddress(int serviceId, String newMac, String oldMac)
      Update MAC address for specific service.
      Parameters:
      serviceId - service ID
      newMac - new MAC address
      oldMac - previous MAC address (optional, for logging)
      Returns:
      update result
    • dropSession

      public SessionDropResult dropSession(int serviceId)
      Drop session for service.
      Parameters:
      serviceId - service ID
      Returns:
      drop result