Manage 4G sim card

Pre-requisite: The user has to be signed in to perform the following operations.


Get 4G data remaining and total data

To get the 4G data remaining and total data, the following method can be called.

InstaVision.spaceServices.getCellularData(
  spaceId = "spaceId",
  onSuccess = { cellularData ->
    // The cellularData object contains the 4G data remaining and total data
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)

Get SIM card operator based on provider id

To get the SIM card operator based on provider id, the following method can be called.

InstaVision.spaceServices.getOperators(
  spaceId = "spaceId",
  providerId = "providerId",
  iccid = "iccid",
  onSuccess = { operators ->
    // The list of operators is returned
  },
  onError = { error ->
    // The error object contains the error code and message
  }
)

Get data recharge details

To get the data recharge details, the following method can be called.

  • purchaseType - (optional) The type of purchase. Possible values are “Recurring”, “ManualTopUp”, “AutoTopUp”.
  • purchaseId - (optional) The unique identifier of the purchase.
    InstaVision.spaceServices.getDataPass(
    spaceId = "spaceId",
    purchaseType = "purchaseType",
    purchaseId = "purchaseId",
    onSuccess = { dataPasses ->
      // The list of data passes is returned
    },
    onError = { error ->
      // The error object contains the error code and message
    }
    )
    

This site uses Just the Docs, a documentation theme for Jekyll.