{"action":"created","issue":{"url":"https://api.github.com/repos/remondis-it/remap/issues/48","repository_url":"https://api.github.com/repos/remondis-it/remap","labels_url":"https://api.github.com/repos/remondis-it/remap/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/remondis-it/remap/issues/48/comments","events_url":"https://api.github.com/repos/remondis-it/remap/issues/48/events","html_url":"https://github.com/remondis-it/remap/issues/48","id":317287999,"number":48,"title":"Suggestion : custom map function","user":{"login":"mmaryo","id":1669985,"avatar_url":"https://avatars3.githubusercontent.com/u/1669985?v=4","gravatar_id":"","url":"https://api.github.com/users/mmaryo","html_url":"https://github.com/mmaryo","followers_url":"https://api.github.com/users/mmaryo/followers","following_url":"https://api.github.com/users/mmaryo/following{/other_user}","gists_url":"https://api.github.com/users/mmaryo/gists{/gist_id}","starred_url":"https://api.github.com/users/mmaryo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmaryo/subscriptions","organizations_url":"https://api.github.com/users/mmaryo/orgs","repos_url":"https://api.github.com/users/mmaryo/repos","events_url":"https://api.github.com/users/mmaryo/events{/privacy}","received_events_url":"https://api.github.com/users/mmaryo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-24T15:49:19Z","updated_at":"2018-04-25T17:02:19Z","closed_at":"2018-04-25T17:02:19Z","author_association":"NONE","body":"Hello\r\n\r\nSometime mapping cannot be do, so why not enable a custom mapping like this\r\n\r\n\r\n    Mapper<AccountEntity, SfAccount> mapperToSf =\r\n            Mapping.from(AccountEntity.class)\r\n                    .to(SfAccount.class)\r\n                    .map((source, destination) -> {\r\n                      if (source.getBillingAddress() != null) {\r\n                          destination.setBillingStreet(source.getBillingAddress().getStreet());\r\n                          destination.setBillingCity(source.getBillingAddress().getCity());\r\n                          destination.setBillingPostalCode(source.getBillingAddress().getZip());\r\n                          destination.setBillingState(source.getBillingAddress().getState());\r\n                          destination.setBillingCountry(source.getBillingAddress().getCountry());\r\n                          if (source.getBillingAddress().getLocation() != null) {\r\n                              destination.setBillingLatitude(source.getBillingAddress().getLocation()[0]);\r\n                              destination.setBillingLongitude(source.getBillingAddress().getLocation()[1]);\r\n                          }\r\n                      }\r\n                    })\r\n                    .omitInSource(AccountEntity::getBillingAddress)\r\n                    .omitInDestination(SfAccount::getBillingStreet)\r\n                    .omitInDestination(SfAccount::getBillingCity)\r\n                    .omitInDestination(SfAccount::getBillingPostalCode)\r\n                    .omitInDestination(SfAccount::getBillingState)\r\n                    .omitInDestination(SfAccount::getBillingCountry)\r\n                    .omitInDestination(SfAccount::getBillingLatitude)\r\n                    .omitInDestination(SfAccount::getBillingLongitude)\r\n                    .mapper();\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/remondis-it/remap/issues/comments/384360469","html_url":"https://github.com/remondis-it/remap/issues/48#issuecomment-384360469","issue_url":"https://api.github.com/repos/remondis-it/remap/issues/48","id":384360469,"user":{"login":"schuettec","id":14310082,"avatar_url":"https://avatars0.githubusercontent.com/u/14310082?v=4","gravatar_id":"","url":"https://api.github.com/users/schuettec","html_url":"https://github.com/schuettec","followers_url":"https://api.github.com/users/schuettec/followers","following_url":"https://api.github.com/users/schuettec/following{/other_user}","gists_url":"https://api.github.com/users/schuettec/gists{/gist_id}","starred_url":"https://api.github.com/users/schuettec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schuettec/subscriptions","organizations_url":"https://api.github.com/users/schuettec/orgs","repos_url":"https://api.github.com/users/schuettec/repos","events_url":"https://api.github.com/users/schuettec/events{/privacy}","received_events_url":"https://api.github.com/users/schuettec/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T17:02:19Z","updated_at":"2018-04-25T17:02:19Z","author_association":"CONTRIBUTOR","body":"You're welcome!"}}
{"actor":{"display_login":"schuettec"}}