Register an organization.
env: The contract environment.caller: The address of the organization registering itself.org_type: The type of the organization (e.g., OEM, MRO, etc.).Ok(()) if the registration is successful.Err(Error::AlreadyRegistered) if the organization is already registered.fn register_org(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
org_type: OrgType,
) -> Result<(), soroban_sdk::Error>
Activate or deactivate the organization.
env: The contract environment.caller: The address of the organization changing its status.active: A boolean indicating whether to activate (true) or deactivate (false) the organization.Ok(()) if the status change is successful.Err(Error::NotRegistered) if the organization is not registered.fn set_active(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
active: bool,
) -> Result<(), soroban_sdk::Error>
Check if an organization is active.
env: The contract environment.addr: The address of the organization to check.bool: true if the organization is active, false otherwise.Option<OrgType>: The type of the organization if registered, None otherwise.fn is_active(env: soroban_sdk::Env, addr: soroban_sdk::Address) -> bool
Get the type of an organization.
env: The contract environment.addr: The address of the organization to check.Option<OrgType>: The type of the organization if registered, None otherwise.fn get_org_type(env: soroban_sdk::Env, addr: soroban_sdk::Address) -> Option