Misma info de sim para el /select
This commit is contained in:
@@ -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