Misma info de sim para el /select
This commit is contained in:
@@ -82,7 +82,7 @@ export type ObjeniousLine = {
|
||||
activationDate: string | null, //"2026-03-17T11:04:11.408+00:00",
|
||||
commercialStatus: string, //"test",
|
||||
commercialStatusDate: string, //"2026-03-17T11:41:01.493+00:00",
|
||||
networkStatus: string, // "ACTIVATED",
|
||||
networkStatus: "ACTIVATED" | "SUSPENDED" | "CANCELED" | "BARRED", // "ACTIVATED",
|
||||
billingStatus: "ACTIVATED" | "SUSPENDED" | "CANCELED" | "TEST",
|
||||
billingStatusChangeDate: string | null, // "2026-03-17T11:01:00.276+00:00",
|
||||
billingActivationDate: string | null //,
|
||||
|
||||
@@ -14,6 +14,33 @@ export class ObjeniousOperationsRepository implements IOperationsRepository {
|
||||
) {
|
||||
}
|
||||
|
||||
public async getLineByIccid(iccid: string): Promise<Result<string, ObjeniousLine[]>> {
|
||||
const path = "/lines"
|
||||
const params = new URLSearchParams([
|
||||
["identifier.identifierType", "ICCID"],
|
||||
["identifier.identifiers", iccid]
|
||||
])
|
||||
|
||||
const req = this.http.client.get<ObjeniousLineResponse>(path, {
|
||||
params: params
|
||||
})
|
||||
|
||||
const res = await tryCatch(req)
|
||||
|
||||
if (res.error != undefined) {
|
||||
return {
|
||||
error: res.error?.message
|
||||
}
|
||||
}
|
||||
|
||||
const lines = res.data.data.content
|
||||
|
||||
return {
|
||||
data: lines
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Consulta el estado de una o mas lineas directamente a la API de Objenious
|
||||
* TODO: No hay paginacion como en getLinesByStatusAPI
|
||||
|
||||
Reference in New Issue
Block a user