{"action":"opened","number":56,"pull_request":{"url":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/56","id":67317203,"html_url":"https://github.com/shore-gmbh/payment-connector/pull/56","diff_url":"https://github.com/shore-gmbh/payment-connector/pull/56.diff","patch_url":"https://github.com/shore-gmbh/payment-connector/pull/56.patch","issue_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/56","number":56,"state":"open","locked":false,"title":"F [#PS-122] remove nil values when converting legal_entity to hash","user":{"login":"sadtuna","id":4567,"avatar_url":"https://avatars.githubusercontent.com/u/4567?v=3","gravatar_id":"","url":"https://api.github.com/users/sadtuna","html_url":"https://github.com/sadtuna","followers_url":"https://api.github.com/users/sadtuna/followers","following_url":"https://api.github.com/users/sadtuna/following{/other_user}","gists_url":"https://api.github.com/users/sadtuna/gists{/gist_id}","starred_url":"https://api.github.com/users/sadtuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadtuna/subscriptions","organizations_url":"https://api.github.com/users/sadtuna/orgs","repos_url":"https://api.github.com/users/sadtuna/repos","events_url":"https://api.github.com/users/sadtuna/events{/privacy}","received_events_url":"https://api.github.com/users/sadtuna/received_events","type":"User","site_admin":false},"body":"An attempt to fix bug: https://shore.myjetbrains.com/youtrack/issue/PS-122 (every environment).\r\n\r\nThe reason for this bug: in core BO when we get a merchant's legal_entity object from payment-service, we get the object with all attributes, even with ones without value (nil). After updating some attributes, we send back this whole object to the payment-service (and stripe), where this empty, nil (and untouched) fields are interpreted as 'attribute deleting request'.\r\n\r\nIn an attempt to fix this unexpected behaviour, I remove all nil and empty hash values before I send back the legal_entity object. If we'd like to delete an attribute we would set it to empty string anyway (and not nil).","created_at":"2016-04-21T08:47:40Z","updated_at":"2016-04-21T08:47:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/56/commits","review_comments_url":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/56/comments","review_comment_url":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/56/comments","statuses_url":"https://api.github.com/repos/shore-gmbh/payment-connector/statuses/74aedbfb52d3c57f5ee5064d859aabe590306f22","head":{"label":"shore-gmbh:bug/PS-122-unchanged_fields_gets_submitted","ref":"bug/PS-122-unchanged_fields_gets_submitted","sha":"74aedbfb52d3c57f5ee5064d859aabe590306f22","user":{"login":"shore-gmbh","id":1564288,"avatar_url":"https://avatars.githubusercontent.com/u/1564288?v=3","gravatar_id":"","url":"https://api.github.com/users/shore-gmbh","html_url":"https://github.com/shore-gmbh","followers_url":"https://api.github.com/users/shore-gmbh/followers","following_url":"https://api.github.com/users/shore-gmbh/following{/other_user}","gists_url":"https://api.github.com/users/shore-gmbh/gists{/gist_id}","starred_url":"https://api.github.com/users/shore-gmbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shore-gmbh/subscriptions","organizations_url":"https://api.github.com/users/shore-gmbh/orgs","repos_url":"https://api.github.com/users/shore-gmbh/repos","events_url":"https://api.github.com/users/shore-gmbh/events{/privacy}","received_events_url":"https://api.github.com/users/shore-gmbh/received_events","type":"Organization","site_admin":false},"repo":{"id":50936344,"name":"payment-connector","full_name":"shore-gmbh/payment-connector","owner":{"login":"shore-gmbh","id":1564288,"avatar_url":"https://avatars.githubusercontent.com/u/1564288?v=3","gravatar_id":"","url":"https://api.github.com/users/shore-gmbh","html_url":"https://github.com/shore-gmbh","followers_url":"https://api.github.com/users/shore-gmbh/followers","following_url":"https://api.github.com/users/shore-gmbh/following{/other_user}","gists_url":"https://api.github.com/users/shore-gmbh/gists{/gist_id}","starred_url":"https://api.github.com/users/shore-gmbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shore-gmbh/subscriptions","organizations_url":"https://api.github.com/users/shore-gmbh/orgs","repos_url":"https://api.github.com/users/shore-gmbh/repos","events_url":"https://api.github.com/users/shore-gmbh/events{/privacy}","received_events_url":"https://api.github.com/users/shore-gmbh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shore-gmbh/payment-connector","description":"Connector for Shore's Payment Service","fork":false,"url":"https://api.github.com/repos/shore-gmbh/payment-connector","forks_url":"https://api.github.com/repos/shore-gmbh/payment-connector/forks","keys_url":"https://api.github.com/repos/shore-gmbh/payment-connector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shore-gmbh/payment-connector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shore-gmbh/payment-connector/teams","hooks_url":"https://api.github.com/repos/shore-gmbh/payment-connector/hooks","issue_events_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/events{/number}","events_url":"https://api.github.com/repos/shore-gmbh/payment-connector/events","assignees_url":"https://api.github.com/repos/shore-gmbh/payment-connector/assignees{/user}","branches_url":"https://api.github.com/repos/shore-gmbh/payment-connector/branches{/branch}","tags_url":"https://api.github.com/repos/shore-gmbh/payment-connector/tags","blobs_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/refs{/sha}","trees_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shore-gmbh/payment-connector/statuses/{sha}","languages_url":"https://api.github.com/repos/shore-gmbh/payment-connector/languages","stargazers_url":"https://api.github.com/repos/shore-gmbh/payment-connector/stargazers","contributors_url":"https://api.github.com/repos/shore-gmbh/payment-connector/contributors","subscribers_url":"https://api.github.com/repos/shore-gmbh/payment-connector/subscribers","subscription_url":"https://api.github.com/repos/shore-gmbh/payment-connector/subscription","commits_url":"https://api.github.com/repos/shore-gmbh/payment-connector/commits{/sha}","git_commits_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/commits{/sha}","comments_url":"https://api.github.com/repos/shore-gmbh/payment-connector/comments{/number}","issue_comment_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/comments{/number}","contents_url":"https://api.github.com/repos/shore-gmbh/payment-connector/contents/{+path}","compare_url":"https://api.github.com/repos/shore-gmbh/payment-connector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shore-gmbh/payment-connector/merges","archive_url":"https://api.github.com/repos/shore-gmbh/payment-connector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shore-gmbh/payment-connector/downloads","issues_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues{/number}","pulls_url":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls{/number}","milestones_url":"https://api.github.com/repos/shore-gmbh/payment-connector/milestones{/number}","notifications_url":"https://api.github.com/repos/shore-gmbh/payment-connector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shore-gmbh/payment-connector/labels{/name}","releases_url":"https://api.github.com/repos/shore-gmbh/payment-connector/releases{/id}","deployments_url":"https://api.github.com/repos/shore-gmbh/payment-connector/deployments","created_at":"2016-02-02T16:57:33Z","updated_at":"2016-02-24T13:19:36Z","pushed_at":"2016-04-21T08:18:13Z","git_url":"git://github.com/shore-gmbh/payment-connector.git","ssh_url":"git@github.com:shore-gmbh/payment-connector.git","clone_url":"https://github.com/shore-gmbh/payment-connector.git","svn_url":"https://github.com/shore-gmbh/payment-connector","homepage":"","size":117,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"shore-gmbh:master","ref":"master","sha":"ac0da3138ccf009f44cc73d4ebc0fa02302e1833","user":{"login":"shore-gmbh","id":1564288,"avatar_url":"https://avatars.githubusercontent.com/u/1564288?v=3","gravatar_id":"","url":"https://api.github.com/users/shore-gmbh","html_url":"https://github.com/shore-gmbh","followers_url":"https://api.github.com/users/shore-gmbh/followers","following_url":"https://api.github.com/users/shore-gmbh/following{/other_user}","gists_url":"https://api.github.com/users/shore-gmbh/gists{/gist_id}","starred_url":"https://api.github.com/users/shore-gmbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shore-gmbh/subscriptions","organizations_url":"https://api.github.com/users/shore-gmbh/orgs","repos_url":"https://api.github.com/users/shore-gmbh/repos","events_url":"https://api.github.com/users/shore-gmbh/events{/privacy}","received_events_url":"https://api.github.com/users/shore-gmbh/received_events","type":"Organization","site_admin":false},"repo":{"id":50936344,"name":"payment-connector","full_name":"shore-gmbh/payment-connector","owner":{"login":"shore-gmbh","id":1564288,"avatar_url":"https://avatars.githubusercontent.com/u/1564288?v=3","gravatar_id":"","url":"https://api.github.com/users/shore-gmbh","html_url":"https://github.com/shore-gmbh","followers_url":"https://api.github.com/users/shore-gmbh/followers","following_url":"https://api.github.com/users/shore-gmbh/following{/other_user}","gists_url":"https://api.github.com/users/shore-gmbh/gists{/gist_id}","starred_url":"https://api.github.com/users/shore-gmbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shore-gmbh/subscriptions","organizations_url":"https://api.github.com/users/shore-gmbh/orgs","repos_url":"https://api.github.com/users/shore-gmbh/repos","events_url":"https://api.github.com/users/shore-gmbh/events{/privacy}","received_events_url":"https://api.github.com/users/shore-gmbh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shore-gmbh/payment-connector","description":"Connector for Shore's Payment Service","fork":false,"url":"https://api.github.com/repos/shore-gmbh/payment-connector","forks_url":"https://api.github.com/repos/shore-gmbh/payment-connector/forks","keys_url":"https://api.github.com/repos/shore-gmbh/payment-connector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shore-gmbh/payment-connector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shore-gmbh/payment-connector/teams","hooks_url":"https://api.github.com/repos/shore-gmbh/payment-connector/hooks","issue_events_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/events{/number}","events_url":"https://api.github.com/repos/shore-gmbh/payment-connector/events","assignees_url":"https://api.github.com/repos/shore-gmbh/payment-connector/assignees{/user}","branches_url":"https://api.github.com/repos/shore-gmbh/payment-connector/branches{/branch}","tags_url":"https://api.github.com/repos/shore-gmbh/payment-connector/tags","blobs_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/refs{/sha}","trees_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shore-gmbh/payment-connector/statuses/{sha}","languages_url":"https://api.github.com/repos/shore-gmbh/payment-connector/languages","stargazers_url":"https://api.github.com/repos/shore-gmbh/payment-connector/stargazers","contributors_url":"https://api.github.com/repos/shore-gmbh/payment-connector/contributors","subscribers_url":"https://api.github.com/repos/shore-gmbh/payment-connector/subscribers","subscription_url":"https://api.github.com/repos/shore-gmbh/payment-connector/subscription","commits_url":"https://api.github.com/repos/shore-gmbh/payment-connector/commits{/sha}","git_commits_url":"https://api.github.com/repos/shore-gmbh/payment-connector/git/commits{/sha}","comments_url":"https://api.github.com/repos/shore-gmbh/payment-connector/comments{/number}","issue_comment_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/comments{/number}","contents_url":"https://api.github.com/repos/shore-gmbh/payment-connector/contents/{+path}","compare_url":"https://api.github.com/repos/shore-gmbh/payment-connector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shore-gmbh/payment-connector/merges","archive_url":"https://api.github.com/repos/shore-gmbh/payment-connector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shore-gmbh/payment-connector/downloads","issues_url":"https://api.github.com/repos/shore-gmbh/payment-connector/issues{/number}","pulls_url":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls{/number}","milestones_url":"https://api.github.com/repos/shore-gmbh/payment-connector/milestones{/number}","notifications_url":"https://api.github.com/repos/shore-gmbh/payment-connector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shore-gmbh/payment-connector/labels{/name}","releases_url":"https://api.github.com/repos/shore-gmbh/payment-connector/releases{/id}","deployments_url":"https://api.github.com/repos/shore-gmbh/payment-connector/deployments","created_at":"2016-02-02T16:57:33Z","updated_at":"2016-02-24T13:19:36Z","pushed_at":"2016-04-21T08:18:13Z","git_url":"git://github.com/shore-gmbh/payment-connector.git","ssh_url":"git@github.com:shore-gmbh/payment-connector.git","clone_url":"https://github.com/shore-gmbh/payment-connector.git","svn_url":"https://github.com/shore-gmbh/payment-connector","homepage":"","size":117,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/56"},"html":{"href":"https://github.com/shore-gmbh/payment-connector/pull/56"},"issue":{"href":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/56"},"comments":{"href":"https://api.github.com/repos/shore-gmbh/payment-connector/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shore-gmbh/payment-connector/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/shore-gmbh/payment-connector/statuses/74aedbfb52d3c57f5ee5064d859aabe590306f22"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":97,"deletions":2,"changed_files":2}}