123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Quote\Api\Data;
- /**
- * Interface TotalsInterface
- * @api
- * @since 100.0.2
- */
- interface TotalsInterface extends \Magento\Framework\Api\ExtensibleDataInterface
- {
- /**#@+
- * Constants defined for keys of array, makes typos less likely
- */
- const KEY_GRAND_TOTAL = 'grand_total';
- const KEY_BASE_GRAND_TOTAL = 'base_grand_total';
- const KEY_SUBTOTAL = 'subtotal';
- const KEY_BASE_SUBTOTAL = 'base_subtotal';
- const KEY_DISCOUNT_AMOUNT = 'discount_amount';
- const KEY_BASE_DISCOUNT_AMOUNT = 'base_discount_amount';
- const KEY_SUBTOTAL_WITH_DISCOUNT = 'subtotal_with_discount';
- const KEY_BASE_SUBTOTAL_WITH_DISCOUNT = 'base_subtotal_with_discount';
- const KEY_SHIPPING_AMOUNT = 'shipping_amount';
- const KEY_BASE_SHIPPING_AMOUNT = 'base_shipping_amount';
- const KEY_SHIPPING_DISCOUNT_AMOUNT = 'shipping_discount_amount';
- const KEY_BASE_SHIPPING_DISCOUNT_AMOUNT = 'base_shipping_discount_amount';
- const KEY_TAX_AMOUNT = 'tax_amount';
- const KEY_BASE_TAX_AMOUNT = 'base_tax_amount';
- const KEY_WEEE_TAX_APPLIED_AMOUNT = 'weee_tax_applied_amount';
- const KEY_SHIPPING_TAX_AMOUNT = 'shipping_tax_amount';
- const KEY_BASE_SHIPPING_TAX_AMOUNT = 'base_shipping_tax_amount';
- const KEY_SUBTOTAL_INCL_TAX = 'subtotal_incl_tax';
- const KEY_BASE_SUBTOTAL_INCL_TAX = 'base_subtotal_incl_tax';
- const KEY_SHIPPING_INCL_TAX = 'shipping_incl_tax';
- const KEY_BASE_SHIPPING_INCL_TAX = 'base_shipping_incl_tax';
- const KEY_BASE_CURRENCY_CODE = 'base_currency_code';
- const KEY_QUOTE_CURRENCY_CODE = 'quote_currency_code';
- const KEY_COUPON_CODE = 'coupon_code';
- const KEY_ITEMS = 'items';
- const KEY_TOTAL_SEGMENTS = 'total_segments';
- const KEY_ITEMS_QTY = 'items_qty';
- /**#@-*/
- /**
- * Get grand total in quote currency
- *
- * @return float|null
- */
- public function getGrandTotal();
- /**
- * Set grand total in quote currency
- *
- * @param float $grandTotal
- * @return $this
- */
- public function setGrandTotal($grandTotal);
- /**
- * Get grand total in base currency
- *
- * @return float|null
- */
- public function getBaseGrandTotal();
- /**
- * Set grand total in base currency
- *
- * @param float $baseGrandTotal
- * @return $this
- */
- public function setBaseGrandTotal($baseGrandTotal);
- /**
- * Get subtotal in quote currency
- *
- * @return float|null
- */
- public function getSubtotal();
- /**
- * Set subtotal in quote currency
- *
- * @param float $subtotal
- * @return $this
- */
- public function setSubtotal($subtotal);
- /**
- * Get subtotal in base currency
- *
- * @return float|null
- */
- public function getBaseSubtotal();
- /**
- * Set subtotal in base currency
- *
- * @param float $baseSubtotal
- * @return $this
- */
- public function setBaseSubtotal($baseSubtotal);
- /**
- * Get discount amount in quote currency
- *
- * @return float|null
- */
- public function getDiscountAmount();
- /**
- * Set discount amount in quote currency
- *
- * @param float $discountAmount
- * @return $this
- */
- public function setDiscountAmount($discountAmount);
- /**
- * Get discount amount in base currency
- *
- * @return float|null
- */
- public function getBaseDiscountAmount();
- /**
- * Set discount amount in base currency
- *
- * @param float $baseDiscountAmount
- * @return $this
- */
- public function setBaseDiscountAmount($baseDiscountAmount);
- /**
- * Get subtotal in quote currency with applied discount
- *
- * @return float|null
- */
- public function getSubtotalWithDiscount();
- /**
- * Set subtotal in quote currency with applied discount
- *
- * @param float $subtotalWithDiscount
- * @return $this
- */
- public function setSubtotalWithDiscount($subtotalWithDiscount);
- /**
- * Get subtotal in base currency with applied discount
- *
- * @return float|null
- */
- public function getBaseSubtotalWithDiscount();
- /**
- * Set subtotal in base currency with applied discount
- *
- * @param float $baseSubtotalWithDiscount
- * @return $this
- */
- public function setBaseSubtotalWithDiscount($baseSubtotalWithDiscount);
- /**
- * Get shipping amount in quote currency
- *
- * @return float|null
- */
- public function getShippingAmount();
- /**
- * Set shipping amount in quote currency
- *
- * @param float $shippingAmount
- * @return $this
- */
- public function setShippingAmount($shippingAmount);
- /**
- * Get shipping amount in base currency
- *
- * @return float|null
- */
- public function getBaseShippingAmount();
- /**
- * Set shipping amount in base currency
- *
- * @param float $baseShippingAmount
- * @return $this
- */
- public function setBaseShippingAmount($baseShippingAmount);
- /**
- * Get shipping discount amount in quote currency
- *
- * @return float|null
- */
- public function getShippingDiscountAmount();
- /**
- * Set shipping discount amount in quote currency
- *
- * @param float $shippingDiscountAmount
- * @return $this
- */
- public function setShippingDiscountAmount($shippingDiscountAmount);
- /**
- * Get shipping discount amount in base currency
- *
- * @return float|null
- */
- public function getBaseShippingDiscountAmount();
- /**
- * Set shipping discount amount in base currency
- *
- * @param float $baseShippingDiscountAmount
- * @return $this
- */
- public function setBaseShippingDiscountAmount($baseShippingDiscountAmount);
- /**
- * Get tax amount in quote currency
- *
- * @return float|null
- */
- public function getTaxAmount();
- /**
- * Set tax amount in quote currency
- *
- * @param float $taxAmount
- * @return $this
- */
- public function setTaxAmount($taxAmount);
- /**
- * Get tax amount in base currency
- *
- * @return float|null
- */
- public function getBaseTaxAmount();
- /**
- * Set tax amount in base currency
- *
- * @param float $baseTaxAmount
- * @return $this
- */
- public function setBaseTaxAmount($baseTaxAmount);
- /**
- * Returns the total weee tax applied amount in quote currency.
- *
- * @return float Item weee tax applied amount in quote currency.
- */
- public function getWeeeTaxAppliedAmount();
- /**
- * Sets the total weee tax applied amount in quote currency.
- *
- * @param float $weeeTaxAppliedAmount
- * @return $this
- */
- public function setWeeeTaxAppliedAmount($weeeTaxAppliedAmount);
- /**
- * Get shipping tax amount in quote currency
- *
- * @return float|null
- */
- public function getShippingTaxAmount();
- /**
- * Set shipping tax amount in quote currency
- *
- * @param float $shippingTaxAmount
- * @return $this
- */
- public function setShippingTaxAmount($shippingTaxAmount);
- /**
- * Get shipping tax amount in base currency
- *
- * @return float|null
- */
- public function getBaseShippingTaxAmount();
- /**
- * Set shipping tax amount in base currency
- *
- * @param float $baseShippingTaxAmount
- * @return $this
- */
- public function setBaseShippingTaxAmount($baseShippingTaxAmount);
- /**
- * Get subtotal including tax in quote currency
- *
- * @return float|null
- */
- public function getSubtotalInclTax();
- /**
- * Set subtotal including tax in quote currency
- *
- * @param float $subtotalInclTax
- * @return $this
- */
- public function setSubtotalInclTax($subtotalInclTax);
- /**
- * Get subtotal including tax in base currency
- *
- * @return float|null
- */
- public function getBaseSubtotalInclTax();
- /**
- * Set subtotal including tax in base currency
- *
- * @param float $baseSubtotalInclTax
- * @return $this
- */
- public function setBaseSubtotalInclTax($baseSubtotalInclTax);
- /**
- * Get shipping including tax in quote currency
- *
- * @return float|null
- */
- public function getShippingInclTax();
- /**
- * Set shipping including tax in quote currency
- *
- * @param float $shippingInclTax
- * @return $this
- */
- public function setShippingInclTax($shippingInclTax);
- /**
- * Get shipping including tax in base currency
- *
- * @return float|null
- */
- public function getBaseShippingInclTax();
- /**
- * Set shipping including tax in base currency
- *
- * @param float $baseShippingInclTax
- * @return $this
- */
- public function setBaseShippingInclTax($baseShippingInclTax);
- /**
- * Get base currency code
- *
- * @return string|null
- */
- public function getBaseCurrencyCode();
- /**
- * Set base currency code
- *
- * @param string $baseCurrencyCode
- * @return $this
- */
- public function setBaseCurrencyCode($baseCurrencyCode);
- /**
- * Get quote currency code
- *
- * @return string|null
- */
- public function getQuoteCurrencyCode();
- /**
- * Set quote currency code
- *
- * @param string $quoteCurrencyCode
- * @return $this
- */
- public function setQuoteCurrencyCode($quoteCurrencyCode);
- /**
- * Get applied coupon code
- *
- * @return string|null
- */
- public function getCouponCode();
- /**
- * Set applied coupon code
- *
- * @param string $couponCode
- * @return $this
- */
- public function setCouponCode($couponCode);
- /**
- * Get items qty
- *
- * @return int||null
- */
- public function getItemsQty();
- /**
- * Set items qty
- *
- * @param int $itemsQty
- * @return $this
- */
- public function setItemsQty($itemsQty = null);
- /**
- * Get totals by items
- *
- * @return \Magento\Quote\Api\Data\TotalsItemInterface[]|null
- */
- public function getItems();
- /**
- * Set totals by items
- *
- * @param \Magento\Quote\Api\Data\TotalsItemInterface[] $items
- * @return $this
- */
- public function setItems(array $items = null);
- /**
- * Get dynamically calculated totals
- *
- * @return \Magento\Quote\Api\Data\TotalSegmentInterface[]
- */
- public function getTotalSegments();
- /**
- * Set dynamically calculated totals
- *
- * @param \Magento\Quote\Api\Data\TotalSegmentInterface[] $totals
- * @return $this
- */
- public function setTotalSegments($totals = []);
- /**
- * Retrieve existing extension attributes object or create a new one.
- *
- * @return \Magento\Quote\Api\Data\TotalsExtensionInterface|null
- */
- public function getExtensionAttributes();
- /**
- * Set an extension attributes object.
- *
- * @param \Magento\Quote\Api\Data\TotalsExtensionInterface $extensionAttributes
- * @return $this
- */
- public function setExtensionAttributes(\Magento\Quote\Api\Data\TotalsExtensionInterface $extensionAttributes);
- }
|