Esempio n. 1
0
 public function testSerializeDeserialize()
 {
     $o1 = $this->order;
     $o2 = new Order();
     $o2->fromJson($o1->toJson());
     $this->assertEquals($o1, $o2);
 }
Esempio n. 2
0
 /**
  * Retrieve details about an order by passing the order_id in the request URI.
  *
  * @param string         $orderId
  * @param ApiContext     $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall   is the Rest Call Service that is used to make rest calls
  * @return Order
  */
 public static function get($orderId, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($orderId, 'orderId');
     $payLoad = "";
     $json = self::executeCall("/v1/payments/orders/{$orderId}", "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new Order();
     $ret->fromJson($json);
     return $ret;
 }