commercetools-sdk-php-v2
master
The platform, import-api and ml-api PHP sdks generated from our api reference.
|
Public Attributes | |
const | FIELD_CURRENCY = 'currency' |
const | FIELD_KEY = 'key' |
const | FIELD_CUSTOMER_ID = 'customerId' |
const | FIELD_CUSTOMER_EMAIL = 'customerEmail' |
const | FIELD_CUSTOMER_GROUP = 'customerGroup' |
const | FIELD_ANONYMOUS_ID = 'anonymousId' |
const | FIELD_BUSINESS_UNIT = 'businessUnit' |
const | FIELD_STORE = 'store' |
const | FIELD_LINE_ITEMS = 'lineItems' |
const | FIELD_CUSTOM_LINE_ITEMS = 'customLineItems' |
const | FIELD_TAX_MODE = 'taxMode' |
const | FIELD_EXTERNAL_TAX_RATE_FOR_SHIPPING_METHOD = 'externalTaxRateForShippingMethod' |
const | FIELD_TAX_ROUNDING_MODE = 'taxRoundingMode' |
const | FIELD_TAX_CALCULATION_MODE = 'taxCalculationMode' |
const | FIELD_INVENTORY_MODE = 'inventoryMode' |
const | FIELD_BILLING_ADDRESS = 'billingAddress' |
const | FIELD_SHIPPING_ADDRESS = 'shippingAddress' |
const | FIELD_SHIPPING_METHOD = 'shippingMethod' |
const | FIELD_SHIPPING_RATE_INPUT = 'shippingRateInput' |
const | FIELD_SHIPPING_MODE = 'shippingMode' |
const | FIELD_CUSTOM_SHIPPING = 'customShipping' |
const | FIELD_SHIPPING = 'shipping' |
const | FIELD_ITEM_SHIPPING_ADDRESSES = 'itemShippingAddresses' |
const | FIELD_DISCOUNT_CODES = 'discountCodes' |
const | FIELD_COUNTRY = 'country' |
const | FIELD_LOCALE = 'locale' |
const | FIELD_ORIGIN = 'origin' |
const | FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification' |
const | FIELD_CUSTOM = 'custom' |
Additional Inherited Members | |
Static Public Member Functions inherited from Commercetools\Base\JsonObject | |
static | of ($data=null) |
static | fromArray (array $data=[]) |
static | fromStdClass (stdClass $data=null) |
Definition at line 21 of file CartDraft.php.
Commercetools\Api\Models\Cart\CartDraft::getAnonymousId | ( | ) |
Anonymous session associated with the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getBillingAddress | ( | ) |
Billing address associated with the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getBusinessUnit | ( | ) |
ResourceIdentifier to the Business Unit the Cart should belong to. When the customerId
of the Cart is also set, the Customer must be an Associate of the Business Unit.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCountry | ( | ) |
Used for LineItem Price selection. If used for Create Cart in Store, the provided country must be one of the Store's countries
.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCurrency | ( | ) |
Currency the Cart uses.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCustom | ( | ) |
Custom Fields for the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCustomerEmail | ( | ) |
Email address of the Customer that the Cart belongs to.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCustomerGroup | ( | ) |
ResourceIdentifier to the Customer Group of the Customer that the Cart belongs to. Used for LineItem Price selection.
It is automatically set if the Customer referenced in customerId
belongs to a Customer Group. It can also be set explicitly when no customerId
is present.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCustomerId | ( | ) |
id
of the Customer that the Cart belongs to.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCustomLineItems | ( | ) |
Custom Line Items to add to the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getCustomShipping | ( | ) |
Custom Shipping Methods for a Cart with Multiple
ShippingMode.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getDeleteDaysAfterLastModification | ( | ) |
Number of days after which an active Cart is deleted since its last modification. If not provided, the default value for this field configured in Project settings is assigned.
Create a ChangeSubscription for Carts to receive a ResourceDeletedDeliveryPayload upon deletion of the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getDiscountCodes | ( | ) |
code
of the existing DiscountCodes to add to the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getExternalTaxRateForShippingMethod | ( | ) |
External Tax Rate for the shippingMethod
if the Cart has External
TaxMode.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getInventoryMode | ( | ) |
Determines how stock quantities are tracked for Line Items in the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getItemShippingAddresses | ( | ) |
Multiple shipping addresses of the Cart. Each address must contain a key
that is unique in this Cart. The keys are used by LineItems to reference these addresses under their shippingDetails
.
For Carts with Single
ShippingMode: eligible Shipping Methods or applicable Tax Rates are determined by the address shippingAddress
, and not itemShippingAddresses
.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getKey | ( | ) |
User-defined unique identifier for the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getLineItems | ( | ) |
Line Items to add to the Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getLocale | ( | ) |
Languages of the Cart. Can only contain languages supported by the Project.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getOrigin | ( | ) |
Indicates how the Cart was created.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getShipping | ( | ) |
Shipping Methods for a Cart with Multiple
ShippingMode.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getShippingAddress | ( | ) |
Shipping address for a Cart with Single
ShippingMode. Determines eligible ShippingMethod rates and Tax Rates of Line Items. Must be one of the itemShippingAddresses
when that field is also provided.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getShippingMethod | ( | ) |
Shipping Method for a Cart with Single
ShippingMode. If the referenced ShippingMethod has a predicate
that does not match the Cart, an InvalidOperation error is returned when creating a Cart.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getShippingMode | ( | ) |
Single
, only a single Shipping Method can be added to the Cart. Multiple
, multiple Shipping Methods can be added to the Cart. Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getShippingRateInput | ( | ) |
Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it must be ClassificationShippingRateInputDraft. CartScore
, it must be ScoreShippingRateInputDraft. CartValue
, it cannot be set. Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getStore | ( | ) |
ResourceIdentifier to the Store the Cart should belong to. Once set, it cannot be updated.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getTaxCalculationMode | ( | ) |
Determines how taxes are calculated for taxedPrice
.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getTaxMode | ( | ) |
Determines how Tax Rates are set.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::getTaxRoundingMode | ( | ) |
Determines how monetary values are rounded when calculating taxes for taxedPrice
.
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setAnonymousId | ( | ?string | $anonymousId | ) |
?string | $anonymousId |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setBillingAddress | ( | ?BaseAddress | $billingAddress | ) |
?BaseAddress | $billingAddress |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setBusinessUnit | ( | ?BusinessUnitResourceIdentifier | $businessUnit | ) |
?BusinessUnitResourceIdentifier | $businessUnit |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCountry | ( | ?string | $country | ) |
?string | $country |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCurrency | ( | ?string | $currency | ) |
?string | $currency |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCustom | ( | ?CustomFieldsDraft | $custom | ) |
?CustomFieldsDraft | $custom |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCustomerEmail | ( | ?string | $customerEmail | ) |
?string | $customerEmail |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCustomerGroup | ( | ?CustomerGroupResourceIdentifier | $customerGroup | ) |
?CustomerGroupResourceIdentifier | $customerGroup |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCustomerId | ( | ?string | $customerId | ) |
?string | $customerId |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCustomLineItems | ( | ?CustomLineItemDraftCollection | $customLineItems | ) |
?CustomLineItemDraftCollection | $customLineItems |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setCustomShipping | ( | ?CustomShippingDraftCollection | $customShipping | ) |
?CustomShippingDraftCollection | $customShipping |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setDeleteDaysAfterLastModification | ( | ?int | $deleteDaysAfterLastModification | ) |
?int | $deleteDaysAfterLastModification |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setDiscountCodes | ( | ?array | $discountCodes | ) |
?array | $discountCodes |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setExternalTaxRateForShippingMethod | ( | ?ExternalTaxRateDraft | $externalTaxRateForShippingMethod | ) |
?ExternalTaxRateDraft | $externalTaxRateForShippingMethod |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setInventoryMode | ( | ?string | $inventoryMode | ) |
?string | $inventoryMode |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setItemShippingAddresses | ( | ?BaseAddressCollection | $itemShippingAddresses | ) |
?BaseAddressCollection | $itemShippingAddresses |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setKey | ( | ?string | $key | ) |
?string | $key |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setLineItems | ( | ?LineItemDraftCollection | $lineItems | ) |
?LineItemDraftCollection | $lineItems |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setLocale | ( | ?string | $locale | ) |
?string | $locale |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setOrigin | ( | ?string | $origin | ) |
?string | $origin |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setShipping | ( | ?ShippingDraftCollection | $shipping | ) |
?ShippingDraftCollection | $shipping |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setShippingAddress | ( | ?BaseAddress | $shippingAddress | ) |
?BaseAddress | $shippingAddress |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setShippingMethod | ( | ?ShippingMethodResourceIdentifier | $shippingMethod | ) |
?ShippingMethodResourceIdentifier | $shippingMethod |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setShippingMode | ( | ?string | $shippingMode | ) |
?string | $shippingMode |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setShippingRateInput | ( | ?ShippingRateInputDraft | $shippingRateInput | ) |
?ShippingRateInputDraft | $shippingRateInput |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setStore | ( | ?StoreResourceIdentifier | $store | ) |
?StoreResourceIdentifier | $store |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setTaxCalculationMode | ( | ?string | $taxCalculationMode | ) |
?string | $taxCalculationMode |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setTaxMode | ( | ?string | $taxMode | ) |
?string | $taxMode |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
Commercetools\Api\Models\Cart\CartDraft::setTaxRoundingMode | ( | ?string | $taxRoundingMode | ) |
?string | $taxRoundingMode |
Implemented in Commercetools\Api\Models\Cart\CartDraftModel.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_ANONYMOUS_ID = 'anonymousId' |
Definition at line 28 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_BILLING_ADDRESS = 'billingAddress' |
Definition at line 38 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_BUSINESS_UNIT = 'businessUnit' |
Definition at line 29 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_COUNTRY = 'country' |
Definition at line 47 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_CURRENCY = 'currency' |
Definition at line 23 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_CUSTOM = 'custom' |
Definition at line 51 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_CUSTOM_LINE_ITEMS = 'customLineItems' |
Definition at line 32 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_CUSTOM_SHIPPING = 'customShipping' |
Definition at line 43 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_CUSTOMER_EMAIL = 'customerEmail' |
Definition at line 26 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_CUSTOMER_GROUP = 'customerGroup' |
Definition at line 27 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_CUSTOMER_ID = 'customerId' |
Definition at line 25 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification' |
Definition at line 50 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_DISCOUNT_CODES = 'discountCodes' |
Definition at line 46 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_EXTERNAL_TAX_RATE_FOR_SHIPPING_METHOD = 'externalTaxRateForShippingMethod' |
Definition at line 34 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_INVENTORY_MODE = 'inventoryMode' |
Definition at line 37 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_ITEM_SHIPPING_ADDRESSES = 'itemShippingAddresses' |
Definition at line 45 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_KEY = 'key' |
Definition at line 24 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_LINE_ITEMS = 'lineItems' |
Definition at line 31 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_LOCALE = 'locale' |
Definition at line 48 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_ORIGIN = 'origin' |
Definition at line 49 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_SHIPPING = 'shipping' |
Definition at line 44 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_SHIPPING_ADDRESS = 'shippingAddress' |
Definition at line 39 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_SHIPPING_METHOD = 'shippingMethod' |
Definition at line 40 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_SHIPPING_MODE = 'shippingMode' |
Definition at line 42 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_SHIPPING_RATE_INPUT = 'shippingRateInput' |
Definition at line 41 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_STORE = 'store' |
Definition at line 30 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_TAX_CALCULATION_MODE = 'taxCalculationMode' |
Definition at line 36 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_TAX_MODE = 'taxMode' |
Definition at line 33 of file CartDraft.php.
const Commercetools\Api\Models\Cart\CartDraft::FIELD_TAX_ROUNDING_MODE = 'taxRoundingMode' |
Definition at line 35 of file CartDraft.php.