lehresman/spreedly-php — pull request #9 by peteyhawkins (2012-05-11 09:58:28+00:00)
Title: Add method to change subscription

Have added a method to allow you to change subscription. Unfortunately I don't have time right now to add a unit test for this. Up to you if you want to do it?

```php
Subscription plan successfully changed. [code] => 200 )
*
* http://spreedly.com/manual/integration-reference/change-subscriber-subscription-plan
*/
public static function change_subscription_plan($subscription_id, $subscriber_id) {
// Build up subscription plan xml
$obj = new StdClass();
$obj->subscription_plan = new StdClass();
$obj->subscription_plan->id = $subscription_id;
$xml = Spreedly::__to_xml_params($obj);

// Run the spreedly call
return Spreedly::__curl_request("/subscribers/$subscriber_id/change_subscription_plan.xml", "put", $xml);
}
```