{"action":"created","comment":{"url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/comments/222220647","pull_request_review_id":161052406,"id":222220647,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjIyMDY0Nw==","diff_hunk":"@@ -0,0 +1,41 @@\n+# Ensure we load all gems from\n+# the Gemfile\n+require 'bundler'\n+Bundler.setup\n+\n+# Load environment variables\n+# from the .env file\n+require 'dotenv'\n+Dotenv.load\n+\n+# Initialize nexmo with the\n+# NEXMO_API_KEY and\n+# NEXMO_API_SECRET environment\n+# variables\n+require 'nexmo'\n+nexmo = Nexmo::Client.new\n+\n+# Perform a Number Insight Standard inquiry\n+insight = nexmo.number_insight.standard(\n+  number:  '020 3198 0560',\n+  country: 'GB'\n+)\n+\n+# Store the network and country codes\n+current_network = insight.current_carrier.network_code\n+current_country = insight.country_code\n+\n+# Fetch the voice and SMS pricing data for the country\n+sms_pricing = nexmo.pricing.sms.get(current_country)\n+voice_pricing = nexmo.pricing.voice.get(current_country)\n+\n+# Retrieve the network cost from the pricing data\n+sms_cost = sms_pricing.networks.select{\n+  |network| network.network_code == current_network}\n+voice_cost = voice_pricing.networks.select{\n+  |network| network.network_code == current_network}","path":"snippets/4_cost.rb","position":36,"original_position":36,"commit_id":"b33c1d8f5583d942f661da94b9713662ab617b8c","original_commit_id":"b33c1d8f5583d942f661da94b9713662ab617b8c","user":{"login":"marklewin","id":18176755,"node_id":"MDQ6VXNlcjE4MTc2NzU1","avatar_url":"https://avatars3.githubusercontent.com/u/18176755?v=4","gravatar_id":"","url":"https://api.github.com/users/marklewin","html_url":"https://github.com/marklewin","followers_url":"https://api.github.com/users/marklewin/followers","following_url":"https://api.github.com/users/marklewin/following{/other_user}","gists_url":"https://api.github.com/users/marklewin/gists{/gist_id}","starred_url":"https://api.github.com/users/marklewin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marklewin/subscriptions","organizations_url":"https://api.github.com/users/marklewin/orgs","repos_url":"https://api.github.com/users/marklewin/repos","events_url":"https://api.github.com/users/marklewin/events{/privacy}","received_events_url":"https://api.github.com/users/marklewin/received_events","type":"User","site_admin":false},"body":"Done!","created_at":"2018-10-03T08:16:17Z","updated_at":"2018-10-03T08:16:17Z","html_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation/pull/4#discussion_r222220647","pull_request_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/comments/222220647"},"html":{"href":"https://github.com/Nexmo/ruby-ni-customer-number-validation/pull/4#discussion_r222220647"},"pull_request":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4"}},"in_reply_to_id":222024638},"pull_request":{"url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4","id":219735076,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NzM1MDc2","html_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation/pull/4","diff_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation/pull/4.diff","patch_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation/pull/4.patch","issue_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/4","number":4,"state":"open","locked":false,"title":"Modify to use latest version of Nexmo and client library","user":{"login":"marklewin","id":18176755,"node_id":"MDQ6VXNlcjE4MTc2NzU1","avatar_url":"https://avatars3.githubusercontent.com/u/18176755?v=4","gravatar_id":"","url":"https://api.github.com/users/marklewin","html_url":"https://github.com/marklewin","followers_url":"https://api.github.com/users/marklewin/followers","following_url":"https://api.github.com/users/marklewin/following{/other_user}","gists_url":"https://api.github.com/users/marklewin/gists{/gist_id}","starred_url":"https://api.github.com/users/marklewin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marklewin/subscriptions","organizations_url":"https://api.github.com/users/marklewin/orgs","repos_url":"https://api.github.com/users/marklewin/repos","events_url":"https://api.github.com/users/marklewin/events{/privacy}","received_events_url":"https://api.github.com/users/marklewin/received_events","type":"User","site_admin":false},"body":"Updated the tutorial:\r\n\r\n- Changed the current `nexmo` dependency to 5.4.0\r\n- Changed the calls to the insight API to reflect the new methods (e.g. `number_insight.basic()` instead of `get_basic_number_insight()`)\r\n- Changed the pricing API example (you don't seem to be able to pass a number in as a parameter any more, so I'm using the standard instead of basic NI API to retrieve both the `country_code` and `network_code` and using them to calculate pricing)\r\n- Switched the ordering of the `cost` and `channels` snippets to achieve a better flow in terms of building on previous examples\r\n- Updated the `README`","created_at":"2018-10-02T14:56:29Z","updated_at":"2018-10-03T08:16:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b877b76823e3474881b02776c4957dbafb5e7847","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/4/comments","statuses_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/statuses/b33c1d8f5583d942f661da94b9713662ab617b8c","head":{"label":"Nexmo:markl-update-tutorial","ref":"markl-update-tutorial","sha":"b33c1d8f5583d942f661da94b9713662ab617b8c","user":{"login":"Nexmo","id":551057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1MTA1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/551057?v=4","gravatar_id":"","url":"https://api.github.com/users/Nexmo","html_url":"https://github.com/Nexmo","followers_url":"https://api.github.com/users/Nexmo/followers","following_url":"https://api.github.com/users/Nexmo/following{/other_user}","gists_url":"https://api.github.com/users/Nexmo/gists{/gist_id}","starred_url":"https://api.github.com/users/Nexmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nexmo/subscriptions","organizations_url":"https://api.github.com/users/Nexmo/orgs","repos_url":"https://api.github.com/users/Nexmo/repos","events_url":"https://api.github.com/users/Nexmo/events{/privacy}","received_events_url":"https://api.github.com/users/Nexmo/received_events","type":"Organization","site_admin":false},"repo":{"id":74357992,"node_id":"MDEwOlJlcG9zaXRvcnk3NDM1Nzk5Mg==","name":"ruby-ni-customer-number-validation","full_name":"Nexmo/ruby-ni-customer-number-validation","private":false,"owner":{"login":"Nexmo","id":551057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1MTA1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/551057?v=4","gravatar_id":"","url":"https://api.github.com/users/Nexmo","html_url":"https://github.com/Nexmo","followers_url":"https://api.github.com/users/Nexmo/followers","following_url":"https://api.github.com/users/Nexmo/following{/other_user}","gists_url":"https://api.github.com/users/Nexmo/gists{/gist_id}","starred_url":"https://api.github.com/users/Nexmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nexmo/subscriptions","organizations_url":"https://api.github.com/users/Nexmo/orgs","repos_url":"https://api.github.com/users/Nexmo/repos","events_url":"https://api.github.com/users/Nexmo/events{/privacy}","received_events_url":"https://api.github.com/users/Nexmo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation","description":"Customer Number Validation using the Nexmo Number Insight API","fork":false,"url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation","forks_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/forks","keys_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/teams","hooks_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/hooks","issue_events_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/events{/number}","events_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/events","assignees_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/assignees{/user}","branches_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/branches{/branch}","tags_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/tags","blobs_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/statuses/{sha}","languages_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/languages","stargazers_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/stargazers","contributors_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/contributors","subscribers_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/subscribers","subscription_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/subscription","commits_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/contents/{+path}","compare_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/merges","archive_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/downloads","issues_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues{/number}","pulls_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls{/number}","milestones_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/milestones{/number}","notifications_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/labels{/name}","releases_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/releases{/id}","deployments_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/deployments","created_at":"2016-11-21T11:43:26Z","updated_at":"2017-07-25T15:53:12Z","pushed_at":"2018-10-02T14:56:30Z","git_url":"git://github.com/Nexmo/ruby-ni-customer-number-validation.git","ssh_url":"git@github.com:Nexmo/ruby-ni-customer-number-validation.git","clone_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation.git","svn_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation","homepage":"https://developer.nexmo.com/tutorials/phone-number-validation","size":7,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":3,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"Nexmo:master","ref":"master","sha":"96b9a45c2cd561284f99caefba329afde8c7b954","user":{"login":"Nexmo","id":551057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1MTA1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/551057?v=4","gravatar_id":"","url":"https://api.github.com/users/Nexmo","html_url":"https://github.com/Nexmo","followers_url":"https://api.github.com/users/Nexmo/followers","following_url":"https://api.github.com/users/Nexmo/following{/other_user}","gists_url":"https://api.github.com/users/Nexmo/gists{/gist_id}","starred_url":"https://api.github.com/users/Nexmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nexmo/subscriptions","organizations_url":"https://api.github.com/users/Nexmo/orgs","repos_url":"https://api.github.com/users/Nexmo/repos","events_url":"https://api.github.com/users/Nexmo/events{/privacy}","received_events_url":"https://api.github.com/users/Nexmo/received_events","type":"Organization","site_admin":false},"repo":{"id":74357992,"node_id":"MDEwOlJlcG9zaXRvcnk3NDM1Nzk5Mg==","name":"ruby-ni-customer-number-validation","full_name":"Nexmo/ruby-ni-customer-number-validation","private":false,"owner":{"login":"Nexmo","id":551057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1MTA1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/551057?v=4","gravatar_id":"","url":"https://api.github.com/users/Nexmo","html_url":"https://github.com/Nexmo","followers_url":"https://api.github.com/users/Nexmo/followers","following_url":"https://api.github.com/users/Nexmo/following{/other_user}","gists_url":"https://api.github.com/users/Nexmo/gists{/gist_id}","starred_url":"https://api.github.com/users/Nexmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nexmo/subscriptions","organizations_url":"https://api.github.com/users/Nexmo/orgs","repos_url":"https://api.github.com/users/Nexmo/repos","events_url":"https://api.github.com/users/Nexmo/events{/privacy}","received_events_url":"https://api.github.com/users/Nexmo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation","description":"Customer Number Validation using the Nexmo Number Insight API","fork":false,"url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation","forks_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/forks","keys_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/teams","hooks_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/hooks","issue_events_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/events{/number}","events_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/events","assignees_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/assignees{/user}","branches_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/branches{/branch}","tags_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/tags","blobs_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/statuses/{sha}","languages_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/languages","stargazers_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/stargazers","contributors_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/contributors","subscribers_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/subscribers","subscription_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/subscription","commits_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/contents/{+path}","compare_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/merges","archive_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/downloads","issues_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues{/number}","pulls_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls{/number}","milestones_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/milestones{/number}","notifications_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/labels{/name}","releases_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/releases{/id}","deployments_url":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/deployments","created_at":"2016-11-21T11:43:26Z","updated_at":"2017-07-25T15:53:12Z","pushed_at":"2018-10-02T14:56:30Z","git_url":"git://github.com/Nexmo/ruby-ni-customer-number-validation.git","ssh_url":"git@github.com:Nexmo/ruby-ni-customer-number-validation.git","clone_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation.git","svn_url":"https://github.com/Nexmo/ruby-ni-customer-number-validation","homepage":"https://developer.nexmo.com/tutorials/phone-number-validation","size":7,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":3,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4"},"html":{"href":"https://github.com/Nexmo/ruby-ni-customer-number-validation/pull/4"},"issue":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/4"},"comments":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Nexmo/ruby-ni-customer-number-validation/statuses/b33c1d8f5583d942f661da94b9713662ab617b8c"}},"author_association":"NONE"}}
{"actor":{"display_login":"marklewin"}}