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

  • AbstractJsonDeserializeObject
  • Address
  • AddressCollection
  • Asset
  • AssetCollection
  • AssetDimension
  • AssetDraft
  • AssetDraftCollection
  • AssetSource
  • AssetSourceCollection
  • Attribute
  • AttributeCollection
  • CentPrecisionMoney
  • ClientLogging
  • Collection
  • ContainerAndKey
  • Context
  • CreatedBy
  • DateDecorator
  • DateTimeDecorator
  • DiscountedPrice
  • DiscountValue
  • Enum
  • EnumCollection
  • GeoLocation
  • GeoPoint
  • HighPrecisionMoney
  • Image
  • ImageCollection
  • ImageDimension
  • JsonObject
  • KeyReference
  • KeyResourceIdentifier
  • LastModifiedBy
  • LocalizedEnum
  • LocalizedEnumCollection
  • LocalizedString
  • Money
  • MoneyCollection
  • Price
  • PriceCollection
  • PriceDraft
  • PriceDraftCollection
  • PriceTier
  • PriceTierCollection
  • Reference
  • ReferenceCollection
  • Resource
  • ResourceIdentifier
  • ScopedPrice
  • Set
  • TaxedItemPrice
  • TaxedPrice
  • TaxPortion
  • TaxPortionCollection
  • TimeDecorator

Interfaces

  • ContextAwareInterface
  • JsonDeserializeInterface
  • ObjectTreeInterface
  • ReferenceObjectInterface
  • TypeableInterface

Traits

  • ContextTrait
  • LocaleTrait
  • ObjectTreeTrait

Class Price

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\Model\Common\Price
Namespace: Commercetools\Core\Model\Common
API documentation: https://docs.commercetools.com/http-api-projects-products.html#price
Located at Core/Model/Common/Price.php

Methods summary

public static Commercetools\Core\Model\Common\Price
# ofMoney( Commercetools\Core\Model\Common\Money $money, Commercetools\Core\Model\Common\Context|callable $context = null )

Parameters

$money
$context

Returns

Commercetools\Core\Model\Common\Price
public
# __toString( )
public Commercetools\Core\Model\Common\Money
# getCurrentValue( )

Returns

Commercetools\Core\Model\Common\Money

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

__construct(), __get(), hasField(), isOptional()

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

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

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

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

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

parentSet(), rootGet(), rootSet()

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 Commercetools\Core\Model\Common\Money
# getValue( )

Returns

Commercetools\Core\Model\Common\Money
public string
# getCountry( )

Returns

string
public Commercetools\Core\Model\CustomerGroup\CustomerGroupReference
# getCustomerGroup( )

Returns

Commercetools\Core\Model\CustomerGroup\CustomerGroupReference
public Commercetools\Core\Model\Channel\ChannelReference
# getChannel( )

Returns

Commercetools\Core\Model\Channel\ChannelReference
public Commercetools\Core\Model\Common\DiscountedPrice
# getDiscounted( )

Returns

Commercetools\Core\Model\Common\DiscountedPrice
public Commercetools\Core\Model\Common\Price
# setValue( Commercetools\Core\Model\Common\Money $value = null )

Parameters

$value

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\Common\Price
# setCountry( string $country = null )

Parameters

$country

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\Common\Price
# setCustomerGroup( Commercetools\Core\Model\CustomerGroup\CustomerGroupReference $customerGroup = null )

Parameters

$customerGroup

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\Common\Price
# setChannel( Commercetools\Core\Model\Channel\ChannelReference $channel = null )

Parameters

$channel

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\Common\Price
# setDiscounted( Commercetools\Core\Model\Common\DiscountedPrice $discounted = null )

Parameters

$discounted

Returns

Commercetools\Core\Model\Common\Price
public string
# getId( )

Returns

string
public Commercetools\Core\Model\Common\Price
# setId( string $id = null )

Parameters

$id

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\Common\DateTimeDecorator
# getValidFrom( )

Returns

Commercetools\Core\Model\Common\DateTimeDecorator
public Commercetools\Core\Model\Common\Price
# setValidFrom( DateTime $validFrom = null )

Parameters

$validFrom

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\Common\DateTimeDecorator
# getValidUntil( )

Returns

Commercetools\Core\Model\Common\DateTimeDecorator
public Commercetools\Core\Model\Common\Price
# setValidUntil( DateTime $validUntil = null )

Parameters

$validUntil

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\CustomField\CustomFieldObject
# getCustom( )

Returns

Commercetools\Core\Model\CustomField\CustomFieldObject
public Commercetools\Core\Model\Common\Price
# setCustom( Commercetools\Core\Model\CustomField\CustomFieldObject $custom = null )

Parameters

$custom

Returns

Commercetools\Core\Model\Common\Price
public Commercetools\Core\Model\Common\PriceTierCollection
# getTiers( )

Returns

Commercetools\Core\Model\Common\PriceTierCollection
public Commercetools\Core\Model\Common\Price
# setTiers( Commercetools\Core\Model\Common\PriceTierCollection $tiers = null )

Parameters

$tiers

Returns

Commercetools\Core\Model\Common\Price

Constants summary

string ID
# 'id'
string VALUE
# 'value'
string COUNTRY
# 'country'
string CUSTOMER_GROUP
# 'customerGroup'
string CHANNEL
# 'channel'
string VALID_FROM
# 'validFrom'
string VALID_UNTIL
# 'validUntil'
string DISCOUNTED
# 'discounted'
string CUSTOM
# 'custom'
string TIERS
# 'tiers'

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