예제 #1
0
 public function testGetCustomer()
 {
     $createResponse = $this->customers->createCustomer();
     $getResponse = $this->customers->getCustomer($createResponse->getId());
     $this->assertInstanceOf(Customers::CUSTOMER_RESPONSE_CLASS, $getResponse);
     $this->assertEquals($createResponse->getId(), $getResponse->getId());
     $this->client->delete('customers/' . $getResponse->getId());
 }
예제 #2
0
 public function testDeleteCustomerDiscount()
 {
     $this->customers->updateCustomer($this->customerId, $this->customers->updateCustomerRequest()->setCoupon($this->couponId));
     $getResponse = $this->customers->getCustomer($this->customerId);
     $this->assertEquals($this->couponId, $getResponse->getDiscount()->getCoupon()->getId());
     $deleteResponse = $this->discounts->deleteCustomerDiscount($this->customerId);
     $this->assertInstanceOf(Discounts::DELETE_RESPONSE_CLASS, $deleteResponse);
     $this->assertTrue($deleteResponse->getDeleted());
 }