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();
     $request = array_merge($request, $this->schedule->getNVPArray(), $this->billingPeriod->getNVPArray(), $this->profile->getNVPArray());
     if ($this->activation != null) {
         $request = array_merge($request, $this->activation->getNVPArray());
     }
     if ($this->shippingAddress != null) {
         $request = array_merge($request, $this->shippingAddress->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->payerName != null) {
         $request = array_merge($request, $this->payerName->getNVPArray());
     }
     if ($this->address != null) {
         $request = array_merge($request, $this->address->getNVPArray());
     }
     return $request;
 }