@param string $avatarUuid
@param string[] $customHeaders

@return BunqResponseAvatar
497343
public static function get(string $avatarUuid, array $customHeaders = []): BunqResponseAvatar
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [$avatarUuid]
            ),
            [],
            $customHeaders
        );

        return BunqResponseAvatar::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
1280218
public static function get(int $cardId, array $customHeaders = []): BunqResponseCard
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $cardId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseCard::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
1299301
public static function get(
        int $credentialPasswordIpId,
        int $permittedIpId,
        array $customHeaders = []
    ): BunqResponsePermittedIp {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $credentialPasswordIpId, $permittedIpId]
            ),
            [],
            $customHeaders
        );

        return BunqResponsePermittedIp::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
892251
def get(cls, payment_service_provider_credential_id, custom_headers=None):
        

        if custom_headers is None:
            custom_headers = {}

        api_client = client.ApiClient(cls._get_api_context())
        endpoint_url = cls._ENDPOINT_URL_READ.format(
            payment_service_provider_credential_id)
        response_raw = api_client.get(endpoint_url, {}, custom_headers)

        return BunqResponsePaymentServiceProviderCredential.cast_from_bunq_response(
            cls._from_json(response_raw, cls._OBJECT_TYPE_GET)
        )
172119
private function encode($lifetime, $customPayload = null)
    {
        $time    = time();
        $payload = ['iat' => $time];

        if (null !== $customPayload) {
            $payload = array_merge($customPayload, $payload);
        }

        $jti = md5(json_encode($payload));

        $payload['jti'] = $jti;

        if (null !== $this->localId) {
            $payload['aud'] = $this->localId;
        }

        if (null !== $lifetime) {
            $payload['exp'] = ($time + $lifetime);
        }

        $jwt = \JWT::encode($payload, $this->secret);

        return $jwt;
    }
42342
public static function create(array $certificateChain, array $customHeaders = []): BunqResponseInt
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId()]
            ),
            [self::FIELD_CERTIFICATE_CHAIN => $certificateChain],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
291189
public static function create(int $cardId, string $type = null, array $customHeaders = []): BunqResponseInt
    {
        $apiClient = new ApiClient(static::getApiContext());
        $apiClient->enableEncryption();
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), $cardId]
            ),
            [self::FIELD_TYPE => $type],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
904233
public static function get(int $eventId, array $customHeaders = []): BunqResponseEvent
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $eventId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseEvent::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
960136
public static function update(
        int $scheduleId,
        int $scheduleInstanceId,
        int $monetaryAccountId = null,
        string $state = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->put(
            vsprintf(
                self::ENDPOINT_URL_UPDATE,
                [
                    static::determineUserId(),
                    static::determineMonetaryAccountId($monetaryAccountId),
                    $scheduleId,
                    $scheduleInstanceId,
                ]
            ),
            [self::FIELD_STATE => $state],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
1082023
public static function get(int $certificatePinnedId, array $customHeaders = []): BunqResponseCertificatePinned
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $certificatePinnedId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseCertificatePinned::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
1049682
public function getHeaders($listUuid)
    {
        return $this->client->hgetall($listUuid.self::SEPARATOR.self::HEADERS);
    }
915570
protected function newAPIRequest_POST_UUID_addresses($parameters, $uuids, $options)
    {
        $wallet_uuid = $uuids[0];

        $wallet = self::$WALLET_STORE[$wallet_uuid] ?? null;
        $chain = ($wallet ? $wallet['chain'] : 'bitcoin');
        $addresses = self::$ADDRESS_STORE[$wallet_uuid] ?? [];

        // build an address
        $count = count($addresses);
        $address = self::sampleAddress($chain, $count);

        $address_model = [
            'index' => $count,
            'address' => $address,
            'change' => false,
            'uuid' => Uuid::uuid4()->toString(),
        ];

        // save address
        $addresses[] = $address_model;
        self::$ADDRESS_STORE[$wallet_uuid] = $addresses;

        // return address
        return $address_model;
    }
999870
public function show($uuid)
    {
        $response = $this->httpClient->get($this->getResourceUrl($uuid));

        return ContainerResponse::createFromHttpResponse($response);
    }
1076518
public function head($url, array $customHeaders = [])
    {
        return $this->handleFailover(function() use ($url, $customHeaders) {
            $response = $this->executeRequest(HttpHelper::METHOD_HEAD, $url, '', $customHeaders);

            return $this->parseResponse($response);
        });
    }
688038
protected function getHeaders(array $customHeaders = array())
    {
        $timestamp = $this->getTimestamp();
        
        $subject = trim($this->subject);
        $subject = str_replace(array("\n", "\r"), '', $subject);
        
        $to = $cc = $bcc = array();
        foreach ($this->to as $email => $name) {
            $to[] = trim($name.' <'.$email.'>');
        }
        
        foreach ($this->cc as $email => $name) {
            $cc[] = trim($name.' <'.$email.'>');
        }
        
        foreach ($this->bcc as $email => $name) {
            $bcc[] = trim($name.' <'.$email.'>');
        }
        
        list($account, $suffix) = explode('@', $this->username);
        
        $headers = array(
            'Date'          => $timestamp,
            'Subject'       => $subject,
            'From'          => '<'.$this->username.'>',
            'To'            => implode(', ', $to)
        );
        
        if (!empty($cc)) {
            $headers['Cc'] = implode(', ', $cc);
        }
        
        if (!empty($bcc)) {
            $headers['Bcc'] = implode(', ', $bcc);
        }
        
        $headers['Message-ID']  = '<'.md5(uniqid(time())).'.wslimphp@'.$suffix.'>';
        
        $headers['Thread-Topic'] = $this->subject;
        
        $headers['Reply-To'] = '<'.$this->username.'>';
        
        foreach ($customHeaders as $key => $value) {
            $key = explode('-', $key);
            $key = implode('-', array_map(function ($value) {
                return ucfirst(strtolower($value));
            }, $key));
                $headers[$key] = $value;
        }
        
        return $headers;
    }
138729
public static function get(
        int $paymentServiceProviderCredentialId,
        array $customHeaders = []
    ): BunqResponsePaymentServiceProviderCredential {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [$paymentServiceProviderCredentialId]
            ),
            [],
            $customHeaders
        );

        return BunqResponsePaymentServiceProviderCredential::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
128495
private static function createInstanceFromResponseArray(array $responseArray): BunqModel
    {
        $classDefinition = new \ReflectionClass(static::class);
        /** @var BunqModel $instance */
        $instance = $classDefinition->newInstanceWithoutConstructor();

        foreach ($responseArray as $fieldNameRaw => $contents) {
            $fieldName = static::determineResponseFieldName($fieldNameRaw);

            if ($classDefinition->hasProperty($fieldName)) {
                $property = $classDefinition->getProperty($fieldName);
                $instance->{$fieldName} = static::determineFieldContents($property, $contents);
            }
        }

        return $instance;
    }