class PersistableOptinMapper implements Mapper<PersistableOptin, Optin> {


  @Override
  public Optin convert(PersistableOptin source, MerchantStore store, Language language) {<FILL_FUNCTION_BODY>}

  @Override
  public Optin merge(PersistableOptin source, Optin destination, MerchantStore store,
                     Language language) {
    return destination;
  }
}

    Optin optinEntity = new Optin();
    optinEntity.setCode(source.getCode());
    optinEntity.setDescription(source.getDescription());
    optinEntity.setOptinType(OptinType.valueOf(source.getOptinType()));
    optinEntity.setMerchant(store);
    return optinEntity;
  
<no_super_class>