def updateEventConsent()

in eventbrite-consents/src/main/scala/com/gu/identity/eventbriteconsents/clients/IdentityClient.scala [14:26]


  def updateEventConsent(emailAddress: String): Unit = {
    val result = Http(s"$idapiUrl/consent-email")
      .headers(
        "X-GU-ID-Client-Access-Token" -> s"Bearer $idapiAccessToken",
        "Content-type" -> "application/json"
      )
      .postData(IdapiConsentUpdate(emailAddress, Vector("events")).asJson.noSpaces)
      .asString

    if (result.code != 200) {
      handleErrorResponse(result.code, result.body, emailAddress)
    }
  }