/** * @depends testSerializationDeserialization * @param CreditCardList $obj */ public function testGetters($obj) { $this->assertEquals($obj->getItems(), CreditCardTest::getObject()); $this->assertEquals($obj->getLinks(), LinksTest::getObject()); $this->assertEquals($obj->getTotalItems(), 123); $this->assertEquals($obj->getTotalPages(), 123); }
/** * Retrieves a list of Credit Card resources. * * @param array $params * @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 CreditCardList */ public static function all($params, $apiContext = null, $restCall = null) { if (is_null($params)) { $params = array(); } ArgumentValidator::validate($params, 'params'); $payLoad = ""; $allowedParams = array('page_size' => 1, 'page' => 1, 'start_time' => 1, 'end_time' => 1, 'sort_order' => 1, 'sort_by' => 1, 'merchant_id' => 1, 'external_card_id' => 1, 'external_customer_id' => 1, 'total_required' => 1); $json = self::executeCall("/v1/vault/credit-cards" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall); $ret = new CreditCardList(); $ret->fromJson($json); return $ret; }
/** * @depends testSerializationDeserialization * @param CreditCardList $obj */ public function testGetters($obj) { $this->assertEquals($obj->getCreditCards(), CreditCardTest::getObject()); $this->assertEquals($obj->getCount(), 123); $this->assertEquals($obj->getNextId(), "TestSample"); }