{"action":"closed","issue":{"url":"https://api.github.com/repos/mollie/mollie-api-php/issues/245","repository_url":"https://api.github.com/repos/mollie/mollie-api-php","labels_url":"https://api.github.com/repos/mollie/mollie-api-php/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/mollie/mollie-api-php/issues/245/comments","events_url":"https://api.github.com/repos/mollie/mollie-api-php/issues/245/events","html_url":"https://github.com/mollie/mollie-api-php/issues/245","id":348201135,"node_id":"MDU6SXNzdWUzNDgyMDExMzU=","number":245,"title":"Add cancel() method to Subscription resource","user":{"login":"sandervanhooft","id":7265703,"node_id":"MDQ6VXNlcjcyNjU3MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/7265703?v=4","gravatar_id":"","url":"https://api.github.com/users/sandervanhooft","html_url":"https://github.com/sandervanhooft","followers_url":"https://api.github.com/users/sandervanhooft/followers","following_url":"https://api.github.com/users/sandervanhooft/following{/other_user}","gists_url":"https://api.github.com/users/sandervanhooft/gists{/gist_id}","starred_url":"https://api.github.com/users/sandervanhooft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandervanhooft/subscriptions","organizations_url":"https://api.github.com/users/sandervanhooft/orgs","repos_url":"https://api.github.com/users/sandervanhooft/repos","events_url":"https://api.github.com/users/sandervanhooft/events{/privacy}","received_events_url":"https://api.github.com/users/sandervanhooft/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T07:32:00Z","updated_at":"2018-08-15T08:46:53Z","closed_at":"2018-08-15T08:46:53Z","author_association":"CONTRIBUTOR","body":"## Specifications\r\n\r\n  - API Version: v2\r\n  - Client Version: v2.0.10\r\n\r\n## Describe the issue\r\nSubscription resource currently has no `cancel` method. The only way(?) to cancel a Subscription is by calling `cancelSubscription(id)` on the Customer.\r\n\r\nBut in the use case below it's more convenient to have a cancel method on the Subscription resource as well:\r\n\r\n```php\r\n$subscriptions = mollie()->customers()->get('cst_f4vKQMPpCC')->subscriptions();\r\nforeach ($subscriptions as $subscription) {\r\n    // now\r\n    $customer->cancelSubscription($subscription->id);\r\n\r\n    // preferred\r\n    $subscription->cancel();\r\n}\r\n```"}}
{"actor":{"display_login":"sandervanhooft"}}