{"action":"created","comment":{"url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments/210203809","pull_request_review_id":146368212,"id":210203809,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDIwMzgwOQ==","diff_hunk":"@@ -0,0 +1,861 @@\n+{\n+  title: \"ChartMogul\",\n+\n+  connection: {\n+    fields: [\n+      {\n+        name: \"account_token\",\n+        label: \"Account Token\",\n+        control_type: \"text\"\n+      },\n+      {\n+        name: \"secret_key\",\n+        label: \"Secret Key\",\n+        control_type: \"password\"\n+      }\n+    ],\n+\n+    authorization: {\n+      type: \"custom_auth\",\n+\n+      credentials: lambda do |connection|\n+        user(connection[\"account_token\"])\n+        password(connection[\"secret_key\"])\n+        headers(\"User-Agent\" => \"application/json\")\n+      end\n+    },\n+\n+    base_uri: lambda do\n+      \"https://api.chartmogul.com\"\n+    end\n+  },\n+\n+  test: lambda do |_connection|\n+    get(\"/v1/ping\")\n+  end,\n+\n+  object_definitions: {\n+    customer: {\n+      fields: lambda do\n+        [\n+          { name: \"uuid\", label: \"Customer UUID\" },\n+          {\n+            name: \"data_source_uuid\",\n+            label: \"Data Source\",\n+            hint: \"The data source that this customer belongs to\",\n+            control_type: \"select\",\n+            pick_list: \"data_sources\",\n+            optional: true\n+          },\n+          { name: \"external_id\", label: \"External ID\", optional: true,\n+            hint: \"The unique external identifier for this customer\" },\n+          { name: \"name\", hint: \"Name of the customer for display purposes.\" },\n+          { name: \"email\", control_type: \"email\" },\n+          { name: \"status\" },\n+          { name: \"company\" },\n+          { name: \"country\",\n+            hint: \"Country code of customer's location, e.g. US,UK,AU.\" },\n+          { name: \"state\",\n+            hint: \"State code of customer's location, e.g. TX,CA,ON.\" },\n+          { name: \"city\", hint: \"City of the customer's location.\" },\n+          { name: \"zip\", hint: \"Zip code of the customer's location.\" },\n+          { name: \"currency\" },\n+          { name: \"mrr\", label: \"Customer MRR\", type: \"number\" },\n+          { name: \"arr\", label: \"Customer ARR\", type: \"number\" },\n+          { name: \"chartmogul_url\", control_type: \"url\" }\n+        ]\n+      end\n+    },\n+\n+    plan: {\n+      fields: lambda do\n+        [\n+          { name: \"uuid\", label: \"Plan UUID\" },\n+          { name: \"name\", hint: \"Display name of the plan.\" },\n+          { name: \"data_source_uuid\", label: \"Data Source\",\n+            hint: \"The data source that this plan belongs to\",\n+            control_type: \"select\", pick_list: \"data_sources\", optional: true },\n+          { name: \"external_id\", optional: true,\n+            hint: \"Typically an identifier from your internal system.\" },\n+          { name: \"interval_count\", type: \"integer\", control_type: \"number\",\n+            hint: \"The frequency of billing interval. Accepts integers \" \\\n+              \"greater than 0. eg. 6 for a half-yearly plan.\" },\n+          { name: \"interval_unit\",\n+            hint: \"The unit of billing interval. One of day, month, or \" \\\n+              \"year. eg. month for the above half-yearly plan.\",\n+            control_type: \"select\",\n+            pick_list: [\n+              %w[Day day],\n+              %w[Month month],\n+              %w[Year year]\n+            ]\n+          }\n+        ]\n+      end\n+    },\n+\n+    subscription: {\n+      fields: lambda do\n+        [\n+          { name: \"uuid\", label: \"Subscription UUID\" },\n+          { name: \"external_id\", label: \"External ID\" },\n+          { name: \"plan_uuid\", label: \"Plan UUID\" },\n+          { name: \"data_source_uuid\", label: \"Data Source UUID\" },\n+          { name: \"cancellation_dates\", type: \"array\", of: \"date_time\",\n+            properties: [] }\n+        ]\n+      end\n+    },\n+\n+    mrr: {\n+      fields: lambda do\n+        [\n+          { name: \"date\", type: \"date\", label: \"Date Ending\" },\n+          { name: \"mrr\", label: \"MRR\", type: \"integer\" },\n+          { name: \"mrr_new_business\", label: \"New Business MRR\",\n+            type: \"integer\" },\n+          { name: \"mrr_expansion\", label: \"Expansion MRR\", type: \"integer\" },\n+          { name: \"mrr_contraction\", label: \"Contraction MRR\",\n+            type: \"integer\" },\n+          { name: \"mrr_reactivation\", label: \"Reactivation MRR\",\n+            type: \"integer\" },\n+          { name: \"mrr_churn\", label: \"Churn MRR\", type: \"integer\" }\n+        ]\n+      end\n+    },\n+\n+    customer_count: {\n+      fields: lambda do\n+        [\n+          { name: \"date\", type: \"date\" },\n+          { name: \"customers\", type: \"integer\" }\n+        ]\n+      end\n+    },\n+\n+    customer_churn_count: {\n+      fields: lambda do\n+        [\n+          { name: \"date\", type: \"date\" },\n+          { name: \"customers-churn-rate\", type: \"number\" }\n+        ]\n+      end\n+    },\n+\n+    invoice: {\n+      fields: lambda do |object_definitions|\n+        [\n+          { name: \"uuid\", label: \"Invoice UUID\" },\n+          { name: \"external_id\",\n+            hint: \"A unique identifier specified by you for the invoice.\" },\n+          { name: \"date\", type: \"date_time\",\n+            hint: \"The date on which this invoice was raised.\" },\n+          { name: \"due_date\", type: \"date_time\",\n+            hint: \"The date within which this invoice must be paid.\" },\n+          { name: \"currency\",\n+            hint: \"The 3-letter currency code of the currency in which \" \\\n+              \"this invoice is being billed, e.g. USD, EUR, GBP.\" },\n+          { name: \"line_items\", type: \"array\", of: \"object\", properties: [\n+          \t{ name: \"uuid\", label: \"Item UUID\" },\n+        \t\t{ name: \"external_id\" },\n+            { name: \"type\" },\n+            { name: \"subscription_uuid\" },\n+            { name: \"plan_uuid\" },","path":"custom_connectors/custom_auth/chartmogul_connector.rb","position":163,"original_position":163,"commit_id":"c407776fb275e4bde1cfb6b210e8f62fbea32d05","original_commit_id":"c407776fb275e4bde1cfb6b210e8f62fbea32d05","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Align the elements of an array literal if they span more than one line.","created_at":"2018-08-15T08:36:15Z","updated_at":"2018-08-15T08:36:16Z","html_url":"https://github.com/workato/custom_connector_docs/pull/10#discussion_r210203809","pull_request_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments/210203809"},"html":{"href":"https://github.com/workato/custom_connector_docs/pull/10#discussion_r210203809"},"pull_request":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10","id":208498111,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NDk4MTEx","html_url":"https://github.com/workato/custom_connector_docs/pull/10","diff_url":"https://github.com/workato/custom_connector_docs/pull/10.diff","patch_url":"https://github.com/workato/custom_connector_docs/pull/10.patch","issue_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/10","number":10,"state":"open","locked":false,"title":"Chartmogul SDK - Initial Commit","user":{"login":"brendonyang","id":39894932,"node_id":"MDQ6VXNlcjM5ODk0OTMy","avatar_url":"https://avatars1.githubusercontent.com/u/39894932?v=4","gravatar_id":"","url":"https://api.github.com/users/brendonyang","html_url":"https://github.com/brendonyang","followers_url":"https://api.github.com/users/brendonyang/followers","following_url":"https://api.github.com/users/brendonyang/following{/other_user}","gists_url":"https://api.github.com/users/brendonyang/gists{/gist_id}","starred_url":"https://api.github.com/users/brendonyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendonyang/subscriptions","organizations_url":"https://api.github.com/users/brendonyang/orgs","repos_url":"https://api.github.com/users/brendonyang/repos","events_url":"https://api.github.com/users/brendonyang/events{/privacy}","received_events_url":"https://api.github.com/users/brendonyang/received_events","type":"User","site_admin":false},"body":"Actions: \r\n- [x] Cancel customer subscription\r\n- [x] Create customer\r\n- [x] Create invoice\r\n- [x] Create plan\r\n- [x] Create transaction\r\n- [x] Get customer\r\n- [x] Get customer churn count\r\n- [x] Get customer count\r\n- [x] Get invoices by customer\r\n- [x] Get MRR\r\n- [x] Get subscriptions by customer\r\n- [x] Search plans\r\n- [x] Update customer","created_at":"2018-08-15T08:08:49Z","updated_at":"2018-08-15T08:36:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f61a0521ef014d5bd4a74d0aa4781497873748e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10/commits","review_comments_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10/comments","review_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/10/comments","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/c407776fb275e4bde1cfb6b210e8f62fbea32d05","head":{"label":"workato:chartmogul---brendon","ref":"chartmogul---brendon","sha":"c407776fb275e4bde1cfb6b210e8f62fbea32d05","user":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"repo":{"id":143073259,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMwNzMyNTk=","name":"custom_connector_docs","full_name":"workato/custom_connector_docs","owner":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/workato/custom_connector_docs","description":null,"fork":false,"url":"https://api.github.com/repos/workato/custom_connector_docs","forks_url":"https://api.github.com/repos/workato/custom_connector_docs/forks","keys_url":"https://api.github.com/repos/workato/custom_connector_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workato/custom_connector_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workato/custom_connector_docs/teams","hooks_url":"https://api.github.com/repos/workato/custom_connector_docs/hooks","issue_events_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/events{/number}","events_url":"https://api.github.com/repos/workato/custom_connector_docs/events","assignees_url":"https://api.github.com/repos/workato/custom_connector_docs/assignees{/user}","branches_url":"https://api.github.com/repos/workato/custom_connector_docs/branches{/branch}","tags_url":"https://api.github.com/repos/workato/custom_connector_docs/tags","blobs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workato/custom_connector_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/workato/custom_connector_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/workato/custom_connector_docs/languages","stargazers_url":"https://api.github.com/repos/workato/custom_connector_docs/stargazers","contributors_url":"https://api.github.com/repos/workato/custom_connector_docs/contributors","subscribers_url":"https://api.github.com/repos/workato/custom_connector_docs/subscribers","subscription_url":"https://api.github.com/repos/workato/custom_connector_docs/subscription","commits_url":"https://api.github.com/repos/workato/custom_connector_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/workato/custom_connector_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/workato/custom_connector_docs/contents/{+path}","compare_url":"https://api.github.com/repos/workato/custom_connector_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workato/custom_connector_docs/merges","archive_url":"https://api.github.com/repos/workato/custom_connector_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workato/custom_connector_docs/downloads","issues_url":"https://api.github.com/repos/workato/custom_connector_docs/issues{/number}","pulls_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/workato/custom_connector_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/workato/custom_connector_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workato/custom_connector_docs/labels{/name}","releases_url":"https://api.github.com/repos/workato/custom_connector_docs/releases{/id}","deployments_url":"https://api.github.com/repos/workato/custom_connector_docs/deployments","created_at":"2018-07-31T21:44:08Z","updated_at":"2018-08-08T15:08:59Z","pushed_at":"2018-08-15T08:36:01Z","git_url":"git://github.com/workato/custom_connector_docs.git","ssh_url":"git@github.com:workato/custom_connector_docs.git","clone_url":"https://github.com/workato/custom_connector_docs.git","svn_url":"https://github.com/workato/custom_connector_docs","homepage":null,"size":730,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"workato:master","ref":"master","sha":"cbdeefec7a8316a24949d80031f4ac0a915d5b26","user":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"repo":{"id":143073259,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMwNzMyNTk=","name":"custom_connector_docs","full_name":"workato/custom_connector_docs","owner":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/workato/custom_connector_docs","description":null,"fork":false,"url":"https://api.github.com/repos/workato/custom_connector_docs","forks_url":"https://api.github.com/repos/workato/custom_connector_docs/forks","keys_url":"https://api.github.com/repos/workato/custom_connector_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workato/custom_connector_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workato/custom_connector_docs/teams","hooks_url":"https://api.github.com/repos/workato/custom_connector_docs/hooks","issue_events_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/events{/number}","events_url":"https://api.github.com/repos/workato/custom_connector_docs/events","assignees_url":"https://api.github.com/repos/workato/custom_connector_docs/assignees{/user}","branches_url":"https://api.github.com/repos/workato/custom_connector_docs/branches{/branch}","tags_url":"https://api.github.com/repos/workato/custom_connector_docs/tags","blobs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workato/custom_connector_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/workato/custom_connector_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/workato/custom_connector_docs/languages","stargazers_url":"https://api.github.com/repos/workato/custom_connector_docs/stargazers","contributors_url":"https://api.github.com/repos/workato/custom_connector_docs/contributors","subscribers_url":"https://api.github.com/repos/workato/custom_connector_docs/subscribers","subscription_url":"https://api.github.com/repos/workato/custom_connector_docs/subscription","commits_url":"https://api.github.com/repos/workato/custom_connector_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/workato/custom_connector_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/workato/custom_connector_docs/contents/{+path}","compare_url":"https://api.github.com/repos/workato/custom_connector_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workato/custom_connector_docs/merges","archive_url":"https://api.github.com/repos/workato/custom_connector_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workato/custom_connector_docs/downloads","issues_url":"https://api.github.com/repos/workato/custom_connector_docs/issues{/number}","pulls_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/workato/custom_connector_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/workato/custom_connector_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workato/custom_connector_docs/labels{/name}","releases_url":"https://api.github.com/repos/workato/custom_connector_docs/releases{/id}","deployments_url":"https://api.github.com/repos/workato/custom_connector_docs/deployments","created_at":"2018-07-31T21:44:08Z","updated_at":"2018-08-08T15:08:59Z","pushed_at":"2018-08-15T08:36:01Z","git_url":"git://github.com/workato/custom_connector_docs.git","ssh_url":"git@github.com:workato/custom_connector_docs.git","clone_url":"https://github.com/workato/custom_connector_docs.git","svn_url":"https://github.com/workato/custom_connector_docs","homepage":null,"size":730,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10"},"html":{"href":"https://github.com/workato/custom_connector_docs/pull/10"},"issue":{"href":"https://api.github.com/repos/workato/custom_connector_docs/issues/10"},"comments":{"href":"https://api.github.com/repos/workato/custom_connector_docs/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/workato/custom_connector_docs/statuses/c407776fb275e4bde1cfb6b210e8f62fbea32d05"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}