{"action":"created","comment":{"url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/comments/202842429","pull_request_review_id":137618031,"id":202842429,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjg0MjQyOQ==","diff_hunk":"@@ -0,0 +1,22 @@\n+package br.stone.mobiletraining.samilasantos.ex02cadastrodocliente.domain\n+\n+import java.util.*\n+\n+data class Entrepreneur(private val fullName: String,\n+                        private val email: String,\n+                        private val phone: Long,\n+                        private val tradeName: String,\n+                        private val birthDate: Date,\n+                        private val individualEntrepreneur: Boolean) {","path":"app/src/main/java/br/stone/mobiletraining/samilasantos/ex02cadastrodocliente/domain/Entrepreneur.kt","position":10,"original_position":10,"commit_id":"8ad99e2bceba95403f83d0b71095a0175b6970e4","original_commit_id":"8ad99e2bceba95403f83d0b71095a0175b6970e4","user":{"login":"SamilaRuane","id":9665211,"node_id":"MDQ6VXNlcjk2NjUyMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/9665211?v=4","gravatar_id":"","url":"https://api.github.com/users/SamilaRuane","html_url":"https://github.com/SamilaRuane","followers_url":"https://api.github.com/users/SamilaRuane/followers","following_url":"https://api.github.com/users/SamilaRuane/following{/other_user}","gists_url":"https://api.github.com/users/SamilaRuane/gists{/gist_id}","starred_url":"https://api.github.com/users/SamilaRuane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamilaRuane/subscriptions","organizations_url":"https://api.github.com/users/SamilaRuane/orgs","repos_url":"https://api.github.com/users/SamilaRuane/repos","events_url":"https://api.github.com/users/SamilaRuane/events{/privacy}","received_events_url":"https://api.github.com/users/SamilaRuane/received_events","type":"User","site_admin":false},"body":"1. Quando criei a classe pensei que estes atributos não seriam utilizados por uma entidade externa uma vez que o objeto fosse criado, mas quando comecei a desenvolver a view percebi que não fazia sentido, pois precisaria consultar os atributos. No final das contas eu tirei o private dos mesmos. Essa mudança será refletida no próximo PR.\r\n2. Deixei estes métodos privados, pois estas validações só complementam o método isValid() que é o método consultado para fazer a validação geral do campos. ","created_at":"2018-07-16T22:18:09Z","updated_at":"2018-07-16T22:18:09Z","html_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes/pull/1#discussion_r202842429","pull_request_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/comments/202842429"},"html":{"href":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes/pull/1#discussion_r202842429"},"pull_request":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1"}},"in_reply_to_id":202836953},"pull_request":{"url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1","id":201470511,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNDcwNTEx","html_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes/pull/1","diff_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes/pull/1.diff","patch_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes/pull/1.patch","issue_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/1","number":1,"state":"open","locked":false,"title":"Feature/domain","user":{"login":"SamilaRuane","id":9665211,"node_id":"MDQ6VXNlcjk2NjUyMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/9665211?v=4","gravatar_id":"","url":"https://api.github.com/users/SamilaRuane","html_url":"https://github.com/SamilaRuane","followers_url":"https://api.github.com/users/SamilaRuane/followers","following_url":"https://api.github.com/users/SamilaRuane/following{/other_user}","gists_url":"https://api.github.com/users/SamilaRuane/gists{/gist_id}","starred_url":"https://api.github.com/users/SamilaRuane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamilaRuane/subscriptions","organizations_url":"https://api.github.com/users/SamilaRuane/orgs","repos_url":"https://api.github.com/users/SamilaRuane/repos","events_url":"https://api.github.com/users/SamilaRuane/events{/privacy}","received_events_url":"https://api.github.com/users/SamilaRuane/received_events","type":"User","site_admin":false},"body":"### :pushpin: Referências\r\n\r\n* **Repositório da Atividade:** [Ex02](https://github.com/stone-payments/mobile-training/blob/master/ex02.md) \r\n\r\n### :cyclone: Mudanças\r\n\r\nEste PR adiciona a lógica do domínio da atividade, a qual abrange os seguintes casos de uso:\r\n*  _CreateEntrepreneur_ -  responsável por criar um novo usuário. Antes da criação é realizada a validação das informações deste checando se todas estas estão preenchidas e se são válidas.\r\n* _DeleteEntrepreneur_ -  responsável por deletar um usuário.\r\n* _GetAllEntrepreneurs_ - responsável por recuperar todos os usuários persistidos.\r\n* _GetCompanyInitials_ - responsável por retornar as iniciais da empresa pertencente a um determinado usuário.\r\n\r\nUm usuário deste app é conhecido como empreendedor (entrepreneur), devido ao contexto da atividade.\r\n\r\nPara interação com os dados persistidos, existe a interface _Repository_ que serve como fronteira entre o domínio e a camada externa de dados, quem implementa esta interface pode retornar exceções as quais devem ser mapeadas nas exceções conhecidas pelo domínio, _UnavailableRepositoryException_ e _RepositoryNotFoundException_. \r\nTambém existe a classe Result, a qual retorna a resposta da operação para a camada externa, que chamou o caso de uso.\r\n\r\nPor fim, foi adicionada uma classe de teste para cada caso de uso. \r\n\r\n### :art: Mudanças de UI\r\n\r\n_Não foram adicionadas mudanças de layout_\r\n\r\n### :memo: Notas\r\n\r\nNA","created_at":"2018-07-14T21:47:31Z","updated_at":"2018-07-16T22:18:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bd35ff771b4694b54adf7266bea7abb83963646","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1/commits","review_comments_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1/comments","review_comment_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/1/comments","statuses_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/statuses/8ad99e2bceba95403f83d0b71095a0175b6970e4","head":{"label":"SamilaRuane:feature/domain","ref":"feature/domain","sha":"8ad99e2bceba95403f83d0b71095a0175b6970e4","user":{"login":"SamilaRuane","id":9665211,"node_id":"MDQ6VXNlcjk2NjUyMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/9665211?v=4","gravatar_id":"","url":"https://api.github.com/users/SamilaRuane","html_url":"https://github.com/SamilaRuane","followers_url":"https://api.github.com/users/SamilaRuane/followers","following_url":"https://api.github.com/users/SamilaRuane/following{/other_user}","gists_url":"https://api.github.com/users/SamilaRuane/gists{/gist_id}","starred_url":"https://api.github.com/users/SamilaRuane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamilaRuane/subscriptions","organizations_url":"https://api.github.com/users/SamilaRuane/orgs","repos_url":"https://api.github.com/users/SamilaRuane/repos","events_url":"https://api.github.com/users/SamilaRuane/events{/privacy}","received_events_url":"https://api.github.com/users/SamilaRuane/received_events","type":"User","site_admin":false},"repo":{"id":140898660,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4OTg2NjA=","name":"Ex02_cadastro_de_clientes","full_name":"SamilaRuane/Ex02_cadastro_de_clientes","owner":{"login":"SamilaRuane","id":9665211,"node_id":"MDQ6VXNlcjk2NjUyMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/9665211?v=4","gravatar_id":"","url":"https://api.github.com/users/SamilaRuane","html_url":"https://github.com/SamilaRuane","followers_url":"https://api.github.com/users/SamilaRuane/followers","following_url":"https://api.github.com/users/SamilaRuane/following{/other_user}","gists_url":"https://api.github.com/users/SamilaRuane/gists{/gist_id}","starred_url":"https://api.github.com/users/SamilaRuane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamilaRuane/subscriptions","organizations_url":"https://api.github.com/users/SamilaRuane/orgs","repos_url":"https://api.github.com/users/SamilaRuane/repos","events_url":"https://api.github.com/users/SamilaRuane/events{/privacy}","received_events_url":"https://api.github.com/users/SamilaRuane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes","description":"App responsável pode exibir uma lista de clientes e informações de sua empresa cadastrada permitindo adição e exclusão de clientes.","fork":false,"url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes","forks_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/forks","keys_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/teams","hooks_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/hooks","issue_events_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/events{/number}","events_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/events","assignees_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/assignees{/user}","branches_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/branches{/branch}","tags_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/tags","blobs_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/statuses/{sha}","languages_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/languages","stargazers_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/stargazers","contributors_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/contributors","subscribers_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/subscribers","subscription_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/subscription","commits_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/contents/{+path}","compare_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/merges","archive_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/downloads","issues_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues{/number}","pulls_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls{/number}","milestones_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/milestones{/number}","notifications_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/labels{/name}","releases_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/releases{/id}","deployments_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/deployments","created_at":"2018-07-13T22:40:42Z","updated_at":"2018-07-13T22:40:45Z","pushed_at":"2018-07-14T21:47:31Z","git_url":"git://github.com/SamilaRuane/Ex02_cadastro_de_clientes.git","ssh_url":"git@github.com:SamilaRuane/Ex02_cadastro_de_clientes.git","clone_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes.git","svn_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes","homepage":null,"size":133,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"SamilaRuane:master","ref":"master","sha":"20e11835caf6f395992f23ea67cdc0d1050872eb","user":{"login":"SamilaRuane","id":9665211,"node_id":"MDQ6VXNlcjk2NjUyMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/9665211?v=4","gravatar_id":"","url":"https://api.github.com/users/SamilaRuane","html_url":"https://github.com/SamilaRuane","followers_url":"https://api.github.com/users/SamilaRuane/followers","following_url":"https://api.github.com/users/SamilaRuane/following{/other_user}","gists_url":"https://api.github.com/users/SamilaRuane/gists{/gist_id}","starred_url":"https://api.github.com/users/SamilaRuane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamilaRuane/subscriptions","organizations_url":"https://api.github.com/users/SamilaRuane/orgs","repos_url":"https://api.github.com/users/SamilaRuane/repos","events_url":"https://api.github.com/users/SamilaRuane/events{/privacy}","received_events_url":"https://api.github.com/users/SamilaRuane/received_events","type":"User","site_admin":false},"repo":{"id":140898660,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4OTg2NjA=","name":"Ex02_cadastro_de_clientes","full_name":"SamilaRuane/Ex02_cadastro_de_clientes","owner":{"login":"SamilaRuane","id":9665211,"node_id":"MDQ6VXNlcjk2NjUyMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/9665211?v=4","gravatar_id":"","url":"https://api.github.com/users/SamilaRuane","html_url":"https://github.com/SamilaRuane","followers_url":"https://api.github.com/users/SamilaRuane/followers","following_url":"https://api.github.com/users/SamilaRuane/following{/other_user}","gists_url":"https://api.github.com/users/SamilaRuane/gists{/gist_id}","starred_url":"https://api.github.com/users/SamilaRuane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamilaRuane/subscriptions","organizations_url":"https://api.github.com/users/SamilaRuane/orgs","repos_url":"https://api.github.com/users/SamilaRuane/repos","events_url":"https://api.github.com/users/SamilaRuane/events{/privacy}","received_events_url":"https://api.github.com/users/SamilaRuane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes","description":"App responsável pode exibir uma lista de clientes e informações de sua empresa cadastrada permitindo adição e exclusão de clientes.","fork":false,"url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes","forks_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/forks","keys_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/teams","hooks_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/hooks","issue_events_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/events{/number}","events_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/events","assignees_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/assignees{/user}","branches_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/branches{/branch}","tags_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/tags","blobs_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/statuses/{sha}","languages_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/languages","stargazers_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/stargazers","contributors_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/contributors","subscribers_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/subscribers","subscription_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/subscription","commits_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/contents/{+path}","compare_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/merges","archive_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/downloads","issues_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues{/number}","pulls_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls{/number}","milestones_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/milestones{/number}","notifications_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/labels{/name}","releases_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/releases{/id}","deployments_url":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/deployments","created_at":"2018-07-13T22:40:42Z","updated_at":"2018-07-13T22:40:45Z","pushed_at":"2018-07-14T21:47:31Z","git_url":"git://github.com/SamilaRuane/Ex02_cadastro_de_clientes.git","ssh_url":"git@github.com:SamilaRuane/Ex02_cadastro_de_clientes.git","clone_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes.git","svn_url":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes","homepage":null,"size":133,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1"},"html":{"href":"https://github.com/SamilaRuane/Ex02_cadastro_de_clientes/pull/1"},"issue":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/1"},"comments":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/SamilaRuane/Ex02_cadastro_de_clientes/statuses/8ad99e2bceba95403f83d0b71095a0175b6970e4"}},"author_association":"OWNER"}}
{"actor":{"display_login":"SamilaRuane"}}