public function testCreateUsage() { $this->client->addResponse('POST', '/subscriptions/012345678901234567890123456789ab/add_ons/marketing_emails/usage', 'usage/create-201.xml'); $usage = Recurly_Usage::build('012345678901234567890123456789ab', 'marketing_emails', $this->client); $usage->create(); $this->assertInstanceOf('Recurly_Usage', $usage); $this->assertInstanceOf('Recurly_Stub', $usage->measured_unit); }
public function buildUsage($addOnCode, $client = null) { return Recurly_Usage::build($this->uuid, $addOnCode, $client); }
protected static function uriForUsage($subUuid, $addOnCode, $usageId) { return Recurly_Usage::uriForUsages($subUuid, $addOnCode) . '/' . rawurlencode($usageId); }