private def findBrazeId()

in src/main/scala/payment_failure_comms/Handler.scala [83:93]


  private def findBrazeId(idapiConfig: IdapiConfig, logger: LambdaLogger)(
      record: PaymentFailureRecord
  ): Option[String] =
    record.Contact__r.IdentityID__c match {
      case Some(identityId) =>
        IdapiConnector.getBrazeId(idapiConfig, logger)(identityId) match {
          case Left(_)        => None
          case Right(brazeId) => Some(brazeId)
        }
      case None => Some(record.Contact__c)
    }