Наследование: extends Recurly_Resource
Пример #1
0
 public function testRedeemGiftCard()
 {
     $this->client->addResponse('POST', '/gift_cards/AI4VOVO1RC74H9E2/redeem', 'gift_cards/redeem-201.xml');
     $giftCard = new Recurly_GiftCard(null, $this->client);
     $giftCard->redemption_code = 'AI4VOVO1RC74H9E2';
     $giftCard->redeem('myaccount');
     $this->assertInstanceOf('Recurly_Stub', $giftCard->gifter_account);
     $this->assertInstanceOf('Recurly_Delivery', $giftCard->delivery);
 }
Пример #2
0
 protected function uri()
 {
     if (!empty($this->_href)) {
         return $this->getHref();
     } else {
         return Recurly_GiftCard::uriForGiftCard($this->id);
     }
 }