emnify.modules.sim.manager

Classes

SimManager

Provides methods for interacting with SIM cards using the EMnify API.

Module Contents

class emnify.modules.sim.manager.SimManager(client)

Provides methods for interacting with SIM cards using the EMnify API.

Args:

client: An instance of the EMnify class used for making API requests.

client
property get_sim_list_model
property get_sim_update_model
property get_sim_filter_model
property get_sim_sort_enum
get_sim_list(without_device: bool = None, filter_model: emnify.modules.sim.models.SimFilter = None, sort_enum: emnify.constants.SimSort = None) Generator[emnify.modules.sim.models.SimList, None, None]

Retrieves an iterable list of SIM`s.

Parameters:
  • without_device – Allows to add a filter for request to find all SIM`s without device

  • filter_model – Model for request`s filtering

  • sort_enum – Model for request`s sorting

retrieve_sim(sim_id: int)

Retrieves details of single SIM by ID.

Parameters:

sim_id – id of sim to retrieve

register_sim(bic: str) List[emnify.modules.sim.models.SimList] | emnify.modules.sim.models.SimList

Registers SIM/batch SIMs.

Parameters:

bic – BIC number of SIM/batch SIMs for registration.

update_sim(sim_id: int, sim: emnify.modules.sim.models.SimUpdate) bool

Updates SIM.

Parameters:
  • sim_id – int of sim to update

  • sim – filled sim update model

activate_sim(sim_id: int)

Activates suspended or issued SIM. If you want to control both the device and SIM as a whole, it’s recommended to use the DeviceManager.change_status method if the SIM is assigned to a device. Learn more about SIM Lifecycle: https://docs.emnify.com/services/sim-lifecycle-management

Parameters:

sim_id – int of sim to update

suspend_sim(sim_id: int)

Puts the active SIM to suspended state. If you want to control both the device and SIM as a whole, it’s recommended to use the DeviceManager.change_status method if the SIM is assigned to a device. Learn more about SIM Lifecycle: https://docs.emnify.com/services/sim-lifecycle-management

Parameters:

sim_id – id of sim to update

static __transform_sim_filter_params(filter_model: emnify.modules.sim.models.SimFilter = None, sort_enum: emnify.constants.SimSort = None, without_device: bool = None) dict