{"action":"created","comment":{"url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/comments/200945466","pull_request_review_id":135349761,"id":200945466,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDk0NTQ2Ng==","diff_hunk":"@@ -0,0 +1,48 @@\n+module PayBoutique\n+  module Parametrizable\n+    def initialize(params)\n+      @params = params\n+\n+      filter_params\n+      verify_params\n+\n+      __setobj__ @params\n+    end\n+\n+    Config::CONFIGS.each do |attribute|\n+      define_method attribute do\n+        instance_variable_get(\"@#{attribute}\") || PayBoutique.configuration.send(attribute)\n+      end\n+    end\n+\n+    def postback_url\n+      @postback_url || PayBoutique.configuration.send(\"#{payment_method}_postback_url\") ||\n+        PayBoutique.configuration.postback_url\n+    end\n+\n+    private\n+\n+    def time\n+      @time ||= Time.now.utc.strftime('%Y%m%dT%H%M%S+00')\n+    end\n+\n+    def verify_params\n+      missed_params = self.class.required_params - (existing_params & self.class.required_params)\n+\n+      if missed_params.any?\n+        missed_params = missed_params.map{|param| \":#{param}\"}.join(', ')\n+        raise ArgumentError, \"wrong arguments, missed: #{missed_params}\"\n+      end\n+    end\n+\n+    def filter_params\n+      @params.to_h.each_key do |field|\n+        @params.delete_field field if !self.class.params.include?(field) && @params[field]\n+      end\n+    end\n+\n+    def existing_params\n+      @existing_params ||= @params.to_h.keys.compact + Config::CONFIGS.reject{ |config| send(config).nil? }","path":"lib/pay_boutique/parametrizable.rb","position":45,"original_position":45,"commit_id":"27aaa24aa3b6a84165c78ededfe6d58478b6a8eb","original_commit_id":"27aaa24aa3b6a84165c78ededfe6d58478b6a8eb","user":{"login":"kssmilik","id":1006938,"node_id":"MDQ6VXNlcjEwMDY5Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1006938?v=4","gravatar_id":"","url":"https://api.github.com/users/kssmilik","html_url":"https://github.com/kssmilik","followers_url":"https://api.github.com/users/kssmilik/followers","following_url":"https://api.github.com/users/kssmilik/following{/other_user}","gists_url":"https://api.github.com/users/kssmilik/gists{/gist_id}","starred_url":"https://api.github.com/users/kssmilik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kssmilik/subscriptions","organizations_url":"https://api.github.com/users/kssmilik/orgs","repos_url":"https://api.github.com/users/kssmilik/repos","events_url":"https://api.github.com/users/kssmilik/events{/privacy}","received_events_url":"https://api.github.com/users/kssmilik/received_events","type":"User","site_admin":false},"body":"missing whitespace before `{ `\r\n\r\nrun rubocop","created_at":"2018-07-09T09:55:32Z","updated_at":"2018-07-09T09:55:32Z","html_url":"https://github.com/SHOPANDSHIP/pay_boutique/pull/1#discussion_r200945466","pull_request_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/comments/200945466"},"html":{"href":"https://github.com/SHOPANDSHIP/pay_boutique/pull/1#discussion_r200945466"},"pull_request":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1","id":199468368,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NDY4MzY4","html_url":"https://github.com/SHOPANDSHIP/pay_boutique/pull/1","diff_url":"https://github.com/SHOPANDSHIP/pay_boutique/pull/1.diff","patch_url":"https://github.com/SHOPANDSHIP/pay_boutique/pull/1.patch","issue_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/1","number":1,"state":"open","locked":false,"title":"added ability to use different payment methods","user":{"login":"alexandr-senyuk","id":28989361,"node_id":"MDQ6VXNlcjI4OTg5MzYx","avatar_url":"https://avatars3.githubusercontent.com/u/28989361?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandr-senyuk","html_url":"https://github.com/alexandr-senyuk","followers_url":"https://api.github.com/users/alexandr-senyuk/followers","following_url":"https://api.github.com/users/alexandr-senyuk/following{/other_user}","gists_url":"https://api.github.com/users/alexandr-senyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandr-senyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandr-senyuk/subscriptions","organizations_url":"https://api.github.com/users/alexandr-senyuk/orgs","repos_url":"https://api.github.com/users/alexandr-senyuk/repos","events_url":"https://api.github.com/users/alexandr-senyuk/events{/privacy}","received_events_url":"https://api.github.com/users/alexandr-senyuk/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-05T13:21:27Z","updated_at":"2018-07-09T09:55:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"009cd7ca09cdea56108a77689f8679ccbcef606d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1/commits","review_comments_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1/comments","review_comment_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/1/comments","statuses_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/statuses/27aaa24aa3b6a84165c78ededfe6d58478b6a8eb","head":{"label":"SHOPANDSHIP:development","ref":"development","sha":"27aaa24aa3b6a84165c78ededfe6d58478b6a8eb","user":{"login":"SHOPANDSHIP","id":5366636,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNjY2MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5366636?v=4","gravatar_id":"","url":"https://api.github.com/users/SHOPANDSHIP","html_url":"https://github.com/SHOPANDSHIP","followers_url":"https://api.github.com/users/SHOPANDSHIP/followers","following_url":"https://api.github.com/users/SHOPANDSHIP/following{/other_user}","gists_url":"https://api.github.com/users/SHOPANDSHIP/gists{/gist_id}","starred_url":"https://api.github.com/users/SHOPANDSHIP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SHOPANDSHIP/subscriptions","organizations_url":"https://api.github.com/users/SHOPANDSHIP/orgs","repos_url":"https://api.github.com/users/SHOPANDSHIP/repos","events_url":"https://api.github.com/users/SHOPANDSHIP/events{/privacy}","received_events_url":"https://api.github.com/users/SHOPANDSHIP/received_events","type":"Organization","site_admin":false},"repo":{"id":41540003,"node_id":"MDEwOlJlcG9zaXRvcnk0MTU0MDAwMw==","name":"pay_boutique","full_name":"SHOPANDSHIP/pay_boutique","owner":{"login":"SHOPANDSHIP","id":5366636,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNjY2MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5366636?v=4","gravatar_id":"","url":"https://api.github.com/users/SHOPANDSHIP","html_url":"https://github.com/SHOPANDSHIP","followers_url":"https://api.github.com/users/SHOPANDSHIP/followers","following_url":"https://api.github.com/users/SHOPANDSHIP/following{/other_user}","gists_url":"https://api.github.com/users/SHOPANDSHIP/gists{/gist_id}","starred_url":"https://api.github.com/users/SHOPANDSHIP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SHOPANDSHIP/subscriptions","organizations_url":"https://api.github.com/users/SHOPANDSHIP/orgs","repos_url":"https://api.github.com/users/SHOPANDSHIP/repos","events_url":"https://api.github.com/users/SHOPANDSHIP/events{/privacy}","received_events_url":"https://api.github.com/users/SHOPANDSHIP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SHOPANDSHIP/pay_boutique","description":"Very simple wrapper for payment system PayBoutique","fork":false,"url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique","forks_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/forks","keys_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/teams","hooks_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/hooks","issue_events_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/events{/number}","events_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/events","assignees_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/assignees{/user}","branches_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/branches{/branch}","tags_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/tags","blobs_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/refs{/sha}","trees_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/statuses/{sha}","languages_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/languages","stargazers_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/stargazers","contributors_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/contributors","subscribers_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/subscribers","subscription_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/subscription","commits_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/commits{/sha}","git_commits_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/commits{/sha}","comments_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/comments{/number}","issue_comment_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/comments{/number}","contents_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/contents/{+path}","compare_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/merges","archive_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/downloads","issues_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues{/number}","pulls_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls{/number}","milestones_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/milestones{/number}","notifications_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/labels{/name}","releases_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/releases{/id}","deployments_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/deployments","created_at":"2015-08-28T09:53:11Z","updated_at":"2016-06-24T12:29:23Z","pushed_at":"2018-07-09T09:29:58Z","git_url":"git://github.com/SHOPANDSHIP/pay_boutique.git","ssh_url":"git@github.com:SHOPANDSHIP/pay_boutique.git","clone_url":"https://github.com/SHOPANDSHIP/pay_boutique.git","svn_url":"https://github.com/SHOPANDSHIP/pay_boutique","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"SHOPANDSHIP:master","ref":"master","sha":"87a318e2fa267d332c0c863f9f7fc551118a1f58","user":{"login":"SHOPANDSHIP","id":5366636,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNjY2MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5366636?v=4","gravatar_id":"","url":"https://api.github.com/users/SHOPANDSHIP","html_url":"https://github.com/SHOPANDSHIP","followers_url":"https://api.github.com/users/SHOPANDSHIP/followers","following_url":"https://api.github.com/users/SHOPANDSHIP/following{/other_user}","gists_url":"https://api.github.com/users/SHOPANDSHIP/gists{/gist_id}","starred_url":"https://api.github.com/users/SHOPANDSHIP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SHOPANDSHIP/subscriptions","organizations_url":"https://api.github.com/users/SHOPANDSHIP/orgs","repos_url":"https://api.github.com/users/SHOPANDSHIP/repos","events_url":"https://api.github.com/users/SHOPANDSHIP/events{/privacy}","received_events_url":"https://api.github.com/users/SHOPANDSHIP/received_events","type":"Organization","site_admin":false},"repo":{"id":41540003,"node_id":"MDEwOlJlcG9zaXRvcnk0MTU0MDAwMw==","name":"pay_boutique","full_name":"SHOPANDSHIP/pay_boutique","owner":{"login":"SHOPANDSHIP","id":5366636,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNjY2MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5366636?v=4","gravatar_id":"","url":"https://api.github.com/users/SHOPANDSHIP","html_url":"https://github.com/SHOPANDSHIP","followers_url":"https://api.github.com/users/SHOPANDSHIP/followers","following_url":"https://api.github.com/users/SHOPANDSHIP/following{/other_user}","gists_url":"https://api.github.com/users/SHOPANDSHIP/gists{/gist_id}","starred_url":"https://api.github.com/users/SHOPANDSHIP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SHOPANDSHIP/subscriptions","organizations_url":"https://api.github.com/users/SHOPANDSHIP/orgs","repos_url":"https://api.github.com/users/SHOPANDSHIP/repos","events_url":"https://api.github.com/users/SHOPANDSHIP/events{/privacy}","received_events_url":"https://api.github.com/users/SHOPANDSHIP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SHOPANDSHIP/pay_boutique","description":"Very simple wrapper for payment system PayBoutique","fork":false,"url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique","forks_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/forks","keys_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/teams","hooks_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/hooks","issue_events_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/events{/number}","events_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/events","assignees_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/assignees{/user}","branches_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/branches{/branch}","tags_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/tags","blobs_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/refs{/sha}","trees_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/statuses/{sha}","languages_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/languages","stargazers_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/stargazers","contributors_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/contributors","subscribers_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/subscribers","subscription_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/subscription","commits_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/commits{/sha}","git_commits_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/git/commits{/sha}","comments_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/comments{/number}","issue_comment_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/comments{/number}","contents_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/contents/{+path}","compare_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/merges","archive_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/downloads","issues_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues{/number}","pulls_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls{/number}","milestones_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/milestones{/number}","notifications_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/labels{/name}","releases_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/releases{/id}","deployments_url":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/deployments","created_at":"2015-08-28T09:53:11Z","updated_at":"2016-06-24T12:29:23Z","pushed_at":"2018-07-09T09:29:58Z","git_url":"git://github.com/SHOPANDSHIP/pay_boutique.git","ssh_url":"git@github.com:SHOPANDSHIP/pay_boutique.git","clone_url":"https://github.com/SHOPANDSHIP/pay_boutique.git","svn_url":"https://github.com/SHOPANDSHIP/pay_boutique","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1"},"html":{"href":"https://github.com/SHOPANDSHIP/pay_boutique/pull/1"},"issue":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/1"},"comments":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/SHOPANDSHIP/pay_boutique/statuses/27aaa24aa3b6a84165c78ededfe6d58478b6a8eb"}},"author_association":"NONE"}}
{"actor":{"display_login":"kssmilik"}}