{"action":"closed","issue":{"url":"https://api.github.com/repos/PromisePay/promisepay-php/issues/52","repository_url":"https://api.github.com/repos/PromisePay/promisepay-php","labels_url":"https://api.github.com/repos/PromisePay/promisepay-php/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/PromisePay/promisepay-php/issues/52/comments","events_url":"https://api.github.com/repos/PromisePay/promisepay-php/issues/52/events","html_url":"https://github.com/PromisePay/promisepay-php/issues/52","id":244074905,"number":52,"title":"Each call param should be a function argument, as opposed to having one argument for all params","user":{"login":"NinoSkopac","id":1783732,"avatar_url":"https://avatars1.githubusercontent.com/u/1783732?v=4","gravatar_id":"","url":"https://api.github.com/users/NinoSkopac","html_url":"https://github.com/NinoSkopac","followers_url":"https://api.github.com/users/NinoSkopac/followers","following_url":"https://api.github.com/users/NinoSkopac/following{/other_user}","gists_url":"https://api.github.com/users/NinoSkopac/gists{/gist_id}","starred_url":"https://api.github.com/users/NinoSkopac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NinoSkopac/subscriptions","organizations_url":"https://api.github.com/users/NinoSkopac/orgs","repos_url":"https://api.github.com/users/NinoSkopac/repos","events_url":"https://api.github.com/users/NinoSkopac/events{/privacy}","received_events_url":"https://api.github.com/users/NinoSkopac/received_events","type":"User","site_admin":false},"labels":[{"id":663712556,"url":"https://api.github.com/repos/PromisePay/promisepay-php/labels/backwards%20incompatible","name":"backwards incompatible","color":"b60205","default":false},{"id":217927322,"url":"https://api.github.com/repos/PromisePay/promisepay-php/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"NinoSkopac","id":1783732,"avatar_url":"https://avatars1.githubusercontent.com/u/1783732?v=4","gravatar_id":"","url":"https://api.github.com/users/NinoSkopac","html_url":"https://github.com/NinoSkopac","followers_url":"https://api.github.com/users/NinoSkopac/followers","following_url":"https://api.github.com/users/NinoSkopac/following{/other_user}","gists_url":"https://api.github.com/users/NinoSkopac/gists{/gist_id}","starred_url":"https://api.github.com/users/NinoSkopac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NinoSkopac/subscriptions","organizations_url":"https://api.github.com/users/NinoSkopac/orgs","repos_url":"https://api.github.com/users/NinoSkopac/repos","events_url":"https://api.github.com/users/NinoSkopac/events{/privacy}","received_events_url":"https://api.github.com/users/NinoSkopac/received_events","type":"User","site_admin":false},"assignees":[{"login":"NinoSkopac","id":1783732,"avatar_url":"https://avatars1.githubusercontent.com/u/1783732?v=4","gravatar_id":"","url":"https://api.github.com/users/NinoSkopac","html_url":"https://github.com/NinoSkopac","followers_url":"https://api.github.com/users/NinoSkopac/followers","following_url":"https://api.github.com/users/NinoSkopac/following{/other_user}","gists_url":"https://api.github.com/users/NinoSkopac/gists{/gist_id}","starred_url":"https://api.github.com/users/NinoSkopac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NinoSkopac/subscriptions","organizations_url":"https://api.github.com/users/NinoSkopac/orgs","repos_url":"https://api.github.com/users/NinoSkopac/repos","events_url":"https://api.github.com/users/NinoSkopac/events{/privacy}","received_events_url":"https://api.github.com/users/NinoSkopac/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/PromisePay/promisepay-php/milestones/2","html_url":"https://github.com/PromisePay/promisepay-php/milestone/2","labels_url":"https://api.github.com/repos/PromisePay/promisepay-php/milestones/2/labels","id":2686052,"number":2,"title":"v3.0","description":"","creator":{"login":"NinoSkopac","id":1783732,"avatar_url":"https://avatars1.githubusercontent.com/u/1783732?v=4","gravatar_id":"","url":"https://api.github.com/users/NinoSkopac","html_url":"https://github.com/NinoSkopac","followers_url":"https://api.github.com/users/NinoSkopac/followers","following_url":"https://api.github.com/users/NinoSkopac/following{/other_user}","gists_url":"https://api.github.com/users/NinoSkopac/gists{/gist_id}","starred_url":"https://api.github.com/users/NinoSkopac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NinoSkopac/subscriptions","organizations_url":"https://api.github.com/users/NinoSkopac/orgs","repos_url":"https://api.github.com/users/NinoSkopac/repos","events_url":"https://api.github.com/users/NinoSkopac/events{/privacy}","received_events_url":"https://api.github.com/users/NinoSkopac/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":7,"state":"open","created_at":"2017-08-07T16:54:38Z","updated_at":"2017-11-25T09:07:24Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2017-07-19T15:09:42Z","updated_at":"2017-11-25T09:07:24Z","closed_at":"2017-11-25T09:07:24Z","author_association":"COLLABORATOR","body":"This is a huge BC break and will require a lot of changes in userland for people migration from 2.x to 3.0.\r\n\r\nLet's start a discussion about whether or not we actually want to do this. cc @jeandee \r\n\r\n## What does this mean?\r\nRight now, a call to creating or updating objects is done by passing parameters in an array, like this:\r\n```php\r\n$user = PromisePay::User()->create(array(\r\n    'id'            => 'USER_ID',\r\n    'first_name'    => 'UserCreateTest',\r\n    'last_name'     => 'UserLastname',\r\n    'email'         => 'email@google.com',\r\n    'mobile'        => '5455400012',\r\n    'address_line1' => 'a_line1',\r\n    'address_line2' => 'a_line2',\r\n    'state'         => 'state',\r\n    'city'          => 'city',\r\n    'zip'           => '90210',\r\n    'country'       => 'AUS'\r\n));\r\n```\r\n\r\nA better way would be to do this:\r\n```php\r\n$user = PromisePay::User()->create(\r\n    int $id,\r\n    string $firstName,\r\n    string $lastName,\r\n    string $email,\r\n    int $mobile,\r\n    string $addressLine\r\n    // ... and so on\r\n);\r\n```\r\n\r\n**Pros of the latter approach are:**\r\n- typehinting: users' IDEs can immediately perform static type checking and warn them about improper implementation\r\n- it's immediately obvious which parameters are expected, and in which format\r\n\r\nGET requests and those alike wouldn't be affected by this, for example:\r\n```php\r\n$item = PromisePay::Item()->revertWire('ITEM_ID');\r\n$resolveDispute = PromisePay::Item()->escalateDispute(\r\n    'ITEM_ID'\r\n);\r\n```"}}
{"actor":{"display_login":"NinoSkopac"}}