/**
  * Tests the population of a billing address for the Address Verification Service.
  */
 public function testAddAddressVerificationServiceDetailsWithTssInfo()
 {
     $addressLine = "123 Fake St";
     $postcode = "WB1 A42";
     $country = "";
     $expectedBillingCode = "142|123";
     $request = new PaymentRequest();
     $request->addTssInfo(new TssInfo())->addAddressVerificationServiceDetails($addressLine, $postcode, $country);
     $addresses = $request->getTssInfo()->getAddresses();
     $this->assertEquals($expectedBillingCode, $addresses[0]->getCode());
     $this->assertEquals(AddressType::BILLING, $addresses[0]->getType());
     $this->assertEquals($country, $addresses[0]->getCountry());
 }
 private function tss_is_empty(PaymentRequest $request)
 {
     return $request->getTssInfo()->getCustomerNumber() == null && $request->getTssInfo()->getProductId() == null && $request->getTssInfo()->getVariableReference() == null && $request->getTssInfo()->getCustomerIpAddress() == null && $request->getTssInfo()->getAddresses() == null;
 }