/**
  * @param stdClass $response
  *
  * @return Payment
  */
 private function createPaymentFromResponse(stdClass $response)
 {
     $payment = new Payment();
     $payment->setShortReference($response->short_reference)->setBeneficiaryId($response->beneficiary_id)->setConversionId($response->conversion_id)->setAmount($response->amount)->setCurrency($response->currency)->setStatus($response->status)->setPaymentType($response->payment_type)->setReference($response->reference)->setReason($response->reason)->setPaymentDate(new DateTime($response->payment_date))->setTransferredAt(new DateTime($response->transferred_at))->setAuthorisationStepsRequired($response->authorisation_steps_required)->setCreatorContactId($response->creator_contact_id)->setLastUpdaterContactId($response->last_updater_contact_id)->setFailureReason($response->failure_reason)->setPayerId($response->payer_id)->setPayerDetailsSource($response->payer_details_source)->setCreatedAt(new DateTime($response->created_at))->setUpdatedAt(new DateTime($response->updated_at));
     $this->setIdProperty($payment, $response->id);
     return $payment;
 }