code: def update(self,identity,params=None, headers=None):
          
          path = self._sub_url_params('/payments/:identity', {
            
              'identity': identity,
            })
          
          if params is not None:
              params = {self._envelope_key(): params}
  
          response = self._perform_request('PUT', path, params, headers,
                                           retry_failures=True)
          return self._resource_for(response)
docs: Update a payment.
  
          Updates a payment object. This accepts only the metadata parameter.
  
          Args:
                identity (string): Unique identifier, beginning with "PM".
                params (dict, optional): Request body.
  
          Returns:
                ListResponse of Payment instances