/** * @param array $response * @return TpDataApiGetPaymentStateResponse */ public static function createFromResponse(array $response) { /** @var TpDataApiGetPaymentStateResponse $instance */ $instance = parent::createFromResponse($response); $instance->setState($response['state']); return $instance; }
/** * @param array $response * @return TpDataApiGetPaymentInstructionsResponse */ public static function createFromResponse(array $response) { /** @var TpDataApiGetPaymentInstructionsResponse $instance */ $instance = parent::createFromResponse($response); $paymentInfo = new TpDataApiPaymentInfo($response['paymentInfo']); $instance->setPaymentInfo($paymentInfo); return $instance; }
/** * @param array $response * @return TpDataApiGetPaymentResponse */ public static function createFromResponse(array $response) { /** @var TpDataApiGetPaymentResponse $instance */ $instance = parent::createFromResponse($response); $payment = new \dlds\thepay\api\dataApi\parameters\TpDataApiPayment($response['payment']); $instance->setPayment($payment); return $instance; }
/** * @param array $response * @return TpDataApiGetPaymentMethodsResponse */ public static function createFromResponse(array $response) { /** @var TpDataApiGetPaymentMethodsResponse $instance */ $instance = parent::createFromResponse($response); $instance->setAccountId($response['accountId']); $methods = array(); foreach ($response['methods'] as $method) { $methods[] = new TpDataApiMerchantAccountMethod($method); } unset($method); $instance->setMethods($methods); return $instance; }
/** * @param array $response * @return TpDataApiGetPaymentsResponse */ public static function createFromResponse(array $response) { /** @var TpDataApiGetPaymentsResponse $instance */ $instance = parent::createFromResponse($response); $payments = array(); foreach ($response['payments'] as $payment) { $payments[] = new TpDataApiPayment($payment); } unset($payment); $instance->setPayments($payments); $pagination = new TpDataApiPaginationResponse($response['pagination']); $instance->setPagination($pagination); return $instance; }