コード例 #1
0
 /**
  * @param array $response
  * @return TpDataApiGetPaymentStateResponse
  */
 public static function createFromResponse(array $response)
 {
     /** @var TpDataApiGetPaymentStateResponse $instance */
     $instance = parent::createFromResponse($response);
     $instance->setState($response['state']);
     return $instance;
 }
コード例 #2
0
 /**
  * @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;
 }
コード例 #3
0
 /**
  * @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;
 }
コード例 #4
0
 /**
  * @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;
 }
コード例 #5
0
 /**
  * @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;
 }