AXL updatePhone removes lines

Version 1
    This document was generated from CDN thread

    Created by: Carlo Rodriguez on 20-07-2012 12:47:11 AM
    Hi, I am using the updatePhone command: I'm having trouble updating the phone.
    Whenever I call the updatePhone command to say add a line on the phone's line 2 item, the item on phone line 1 is gone. 
     
    Here is the sample :
     
    $result = $client->updatePhone(array('uuid'=>'83546A90-BE7A-5EC7-850E-FA2D4EFB422C','lines'=>array('line'=>array('index'=>'2','dirn'=>array('pattern'=>'2317')))));
     
    After the phone restarts to reconfigure I end up with just Line 2 and no Line 1 on the phone.
     
     

    Subject: RE: AXL updatePhone removes lines
    Replied by: Mayank Sharma on 20-07-2012 08:06:41 AM
    Hi, I am using the updatePhone command: I'm having trouble updating the phone.
    Whenever I call the updatePhone command to say add a line on the phone's line 2 item, the item on phone line 1 is gone. 
     
    Here is the sample :
     
    $result = $client->updatePhone(array('uuid'=>'83546A90-BE7A-5EC7-850E-FA2D4EFB422C','lines'=>array('line'=>array('index'=>'2','dirn'=>array('pattern'=>'2317')))));
     
    After the phone restarts to reconfigure I end up with just Line 2 and no Line 1 on the phone.
     
     


    If I remember it right, you have to keep a track of all the lines on a phone before adding a new line and re-add them. I know it's a weird way of doing it but that's how it works.

    Subject: RE: AXL updatePhone removes lines
    Replied by: Enda McManemy on 20-07-2012 08:16:04 AM


    Hi, I am using the updatePhone command: I'm having trouble updating the phone.
    Whenever I call the updatePhone command to say add a line on the phone's line 2 item, the item on phone line 1 is gone. 
     
    Here is the sample :
     
    $result = $client->updatePhone(array('uuid'=>'83546A90-BE7A-5EC7-850E-FA2D4EFB422C','lines'=>array('line'=>array('index'=>'2','dirn'=>array('pattern'=>'2317')))));
     
    After the phone restarts to reconfigure I end up with just Line 2 and no Line 1 on the phone.
     
     



    If I remember it right, you have to keep a track of all the lines on a phone before adding a new line and re-add them. I know it's a weird way of doing it but that's how it works.

     
    I believe yoi are right.
     
    An update expects all the lines on the phone otherwise it overwrites what is currently there with what is contained in the request.
    This is an extremely strange way of doing an update as in my mind only the items that are provided should be updated.