code: func (p *PDNSProvider) mutateRecords(endpoints []*endpoint.Endpoint, changetype pdnsChangeType) error {
  	zonelist, err := p.ConvertEndpointsToZones(endpoints, changetype)
  	if err != nil {
  		return err
  	}
  	for _, zone := range zonelist {
  		jso, err := json.Marshal(zone)
  		if err != nil {
  			log.Errorf("JSON Marshal for zone struct failed!")
  		} else {
  			log.Debugf("Struct for PatchZone:\n%s", string(jso))
  		}
  
  		resp, err := p.client.PatchZone(zone.Id, zone)
  		if err != nil {
  			log.Debugf("PDNS API response: %s", stringifyHTTPResponseBody(resp))
  			return err
  		}
  
  	}
  	return nil
  }
docs: // mutateRecords takes a list of endpoints and creates, replaces or deletes them based on the changetype