public CustomerPurposesTransform mapToIntermediary(CustomerEventWebhook…
Private research annotation
Sign in to add a private research label or note.
- User
public CustomerPurposesTransform mapToIntermediary(CustomerEventWebhook customerEventWebhook) { return CustomerPurposesTransform.builder() .email_cnst_pret(checkPurposeValue(customerEventWebhook, "offrescom-zaZGdL8E", "bVtDGhPy", "NdmTLDaP")) .email_cnst_ana(checkPurposeValue(customerEventWebhook, "offrespro-TYTQar26", "NhzTBLEf", "87tBpAF3")) .sms_cnst_pret(checkPurposeValue(customerEventWebhook, "offrescom-zaZGdL8E", "bVtDGhPy", "FfkLh9EE")) .sms_cnst_ana(checkPurposeValue(customerEventWebhook, "offrespro-TYTQar26", "Da4kWhea", "TXtiJAdt")) .courrier_cnst_oppo(checkPurposeValue(customerEventWebhook, "offresdu-8a63TFJe", "xWTxApWx", "EjjMq9mK")) .courrier_cnst_oppo(checkPurposeValue(customerEventWebhook, "offresdu-8a63TFJe", "xWTxApWx", "3tUfqWAF")) .build(); }
codeprivate static boolean checkPurposeValue(CustomerEventWebhook customerEventWebhook, String purposeId, String valueKey, String expectedValue) { return customerEventWebhook.parameters().entity().consents().purposes().stream() .filter(purpose -> purposeId.equals(purpose.id())) .findFirst() .map(purpose -> purpose.values().get(valueKey)) .map(value -> expectedValue.equals(value.value())) .orElse(false); } ajoutes des commentaires en anglais pour ces deux methodes Assistant
- User
public TopRelEmailing topRelEmailing(CustomerPurposesTransform customerPurposesTransform) { var ep = customerPurposesTransform.email_cnst_pret(); var ea = customerPurposesTransform.email_cnst_ana(); var sp = customerPurposesTransform.sms_cnst_pret(); var sa = customerPurposesTransform.sms_cnst_ana();
codeif (ep && ea && sp && sa) return TopRelEmailing.O; if ((ep && ea && !sp && sa) || (!ep && ea && sp && sa) || (!ep && ea && !sp && sa) || (!ep && !ea && !sp && !sa)) { return TopRelEmailing.N; } return TopRelEmailing.D; } public String optinMailTop(CustomerPurposesTransform customerPurposesTransform) { return (customerPurposesTransform.courrier_cnst_oppo() && customerPurposesTransform.as_cnst_oppo()) ? "0" : "3"; } ajoutes des commentaires en anglais pour ces deux methodes Assistant
java- User
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.