CREATE FUNCTION heidelpay_payment_to_text(
  r heidelpay_payment
) RETURNS text
  IMMUTABLE COST 1
  LANGUAGE plpgsql AS
$$
BEGIN
  r.create_timestamp := NULL;
  r.charge_timestamp := NULL;
  r.charge := NULL;
  r.payment_status_timestamp := NULL;
  r.payment_status := NULL;
  RETURN r::text;
END
$$;

ALTER FUNCTION heidelpay_payment_to_text(heidelpay_payment) OWNER TO paymenthub;

CREATE FUNCTION payone_payment_to_text(
  r payone_payment
) RETURNS text
  IMMUTABLE COST 1
  LANGUAGE plpgsql AS
$$
BEGIN
  r.create_timestamp := NULL;
  r.payment := NULL;
  r.response_timestamp := NULL;
  r.response := NULL;
  r.authorize_response := NULL;
  r.notify_timestamp := NULL;
  r.notification := NULL;
  RETURN r::text;
END
$$;

ALTER FUNCTION payone_payment_to_text(payone_payment) OWNER TO paymenthub;

CREATE FUNCTION saferpay_payment_to_text(
  r saferpay_payment
) RETURNS text
  IMMUTABLE COST 1
  LANGUAGE plpgsql AS
$$
BEGIN
  r.init_request_timestamp := NULL;
  r.init_request := NULL;
  r.init_response := NULL;
  r.status_timestamp := NULL;
  r.status := NULL;
  r.capture_timestamp := NULL;
  r.capture := NULL;
  r.capture_id := NULL;
  r.reference_count := NULL;
  RETURN r::text;
END
$$;

ALTER FUNCTION saferpay_payment_to_text(saferpay_payment) OWNER TO paymenthub;

CREATE FUNCTION wirecard_payment_to_text(
  r wirecard_payment
) RETURNS text
  IMMUTABLE COST 1
  LANGUAGE plpgsql AS
$$
BEGIN
  r.redirect_urls := NULL;
  r.register_request_timestamp := NULL;
  r.register_request := NULL;
  r.register_response_timestamp := NULL;
  r.register_response := NULL;
  r.payment_information_timestamp := NULL;
  r.payment_information := NULL;
  RETURN r::text;
END
$$;

ALTER FUNCTION wirecard_payment_to_text(wirecard_payment) OWNER TO paymenthub;

