public function __construct($response, Environment $environment)
 {
     parent::__construct($response, $environment);
     $this->collection = new Collection(self::$allowedValues, $this->getResponse());
     $responseArray = $this->getResponse();
     if (!empty($responseArray)) {
         $this->recurringPaymentsProfile = RecurringPaymentsProfile::getResponse($responseArray);
         $this->shippingAddress = ShippingAddress::getResponse($responseArray);
         $this->billingPeriod = BillingPeriod::getResponse($responseArray);
         $this->recurringPaymentsSummary = RecurringPaymentsSummary::getResponse($responseArray);
         $this->creditCard = CreditCard::getResponse($responseArray);
         $this->payer = Payer::getResponse($responseArray);
         $this->address = Address::getResponse($responseArray);
     }
 }
 public function getNVPRequest()
 {
     $request = $this->collection->getAllValues();
     if ($this->shippingAddress != null) {
         $request = array_merge($request, $this->shippingAddress->getNVPArray());
     }
     if ($this->billingPeriod != null) {
         $request = array_merge($request, $this->billingPeriod->getNVPArray());
     }
     if ($this->creditCard != null) {
         $request = array_merge($request, $this->creditCard->getNVPArray());
     }
     if ($this->payerInformation != null) {
         $request = array_merge($request, $this->payerInformation->getNVPArray());
     }
     if ($this->address != null) {
         $request = array_merge($request, $this->address->getNVPArray());
     }
     return $request;
 }