Composable Commerce PHP SDKPHP SDK
  • Namespace
  • Class
  • Tree

Namespaces

  • Commercetools
    • Commons
      • Helper
    • Core
      • Builder
        • Request
        • Update
      • Cache
      • Client
        • Adapter
        • OAuth
      • Error
      • Helper
        • Annotate
        • State
          • Renderer
        • Subscriber
          • Log
      • Model
        • ApiClient
        • Cart
        • CartDiscount
        • Category
        • Channel
        • Common
        • Customer
        • CustomerGroup
        • CustomField
        • CustomObject
        • DiscountCode
        • Extension
        • Inventory
        • Message
        • Order
        • OrderEdit
        • Payment
        • Product
          • Search
        • ProductDiscount
        • ProductSelection
        • ProductType
        • Project
        • Review
        • ShippingMethod
        • ShoppingList
        • State
        • Store
        • Subscription
        • TaxCategory
        • Type
        • Zone
      • Request
        • ApiClients
        • CartDiscounts
          • Command
        • Carts
          • Command
        • Categories
          • Command
        • Channels
          • Command
        • CustomerGroups
          • Command
        • Customers
          • Command
        • CustomField
          • Command
        • CustomObjects
        • DiscountCodes
          • Command
        • Extensions
          • Command
        • GraphQL
        • InStores
        • Inventory
          • Command
        • Me
          • Command
        • Messages
        • OrderEdits
          • Command
          • StagedOrder
            • Command
        • Orders
          • Command
        • Payments
          • Command
        • ProductDiscounts
          • Command
        • Products
          • Command
        • ProductSelections
          • Command
        • ProductTypes
          • Command
        • Project
          • Command
        • Query
        • Reviews
          • Command
        • ShippingMethods
          • Command
        • ShoppingLists
          • Command
        • States
          • Command
        • Stores
          • Command
        • Subscriptions
          • Command
        • TaxCategories
          • Command
        • Types
          • Command
        • Zones
          • Command
      • Response

Classes

  • AbstractApiResponse
  • ErrorResponse
  • PagedQueryResponse
  • PagedSearchResponse
  • ResourceResponse

Interfaces

  • ApiPromiseGetInterface
  • ApiResponseInterface

Class AbstractApiResponse

Commercetools\Core\Response\AbstractApiResponse implements Commercetools\Core\Response\ApiResponseInterface, Commercetools\Core\Model\Common\ContextAwareInterface, Commercetools\Core\Response\ApiPromiseGetInterface uses Commercetools\Core\Model\Common\ContextTrait

Direct known subclasses

Commercetools\Core\Response\ErrorResponse, Commercetools\Core\Response\PagedQueryResponse, Commercetools\Core\Response\ResourceResponse

Indirect known subclasses

Commercetools\Core\Response\PagedSearchResponse

Abstract
Namespace: Commercetools\Core\Response
Located at Core/Response/AbstractApiResponse.php

Methods summary

public
# __construct( Psr\Http\Message\ResponseInterface $response, Commercetools\Core\Request\ClientRequestInterface $request, Commercetools\Core\Model\Common\Context $context = null )

Parameters

$response
$request
$context
public mixed|null
# toObject( )

Returns

mixed|null

Implementation of

Commercetools\Core\Response\ApiResponseInterface::toObject()
public array
# toArray( )

Returns

array

Implementation of

Commercetools\Core\Response\ApiResponseInterface::toArray()
public string
# getBody( )

Returns

string

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getBody()
public boolean
# isError( )

Returns

boolean

Implementation of

Commercetools\Core\Response\ApiResponseInterface::isError()
public Commercetools\Core\Error\ErrorContainer
# getErrors( )

Returns

Commercetools\Core\Error\ErrorContainer

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getErrors()
public string|null
# getCorrelationId( )

Returns

string|null

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getCorrelationId()
public integer
# getStatusCode( )

Returns

integer

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getStatusCode()
public string[]
# getHeader( string $header )

Parameters

$header

Returns

string[]

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getHeader()
public array
# getHeaders( )

Returns

array

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getHeaders()
public Psr\Http\Message\ResponseInterface|Commercetools\Core\Client\Adapter\AdapterPromiseInterface
# getResponse( )

Returns

Psr\Http\Message\ResponseInterface|Commercetools\Core\Client\Adapter\AdapterPromiseInterface

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getResponse()
public Commercetools\Core\Request\ClientRequestInterface
# getRequest( )

Returns

Commercetools\Core\Request\ClientRequestInterface

Implementation of

Commercetools\Core\Response\ApiResponseInterface::getRequest()
public mixed
# wait( )

Returns the result of the future either from cache or by blocking until it is complete.

Returns the result of the future either from cache or by blocking until it is complete.

This method must block until the future has a result or is cancelled. Throwing an exception in the wait() method will mark the future as realized and will throw the exception each time wait() is called. Throwing an instance of GuzzleHttp\Ring\CancelledException will mark the future as realized, will not throw immediately, but will throw the exception if the future's wait() method is called again.

Returns

mixed

Implementation of

Commercetools\Core\Response\ApiResponseInterface::wait()
public Commercetools\Core\Response\ApiResponseInterface
# then( callable $onFulfilled = null, callable $onRejected = null )

Parameters

$onFulfilled
$onRejected

Returns

Commercetools\Core\Response\ApiResponseInterface

Implementation of

Commercetools\Core\Response\ApiResponseInterface::then()
public PromiseInterface|GuzzleHttp\Ring\Future\FutureInterface
# getPromise( )

Returns

PromiseInterface|GuzzleHttp\Ring\Future\FutureInterface
Promise

Inheritdoc

Implementation of

Commercetools\Core\Response\ApiPromiseGetInterface::getPromise()

Methods inherited from Commercetools\Core\Model\Common\ContextAwareInterface

getContext(), getContextCallback(), setContext(), setContextIfNull()

Methods used from Commercetools\Core\Model\Common\ContextTrait

getContext(), getContextCallback(), setContext(), setContextIfNull()

Constants summary

string X_CORRELATION_ID
# 'X-Correlation-ID'
PHP SDK API documentation generated by ApiGen