Наследование: extends Recurly_Resource
Пример #1
0
 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);
 }
Пример #2
0
 public function buildUsage($addOnCode, $client = null)
 {
     return Recurly_Usage::build($this->uuid, $addOnCode, $client);
 }
Пример #3
0
 protected static function uriForUsage($subUuid, $addOnCode, $usageId)
 {
     return Recurly_Usage::uriForUsages($subUuid, $addOnCode) . '/' . rawurlencode($usageId);
 }