{"action":"created","issue":{"url":"https://api.github.com/repos/omise/omise-node/issues/80","repository_url":"https://api.github.com/repos/omise/omise-node","labels_url":"https://api.github.com/repos/omise/omise-node/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/omise/omise-node/issues/80/comments","events_url":"https://api.github.com/repos/omise/omise-node/issues/80/events","html_url":"https://github.com/omise/omise-node/pull/80","id":284117225,"number":80,"title":"Support Omise's Forex API","user":{"login":"keeratita","id":5326774,"avatar_url":"https://avatars1.githubusercontent.com/u/5326774?v=4","gravatar_id":"","url":"https://api.github.com/users/keeratita","html_url":"https://github.com/keeratita","followers_url":"https://api.github.com/users/keeratita/followers","following_url":"https://api.github.com/users/keeratita/following{/other_user}","gists_url":"https://api.github.com/users/keeratita/gists{/gist_id}","starred_url":"https://api.github.com/users/keeratita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keeratita/subscriptions","organizations_url":"https://api.github.com/users/keeratita/orgs","repos_url":"https://api.github.com/users/keeratita/repos","events_url":"https://api.github.com/users/keeratita/events{/privacy}","received_events_url":"https://api.github.com/users/keeratita/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-22T09:41:01Z","updated_at":"2017-12-25T08:27:32Z","closed_at":"2017-12-25T08:02:05Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/omise/omise-node/pulls/80","html_url":"https://github.com/omise/omise-node/pull/80","diff_url":"https://github.com/omise/omise-node/pull/80.diff","patch_url":"https://github.com/omise/omise-node/pull/80.patch"},"body":"**Forex**\r\nAdd a retrieve function\r\n\r\nCode:\r\n```\r\nomise.forex.retrieve(\"usd\", function (error, forex) {\r\n\tconsole.log(forex);\r\n});\r\n```\r\n\r\nExpected Result:\r\n```\r\n{\r\n    \"object\": \"forex\",\r\n    \"from\": \"usd\",\r\n    \"to\": \"thb\",\r\n    \"rate\": 31.5134004,\r\n    \"location\": \"/forex/usd\"\r\n}\r\n```\r\n\r\n**Charges**\r\nAdd a schedules function to get a list of charge schedules\r\n\r\nCode:\r\n```\r\nomise.charges.schedules({\r\n    \"from\": \"\",\r\n    \"limit\": \"20\",\r\n    \"offset\": \"0\",\r\n    \"order\": \"reverse_chronological\",\r\n    \"timezone\": \"Asia/Bangkok\",\r\n    \"to\": \"\"\r\n}, function (error, schedules) {\r\n\tconsole.log(schedules);\r\n});\r\n```\r\n\r\nExpected Result:\r\n```\r\n{\r\n    \"object\": \"list\",\r\n    \"from\": \"1970-01-01T00:00:00Z\",\r\n    \"to\": \"2017-12-22T09:38:09Z\",\r\n    \"offset\": 0,\r\n    \"limit\": 20,\r\n    \"total\": 1,\r\n    \"order\": \"reverse_chronological\",\r\n    \"location\": \"/charges/schedules\",\r\n    \"data\": [\r\n        {\r\n            \"object\": \"schedule\",\r\n            \"id\": \"schd_test_5adk4ygmh7sxl05evty\",\r\n            \"livemode\": false,\r\n            \"location\": \"/schedules/schd_test_5adk4ygmh7sxl05evty\",\r\n            \"status\": \"active\",\r\n            \"every\": 1,\r\n            \"period\": \"month\",\r\n            \"on\": {\r\n                \"days_of_month\": [\r\n                    1\r\n                ]\r\n            },\r\n            \"in_words\": \"Every 1 month(s) on the 1st\",\r\n            \"start_date\": \"2017-12-22\",\r\n            \"end_date\": \"2018-12-22\",\r\n            \"charge\": {\r\n                \"amount\": 100000,\r\n                \"currency\": \"thb\",\r\n                \"description\": \"\",\r\n                \"customer\": \"cust_test_5a4j05pd5uuk0y6y6ls\",\r\n                \"card\": null\r\n            },\r\n            \"occurrences\": {\r\n                \"object\": \"list\",\r\n                \"from\": \"1970-01-01T00:00:00Z\",\r\n                \"to\": \"2017-12-22T09:38:09Z\",\r\n                \"offset\": 0,\r\n                \"limit\": 20,\r\n                \"total\": 0,\r\n                \"order\": null,\r\n                \"location\": \"/schedules/schd_test_5adk4ygmh7sxl05evty/occurrences\",\r\n                \"data\": []\r\n            },\r\n            \"next_occurrence_dates\": [\r\n                \"2018-01-01\",\r\n                \"2018-02-01\",\r\n                \"2018-03-01\",\r\n                \"2018-04-01\",\r\n                \"2018-05-01\",\r\n                \"2018-06-01\",\r\n                \"2018-07-01\",\r\n                \"2018-08-01\",\r\n                \"2018-09-01\",\r\n                \"2018-10-01\",\r\n                \"2018-11-01\",\r\n                \"2018-12-01\"\r\n            ],\r\n            \"created\": \"2017-12-22T08:43:35Z\"\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n**Transfers**\r\nAdd a schedules function to get a list of transfer schedules\r\n\r\nCode:\r\n```\r\nomise.transfers.schedules({\r\n    \"from\": \"\",\r\n    \"limit\": \"20\",\r\n    \"offset\": \"0\",\r\n    \"order\": \"reverse_chronological\",\r\n    \"timezone\": \"Asia/Bangkok\",\r\n    \"to\": \"\"\r\n}, function (error, schedules) {\r\n\tconsole.log(schedules);\r\n});\r\n```\r\n\r\nExpected Result:\r\n```\r\n{\r\n    \"object\": \"list\",\r\n    \"from\": \"1970-01-01T00:00:00Z\",\r\n    \"to\": \"2017-12-22T09:39:43Z\",\r\n    \"offset\": 0,\r\n    \"limit\": 20,\r\n    \"total\": 1,\r\n    \"order\": \"reverse_chronological\",\r\n    \"location\": \"/transfers/schedules\",\r\n    \"data\": [\r\n        {\r\n            \"object\": \"schedule\",\r\n            \"id\": \"schd_test_5adkoosh960c0yfw1c0\",\r\n            \"livemode\": false,\r\n            \"location\": \"/schedules/schd_test_5adkoosh960c0yfw1c0\",\r\n            \"status\": \"active\",\r\n            \"every\": 1,\r\n            \"period\": \"month\",\r\n            \"on\": {\r\n                \"days_of_month\": [\r\n                    1\r\n                ]\r\n            },\r\n            \"in_words\": \"Every 1 month(s) on the 1st\",\r\n            \"start_date\": \"2017-12-22\",\r\n            \"end_date\": \"2018-12-22\",\r\n            \"transfer\": {\r\n                \"recipient\": \"recp_test_5a4iwqh5vg3gy4ikn3o\",\r\n                \"amount\": null,\r\n                \"percentage_of_balance\": 50,\r\n                \"currency\": \"thb\"\r\n            },\r\n            \"occurrences\": {\r\n                \"object\": \"list\",\r\n                \"from\": \"1970-01-01T00:00:00Z\",\r\n                \"to\": \"2017-12-22T09:39:43Z\",\r\n                \"offset\": 0,\r\n                \"limit\": 20,\r\n                \"total\": 0,\r\n                \"order\": null,\r\n                \"location\": \"/schedules/schd_test_5adkoosh960c0yfw1c0/occurrences\",\r\n                \"data\": []\r\n            },\r\n            \"next_occurrence_dates\": [\r\n                \"2018-01-01\",\r\n                \"2018-02-01\",\r\n                \"2018-03-01\",\r\n                \"2018-04-01\",\r\n                \"2018-05-01\",\r\n                \"2018-06-01\",\r\n                \"2018-07-01\",\r\n                \"2018-08-01\",\r\n                \"2018-09-01\",\r\n                \"2018-10-01\",\r\n                \"2018-11-01\",\r\n                \"2018-12-01\"\r\n            ],\r\n            \"created\": \"2017-12-22T09:39:39Z\"\r\n        }\r\n    ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/omise/omise-node/issues/comments/353848082","html_url":"https://github.com/omise/omise-node/pull/80#issuecomment-353848082","issue_url":"https://api.github.com/repos/omise/omise-node/issues/80","id":353848082,"user":{"login":"varshard","id":5525345,"avatar_url":"https://avatars0.githubusercontent.com/u/5525345?v=4","gravatar_id":"","url":"https://api.github.com/users/varshard","html_url":"https://github.com/varshard","followers_url":"https://api.github.com/users/varshard/followers","following_url":"https://api.github.com/users/varshard/following{/other_user}","gists_url":"https://api.github.com/users/varshard/gists{/gist_id}","starred_url":"https://api.github.com/users/varshard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varshard/subscriptions","organizations_url":"https://api.github.com/users/varshard/orgs","repos_url":"https://api.github.com/users/varshard/repos","events_url":"https://api.github.com/users/varshard/events{/privacy}","received_events_url":"https://api.github.com/users/varshard/received_events","type":"User","site_admin":false},"created_at":"2017-12-25T08:27:32Z","updated_at":"2017-12-25T08:27:32Z","author_association":"CONTRIBUTOR","body":"Sorry, had to revert the merge.\r\n\r\nPlease ensure that the code is conform with code style definition.\r\n\r\nAlso, please add test cases and typescript definition for newer API."}}
{"actor":{"display_login":"varshard"}}