public function testCreateMappingServiceTest()
 {
     $createRequest = new \CreateMappingRequest();
     $address = new \Address();
     $createRequest->setICA("009674");
     $createRequest->setSubscriberId("*****@*****.**");
     $createRequest->setSubscriberType("EMAIL_ADDRESS");
     $createRequest->setAccountUsage("SENDING");
     $createRequest->setAccountNumber("5184680430000006");
     $createRequest->setDefaultIndicator("T");
     $createRequest->setExpiryDate(201409);
     $createRequest->setAlias("My Debit Card");
     $createRequest->setAddress($address);
     $createRequest->getAddress()->setLine1("123 Main Street");
     $createRequest->getAddress()->setLine2("#5A");
     $createRequest->getAddress()->setCity("OFallon");
     $createRequest->getAddress()->setCountrySubdivision("MO");
     $createRequest->getAddress()->setCountry("USA");
     $createRequest->getAddress()->setPostalCode(63368);
     $createRequest->setCardholderFullName(new CardholderFullName());
     $createRequest->getCardholderFullName()->setCardholderFirstName("John");
     $createRequest->getCardholderFullName()->setCardholderMiddleName("Q");
     $createRequest->getCardholderFullName()->setCardholderLastName("Public");
     $createRequest->setDateOfBirth(19460102);
     $createMapping = $this->cardMappingService->getCreateMapping($createRequest);
     $this->assertTrue($createMapping->getRequestId() != null && $createMapping->getRequestId() > 0);
     $this->assertTrue($createMapping->getMapping()->getMappingId() > 0);
 }
 private function generateCreateMappingXML(CreateMappingRequest $request)
 {
     $xml = null;
     $xml = "<CreateMappingRequest>";
     $xml .= "<SubscriberId>" . $request->getSubscriberId() . "</SubscriberId>";
     $xml .= "<SubscriberType>" . $request->getSubscriberType() . "</SubscriberType>";
     $xml .= "<AccountUsage>" . $request->getAccountUsage() . "</AccountUsage>";
     $xml .= "<DefaultIndicator>" . $request->getDefaultIndicator() . "</DefaultIndicator>";
     $xml .= "<Alias>" . $request->getAlias() . "</Alias>";
     $xml .= "<ICA>" . $request->getICA() . "</ICA>";
     $xml .= "<AccountNumber>" . $request->getAccountNumber() . "</AccountNumber>";
     $xml .= "<ExpiryDate>" . $request->getExpiryDate() . "</ExpiryDate>";
     $xml .= "<CardholderFullName>";
     $xml .= "<CardholderFirstName>" . $request->getCardholderFullName()->getCardholderFirstName() . "</CardholderFirstName>";
     $xml .= "<CardholderMiddleName>" . $request->getCardholderFullName()->getCardholderMiddleName() . "</CardholderMiddleName>";
     $xml .= "<CardholderLastName>" . $request->getCardholderFullName()->getCardholderLastName() . "</CardholderLastName>";
     $xml .= "</CardholderFullName>";
     $xml .= "<Address>";
     $xml .= "<Line1>" . $request->getAddress()->getLine1() . "</Line1>";
     $xml .= "<Line2>" . $request->getAddress()->getLine2() . "</Line2>";
     $xml .= "<City>" . $request->getAddress()->getCity() . "</City>";
     $xml .= "<CountrySubdivision>" . $request->getAddress()->getCountrySubdivision() . "</CountrySubdivision>";
     $xml .= "<PostalCode>" . $request->getAddress()->getPostalCode() . "</PostalCode>";
     $xml .= "<Country>" . $request->getAddress()->getCountry() . "</Country>";
     $xml .= "</Address>";
     $xml .= "<DateOfBirth>" . $request->getDateOfBirth() . "</DateOfBirth>";
     $xml .= "</CreateMappingRequest>";
     return $xml;
 }