CommonAPIResponse.php

zcrm-php-sdk · crm, http-response, json-parsing, error-extraction

CRM API response handler that extracts and processes HTTP status codes, JSON payloads, headers, and error details from API calls.

<?php
namespace zcrmsdk\crm\api\response;

use zcrmsdk\crm\utility\APIConstants;
use zcrmsdk\crm\exception\APIExceptionHandler;

class CommonAPIResponse
{
    
    /**
     * http status code
     *
     * @var int
     */
    private $httpStatusCode = null;
    
    /**
     * response Json
     *
     * @var object
     */
    private $responseJSON = null;
    
    /**
     * response headers
     *
     * @var array
     */
    private $responseHeaders = null;
    
    /**
     * response code
     *
     * @var string
     */
    private $code = null;
    
    /**
     * response message
     *
     * @var string
     */
    private $message = null;
    
    /**
     * response details
     *
     * @var array
     */
    private $details = null;
    
    /**
     * the entire response

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key