Exemplo n.º 1
0
 public function customer()
 {
     if (!isset($this->customer_id)) {
         return false;
     }
     if (!$this->customer_id) {
         return false;
     }
     return Iugu_Customer::fetch($this->customer_id);
 }
Exemplo n.º 2
0
 public function testFetch()
 {
     $object = self::createTestCustomer();
     $customer = Iugu_Customer::fetch($object->id);
     $this->assertNotNull($customer);
     $this->assertNotNull($customer["id"]);
     $this->expectException("IuguObjectNotFound");
     Iugu_Customer::fetch("D245B36FCD4B42DDB44208D868FF2C10");
     $this->assertTrue($object->delete());
 }