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

  • MyCartAddLineItemAction

Class MyCartAddLineItemAction

Commercetools\Core\Model\Common\AbstractJsonDeserializeObject implements Commercetools\Core\Model\Common\JsonDeserializeInterface, Commercetools\Core\Model\Common\ObjectTreeInterface uses Commercetools\Core\Model\Common\ObjectTreeTrait
Extended by Commercetools\Core\Model\Common\JsonObject implements JsonSerializable uses Commercetools\Core\Model\Common\ContextTrait
Extended by Commercetools\Core\Request\AbstractAction
Extended by Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
Namespace: Commercetools\Core\Request\Me\Command
API documentation: https://docs.commercetools.com/api/projects/me-carts#add-lineitem
Located at Core/Request/Me/Command/MyCartAddLineItemAction.php

Methods summary

public
# __construct( array $data = [], Commercetools\Core\Model\Common\Context|callable $context = null )

Parameters

$data
$context

Overrides

Commercetools\Core\Model\Common\JsonObject::__construct
public static Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# ofProductIdVariantIdAndQuantity( string $productId, integer $variantId, Commercetools\Core\Model\Common\Context|callable $quantity, integer $context = null )

Parameters

$productId
$variantId
$quantity
$context
$context
$quantity

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction

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

__get(), hasField(), isOptional()

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

__sleep(), fromArray(), jsonSerialize(), of(), toArray()

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

parentSet(), rootGet(), rootSet()

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

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

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

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

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

parentSet(), rootGet(), rootSet()

Magic methods summary

public string
# getAction( )

Returns

string
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setAction( string $action = null )

Parameters

$action

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public string
# getProductId( )

Returns

string
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setProductId( string $productId = null )

Parameters

$productId

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public integer
# getVariantId( )

Returns

integer
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setVariantId( integer $variantId = null )

Parameters

$variantId

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public integer
# getQuantity( )

Returns

integer
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setQuantity( integer $quantity = null )

Parameters

$quantity

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public Commercetools\Core\Model\Channel\ChannelReference
# getSupplyChannel( )

Returns

Commercetools\Core\Model\Channel\ChannelReference
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setSupplyChannel( Commercetools\Core\Model\Channel\ChannelReference $supplyChannel = null )

Parameters

$supplyChannel

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public Commercetools\Core\Model\Channel\ChannelReference
# getDistributionChannel( )

Returns

Commercetools\Core\Model\Channel\ChannelReference
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setDistributionChannel( Commercetools\Core\Model\Channel\ChannelReference $distributionChannel = null )

Parameters

$distributionChannel

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public Commercetools\Core\Model\CustomField\CustomFieldObjectDraft
# getCustom( )

Returns

Commercetools\Core\Model\CustomField\CustomFieldObjectDraft
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setCustom( Commercetools\Core\Model\CustomField\CustomFieldObjectDraft $custom = null )

Parameters

$custom

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public Commercetools\Core\Model\Cart\ItemShippingDetailsDraft
# getShippingDetails( )

Returns

Commercetools\Core\Model\Cart\ItemShippingDetailsDraft
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setShippingDetails( Commercetools\Core\Model\Cart\ItemShippingDetailsDraft $shippingDetails = null )

Parameters

$shippingDetails

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public DateTime
# getAddedAt( )

Returns

DateTime
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setAddedAt( DateTime $addedAt = null )

Parameters

$addedAt

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public string
# getSku( )

Returns

string
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setSku( string $sku = null )

Parameters

$sku

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft
# getExternalTaxRate( )

Returns

Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setExternalTaxRate( Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft $externalTaxRate = null )

Parameters

$externalTaxRate

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public Commercetools\Core\Model\Common\Money
# getExternalPrice( )

Returns

Commercetools\Core\Model\Common\Money
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setExternalPrice( Commercetools\Core\Model\Common\Money $externalPrice = null )

Parameters

$externalPrice

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
public Commercetools\Core\Model\Cart\ExternalLineItemTotalPrice
# getExternalTotalPrice( )

Returns

Commercetools\Core\Model\Cart\ExternalLineItemTotalPrice
public Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction
# setExternalTotalPrice( Commercetools\Core\Model\Cart\ExternalLineItemTotalPrice $externalTotalPrice = null )

Parameters

$externalTotalPrice

Returns

Commercetools\Core\Request\Me\Command\MyCartAddLineItemAction

Constants summary

Constants inherited from Commercetools\Core\Model\Common\JsonObject

DECORATOR, ELEMENT_TYPE, INITIALIZED, OPTIONAL, TYPE

Constants inherited from Commercetools\Core\Model\Common\AbstractJsonDeserializeObject

JSON_DESERIALIZE_INTERFACE, TYPEABLE_INTERFACE

PHP SDK API documentation generated by ApiGen