/** * @param int $totalCount * @param CredentialResponseItem[] $items */ private function __construct($totalCount, array $items) { Assert::integer($totalCount); Assert::isArray($items); Assert::allIsInstanceOf($items, 'Mailgun\\Resource\\Api\\Domain\\CredentialResponseItem'); $this->totalCount = $totalCount; $this->items = $items; }
/** * Returns a list of SMTP credentials for the specified domain. * * @param string $domain Name of the domain. * @param int $limit Number of credentials to return * @param int $skip Number of credentials to omit from the list * * @return CredentialResponse */ public function credentials($domain, $limit = 100, $skip = 0) { Assert::stringNotEmpty($domain); Assert::integer($limit); Assert::integer($skip); $params = ['limit' => $limit, 'skip' => $skip]; $response = $this->httpGet(sprintf('/v3/domains/%s/credentials', $domain), $params); return $this->safeDeserialize($response, CredentialResponse::class); }