{"action":"created","issue":{"url":"https://api.github.com/repos/cwmiller/broadworks-connector/issues/41","repository_url":"https://api.github.com/repos/cwmiller/broadworks-connector","labels_url":"https://api.github.com/repos/cwmiller/broadworks-connector/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/cwmiller/broadworks-connector/issues/41/comments","events_url":"https://api.github.com/repos/cwmiller/broadworks-connector/issues/41/events","html_url":"https://github.com/cwmiller/broadworks-connector/issues/41","id":415270898,"node_id":"MDU6SXNzdWU0MTUyNzA4OTg=","number":41,"title":"setAuthorizedQuantity","user":{"login":"TwinMist","id":3426251,"node_id":"MDQ6VXNlcjM0MjYyNTE=","avatar_url":"https://avatars3.githubusercontent.com/u/3426251?v=4","gravatar_id":"","url":"https://api.github.com/users/TwinMist","html_url":"https://github.com/TwinMist","followers_url":"https://api.github.com/users/TwinMist/followers","following_url":"https://api.github.com/users/TwinMist/following{/other_user}","gists_url":"https://api.github.com/users/TwinMist/gists{/gist_id}","starred_url":"https://api.github.com/users/TwinMist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TwinMist/subscriptions","organizations_url":"https://api.github.com/users/TwinMist/orgs","repos_url":"https://api.github.com/users/TwinMist/repos","events_url":"https://api.github.com/users/TwinMist/events{/privacy}","received_events_url":"https://api.github.com/users/TwinMist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-02-27T18:43:36Z","updated_at":"2019-03-07T00:48:54Z","closed_at":null,"author_association":"NONE","body":"Hi is there a way within the request, if the setquantity($total) is not set then use ->setUnlimited(true) and vise versa?\r\nthanks.\r\n$request = (new GroupServiceModifyAuthorizationListRequest())\r\n\t\t\t\t->setServiceProviderId($serviceProviderId)\r\n\t\t\t\t->setGroupId($groupId)\r\n\t\t\t\t->setServicePackAuthorization([\r\n\t\t\t\t\t(new ServicePackAuthorization())\r\n\t\t\t\t\t\t->setServicePackName($service)\r\n\t\t\t\t\t\t->setAuthorizedQuantity(\r\n\t\t\t\t\t\t\t(new UnboundedPositiveInt())\r\n\t\t\t\t\t\t\t\t->setquantity($total)),"},"comment":{"url":"https://api.github.com/repos/cwmiller/broadworks-connector/issues/comments/470337293","html_url":"https://github.com/cwmiller/broadworks-connector/issues/41#issuecomment-470337293","issue_url":"https://api.github.com/repos/cwmiller/broadworks-connector/issues/41","id":470337293,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MDMzNzI5Mw==","user":{"login":"cwmiller","id":3728286,"node_id":"MDQ6VXNlcjM3MjgyODY=","avatar_url":"https://avatars0.githubusercontent.com/u/3728286?v=4","gravatar_id":"","url":"https://api.github.com/users/cwmiller","html_url":"https://github.com/cwmiller","followers_url":"https://api.github.com/users/cwmiller/followers","following_url":"https://api.github.com/users/cwmiller/following{/other_user}","gists_url":"https://api.github.com/users/cwmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/cwmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwmiller/subscriptions","organizations_url":"https://api.github.com/users/cwmiller/orgs","repos_url":"https://api.github.com/users/cwmiller/repos","events_url":"https://api.github.com/users/cwmiller/events{/privacy}","received_events_url":"https://api.github.com/users/cwmiller/received_events","type":"User","site_admin":false},"created_at":"2019-03-07T00:48:54Z","updated_at":"2019-03-07T00:48:54Z","author_association":"OWNER","body":"You can just pass an instance of UnboundedPositiveInt that you create ahead of time.\r\n\r\n```php\r\n$total = 'Unlimited'; // or 100\r\n$unboundedPositiveInt = new UnboundedPositiveInt();\r\nif ($total === 'Unlimited') {\r\n    $unboundedPositiveInt->setUnlimited(true);\r\n} else {\r\n    $unboundedPositiveInt->setQuantity($total);\r\n}\r\n\r\n$request = (new GroupServiceModifyAuthorizationListRequest())\r\n    ->setServiceProviderId($serviceProviderId)\r\n    ->setGroupId($groupId)\r\n    ->setServicePackAuthorization([\r\n        (new ServicePackAuthorization())\r\n            ->setServicePackName($service)\r\n            ->setAuthorizedQuantity($unboundedPositiveInt)\r\n    ]);\r\n\r\n\r\n"}}
{"actor":{"display_login":"cwmiller"}}