public static function update($arg_params)
    {
        //validate params
        if(is_array($arg_params)){
            $data = self::getParams($arg_params);
        }else{
            $data = self::getParams(json_decode(json_encode($arg_params), true));
        }
        $url = '/ecommerce/customers';
        if(!empty($data['id'])){
            $url .= '/'.$data['id'];
        }else{
            return null;
        }
        unset($data['id']);

        //submit to api
        $customer_data = APIRequests::request(
            $url,
            APIRequests::METHOD_PUT,
            $data
        );

        //return response
        return self::toObj($customer_data['body']);
    }